1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.firewalls.html">firewalls</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#delete">delete(project, firewall)</a></code></p>
79<p class="firstline">Deletes the specified firewall.</p>
80<p class="toc_element">
81  <code><a href="#get">get(project, firewall)</a></code></p>
82<p class="firstline">Returns the specified firewall.</p>
83<p class="toc_element">
84  <code><a href="#insert">insert(project, body)</a></code></p>
85<p class="firstline">Creates a firewall rule in the specified project using the data included in the request.</p>
86<p class="toc_element">
87  <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
88<p class="firstline">Retrieves the list of firewall rules available to the specified project.</p>
89<p class="toc_element">
90  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93  <code><a href="#patch">patch(project, firewall, body)</a></code></p>
94<p class="firstline">Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. This method supports patch semantics.</p>
95<p class="toc_element">
96  <code><a href="#update">update(project, firewall, body)</a></code></p>
97<p class="firstline">Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="delete">delete(project, firewall)</code>
101  <pre>Deletes the specified firewall.
102
103Args:
104  project: string, Project ID for this request. (required)
105  firewall: string, Name of the firewall rule to delete. (required)
106
107Returns:
108  An object of the form:
109
110    { # An Operation resource, used to manage asynchronous API requests.
111    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
112    "clientOperationId": "A String", # [Output Only] Reserved for future use.
113    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
114    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
115    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
116    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
117    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
118    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
119    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
120    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
121    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
122    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
123    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
124    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
125      {
126        "message": "A String", # [Output Only] A human-readable description of the warning code.
127        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
128        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
129            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
130          {
131            "value": "A String", # [Output Only] A warning data value corresponding to the key.
132            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
133          },
134        ],
135      },
136    ],
137    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
138    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
139    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
140    "name": "A String", # [Output Only] Name of the resource.
141    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
142    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
143      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
144        {
145          "message": "A String", # [Output Only] An optional, human-readable error message.
146          "code": "A String", # [Output Only] The error type identifier for this error.
147          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
148        },
149      ],
150    },
151    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
152    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
153    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
154  }</pre>
155</div>
156
157<div class="method">
158    <code class="details" id="get">get(project, firewall)</code>
159  <pre>Returns the specified firewall.
160
161Args:
162  project: string, Project ID for this request. (required)
163  firewall: string, Name of the firewall rule to return. (required)
164
165Returns:
166  An object of the form:
167
168    { # Represents a Firewall resource.
169      "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
170      "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
171      "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
172        "A String",
173      ],
174      "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
175        "A String",
176      ],
177      "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
178          # global/networks/default
179          # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
180          # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
181          # - projects/myproject/global/networks/my-network
182          # - global/networks/default
183      "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
184        "A String",
185      ],
186      "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
187        {
188          "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number.
189          "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
190              #
191              # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
192            "A String",
193          ],
194        },
195      ],
196      "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
197      "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
198      "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
199      "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
200    }</pre>
201</div>
202
203<div class="method">
204    <code class="details" id="insert">insert(project, body)</code>
205  <pre>Creates a firewall rule in the specified project using the data included in the request.
206
207Args:
208  project: string, Project ID for this request. (required)
209  body: object, The request body. (required)
210    The object takes the form of:
211
212{ # Represents a Firewall resource.
213    "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
214    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
215    "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
216      "A String",
217    ],
218    "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
219      "A String",
220    ],
221    "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
222        # global/networks/default
223        # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
224        # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
225        # - projects/myproject/global/networks/my-network
226        # - global/networks/default
227    "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
228      "A String",
229    ],
230    "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
231      {
232        "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number.
233        "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
234            #
235            # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
236          "A String",
237        ],
238      },
239    ],
240    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
241    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
242    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
243    "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
244  }
245
246
247Returns:
248  An object of the form:
249
250    { # An Operation resource, used to manage asynchronous API requests.
251    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
252    "clientOperationId": "A String", # [Output Only] Reserved for future use.
253    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
254    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
255    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
256    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
257    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
258    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
259    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
260    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
261    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
262    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
263    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
264    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
265      {
266        "message": "A String", # [Output Only] A human-readable description of the warning code.
267        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
268        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
269            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
270          {
271            "value": "A String", # [Output Only] A warning data value corresponding to the key.
272            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
273          },
274        ],
275      },
276    ],
277    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
278    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
279    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
280    "name": "A String", # [Output Only] Name of the resource.
281    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
282    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
283      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
284        {
285          "message": "A String", # [Output Only] An optional, human-readable error message.
286          "code": "A String", # [Output Only] The error type identifier for this error.
287          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
288        },
289      ],
290    },
291    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
292    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
293    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
294  }</pre>
295</div>
296
297<div class="method">
298    <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
299  <pre>Retrieves the list of firewall rules available to the specified project.
300
301Args:
302  project: string, Project ID for this request. (required)
303  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
304
305You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
306
307Currently, only sorting by name or creationTimestamp desc is supported.
308  maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
309  pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
310  filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
311
312The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
313
314For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
315
316You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
317
318To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
319
320Returns:
321  An object of the form:
322
323    { # Contains a list of firewalls.
324    "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
325    "items": [ # [Output Only] A list of Firewall resources.
326      { # Represents a Firewall resource.
327          "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
328          "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
329          "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
330            "A String",
331          ],
332          "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
333            "A String",
334          ],
335          "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
336              # global/networks/default
337              # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
338              # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
339              # - projects/myproject/global/networks/my-network
340              # - global/networks/default
341          "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
342            "A String",
343          ],
344          "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
345            {
346              "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number.
347              "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
348                  #
349                  # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
350                "A String",
351              ],
352            },
353          ],
354          "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
355          "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
356          "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
357          "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
358        },
359    ],
360    "kind": "compute#firewallList", # [Output Only] Type of resource. Always compute#firewallList for lists of firewalls.
361    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
362    "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
363  }</pre>
364</div>
365
366<div class="method">
367    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
368  <pre>Retrieves the next page of results.
369
370Args:
371  previous_request: The request for the previous page. (required)
372  previous_response: The response from the request for the previous page. (required)
373
374Returns:
375  A request object that you can call 'execute()' on to request the next
376  page. Returns None if there are no more items in the collection.
377    </pre>
378</div>
379
380<div class="method">
381    <code class="details" id="patch">patch(project, firewall, body)</code>
382  <pre>Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. This method supports patch semantics.
383
384Args:
385  project: string, Project ID for this request. (required)
386  firewall: string, Name of the firewall rule to update. (required)
387  body: object, The request body. (required)
388    The object takes the form of:
389
390{ # Represents a Firewall resource.
391    "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
392    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
393    "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
394      "A String",
395    ],
396    "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
397      "A String",
398    ],
399    "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
400        # global/networks/default
401        # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
402        # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
403        # - projects/myproject/global/networks/my-network
404        # - global/networks/default
405    "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
406      "A String",
407    ],
408    "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
409      {
410        "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number.
411        "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
412            #
413            # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
414          "A String",
415        ],
416      },
417    ],
418    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
419    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
420    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
421    "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
422  }
423
424
425Returns:
426  An object of the form:
427
428    { # An Operation resource, used to manage asynchronous API requests.
429    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
430    "clientOperationId": "A String", # [Output Only] Reserved for future use.
431    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
432    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
433    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
434    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
435    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
436    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
437    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
438    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
439    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
440    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
441    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
442    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
443      {
444        "message": "A String", # [Output Only] A human-readable description of the warning code.
445        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
446        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
447            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
448          {
449            "value": "A String", # [Output Only] A warning data value corresponding to the key.
450            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
451          },
452        ],
453      },
454    ],
455    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
456    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
457    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
458    "name": "A String", # [Output Only] Name of the resource.
459    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
460    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
461      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
462        {
463          "message": "A String", # [Output Only] An optional, human-readable error message.
464          "code": "A String", # [Output Only] The error type identifier for this error.
465          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
466        },
467      ],
468    },
469    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
470    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
471    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
472  }</pre>
473</div>
474
475<div class="method">
476    <code class="details" id="update">update(project, firewall, body)</code>
477  <pre>Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.
478
479Args:
480  project: string, Project ID for this request. (required)
481  firewall: string, Name of the firewall rule to update. (required)
482  body: object, The request body. (required)
483    The object takes the form of:
484
485{ # Represents a Firewall resource.
486    "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
487    "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
488    "sourceTags": [ # If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.
489      "A String",
490    ],
491    "sourceRanges": [ # If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.
492      "A String",
493    ],
494    "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
495        # global/networks/default
496        # If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
497        # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
498        # - projects/myproject/global/networks/my-network
499        # - global/networks/default
500    "targetTags": [ # A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
501      "A String",
502    ],
503    "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
504      {
505        "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number.
506        "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
507            #
508            # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
509          "A String",
510        ],
511      },
512    ],
513    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
514    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
515    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
516    "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
517  }
518
519
520Returns:
521  An object of the form:
522
523    { # An Operation resource, used to manage asynchronous API requests.
524    "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
525    "clientOperationId": "A String", # [Output Only] Reserved for future use.
526    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
527    "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
528    "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
529    "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
530    "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
531    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
532    "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
533    "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
534    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
535    "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
536    "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
537    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
538      {
539        "message": "A String", # [Output Only] A human-readable description of the warning code.
540        "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
541        "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
542            # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
543          {
544            "value": "A String", # [Output Only] A warning data value corresponding to the key.
545            "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
546          },
547        ],
548      },
549    ],
550    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
551    "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
552    "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
553    "name": "A String", # [Output Only] Name of the resource.
554    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
555    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
556      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
557        {
558          "message": "A String", # [Output Only] An optional, human-readable error message.
559          "code": "A String", # [Output Only] The error type identifier for this error.
560          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
561        },
562      ],
563    },
564    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
565    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
566    "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
567  }</pre>
568</div>
569
570</body></html>