blob: 05b9d1e359adc137bbae975c24c5068b09c1b6de [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.firewalls.html">firewalls</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040081 <code><a href="#delete">delete(project, firewall, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Deletes the specified firewall.</p>
83<p class="toc_element">
84 <code><a href="#get">get(project, firewall)</a></code></p>
85<p class="firstline">Returns the specified firewall.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Creates a firewall rule in the specified project using the data included in the request.</p>
89<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Retrieves the list of firewall rules available to the specified project.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(project, firewall, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#update">update(project, firewall, body=None, requestId=None)</a></code></p>
103<p class="firstline">Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<h3>Method Details</h3>
105<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400111 <code class="details" id="delete">delete(project, firewall, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112 <pre>Deletes the specified firewall.
113
114Args:
115 project: string, Project ID for this request. (required)
116 firewall: string, Name of the firewall rule to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
118
119For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
120
121The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122
123Returns:
124 An object of the form:
125
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800127 #
128 # Google Compute Engine has three Operation resources:
129 #
130 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
131 #
132 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
133 #
134 # Operations can be global, regional or zonal.
135 # - For global operations, use the `globalOperations` resource.
136 # - For regional operations, use the `regionOperations` resource.
137 # - For zonal operations, use the `zonalOperations` resource.
138 #
139 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
140 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
141 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
142 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
143 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
144 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
145 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800147 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
148 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 },
151 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800152 },
153 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
154 &quot;httpErrorStatusCode&quot;: 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.
155 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
156 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
157 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
158 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800159 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800160 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
161 &quot;progress&quot;: 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.
162 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
163 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
164 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
165 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
166 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
167 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
168 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
169 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
170 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
171 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
172 {
173 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
174 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
175 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
176 {
177 &quot;key&quot;: &quot;A String&quot;, # [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).
178 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
179 },
180 ],
181 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
182 },
183 ],
184 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
185}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700186</div>
187
188<div class="method">
189 <code class="details" id="get">get(project, firewall)</code>
190 <pre>Returns the specified firewall.
191
192Args:
193 project: string, Project ID for this request. (required)
194 firewall: string, Name of the firewall rule to return. (required)
195
196Returns:
197 An object of the form:
198
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199 { # Represents a Firewall Rule resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800200 #
201 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
202 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
203 {
204 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
205 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
206 #
207 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
208 &quot;A String&quot;,
209 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800211 ],
212 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
213 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
214 {
215 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
216 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
217 #
218 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
219 &quot;A String&quot;,
220 ],
221 },
222 ],
223 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
224 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
225 &quot;A String&quot;,
226 ],
227 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
228 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
229 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
230 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
231 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
232 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
233 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
234 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
235 },
236 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
237 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
238 # global/networks/default
239 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
240 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
241 # - projects/myproject/global/networks/my-network
242 # - global/networks/default
243 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
244 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
245 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
246 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a 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 fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
247 &quot;A String&quot;,
248 ],
249 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
250 &quot;A String&quot;,
251 ],
252 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
253 &quot;A String&quot;,
254 ],
255 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
256 &quot;A String&quot;,
257 ],
258 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
259 &quot;A String&quot;,
260 ],
261}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700262</div>
263
264<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700266 <pre>Creates a firewall rule in the specified project using the data included in the request.
267
268Args:
269 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700270 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700271 The object takes the form of:
272
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273{ # Represents a Firewall Rule resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 #
275 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
276 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
277 {
278 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
279 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
280 #
281 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
282 &quot;A String&quot;,
283 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 ],
286 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
287 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
288 {
289 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
290 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
291 #
292 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
293 &quot;A String&quot;,
294 ],
295 },
296 ],
297 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
298 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
299 &quot;A String&quot;,
300 ],
301 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
302 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700303 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
305 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700306 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
308 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
309 },
310 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
311 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
312 # global/networks/default
313 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
314 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
315 # - projects/myproject/global/networks/my-network
316 # - global/networks/default
317 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
318 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
319 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
320 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a 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 fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
321 &quot;A String&quot;,
322 ],
323 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
324 &quot;A String&quot;,
325 ],
326 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
327 &quot;A String&quot;,
328 ],
329 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
330 &quot;A String&quot;,
331 ],
332 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
333 &quot;A String&quot;,
334 ],
335}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700336
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
338
339For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
340
341The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700342
343Returns:
344 An object of the form:
345
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800347 #
348 # Google Compute Engine has three Operation resources:
349 #
350 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
351 #
352 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
353 #
354 # Operations can be global, regional or zonal.
355 # - For global operations, use the `globalOperations` resource.
356 # - For regional operations, use the `regionOperations` resource.
357 # - For zonal operations, use the `zonalOperations` resource.
358 #
359 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
360 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
361 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
362 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
363 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
364 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
365 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800367 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
368 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
369 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 },
371 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800372 },
373 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
374 &quot;httpErrorStatusCode&quot;: 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.
375 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
376 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
377 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
378 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800379 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800380 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
381 &quot;progress&quot;: 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.
382 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
383 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
384 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
385 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
386 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
387 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
388 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
389 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
390 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
391 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
392 {
393 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
394 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
395 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
396 {
397 &quot;key&quot;: &quot;A String&quot;, # [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).
398 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
399 },
400 ],
401 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
402 },
403 ],
404 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
405}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700406</div>
407
408<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700410 <pre>Retrieves the list of firewall rules available to the specified project.
411
412Args:
413 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700414 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700415
Dan O'Mearadd494642020-05-01 07:42:23 -0700416For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700417
Dan O'Mearadd494642020-05-01 07:42:23 -0700418You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700419
Bu Sun Kim65020912020-05-20 12:08:20 -0700420To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
421 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`)
422 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
423
424You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
425
426Currently, only sorting by `name` or `creationTimestamp desc` is supported.
427 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800428 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700429
430Returns:
431 An object of the form:
432
433 { # Contains a list of firewalls.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800434 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
435 &quot;items&quot;: [ # A list of Firewall resources.
436 { # Represents a Firewall Rule resource.
437 #
438 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
439 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800441 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
442 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
443 #
444 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
445 &quot;A String&quot;,
446 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 },
448 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800449 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
450 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
451 {
452 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
453 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
454 #
455 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
456 &quot;A String&quot;,
457 ],
458 },
459 ],
460 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
461 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
462 &quot;A String&quot;,
463 ],
464 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
465 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
466 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
467 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
468 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
469 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
470 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
471 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
472 },
473 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
474 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
475 # global/networks/default
476 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
477 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
478 # - projects/myproject/global/networks/my-network
479 # - global/networks/default
480 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
481 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
482 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
483 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a 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 fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
484 &quot;A String&quot;,
485 ],
486 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
487 &quot;A String&quot;,
488 ],
489 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
490 &quot;A String&quot;,
491 ],
492 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
493 &quot;A String&quot;,
494 ],
495 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
496 &quot;A String&quot;,
497 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700498 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800499 ],
500 &quot;kind&quot;: &quot;compute#firewallList&quot;, # [Output Only] Type of resource. Always compute#firewallList for lists of firewalls.
501 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
502 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
503 &quot;warning&quot;: { # [Output Only] Informational warning message.
504 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
505 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
506 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
507 {
508 &quot;key&quot;: &quot;A String&quot;, # [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).
509 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
510 },
511 ],
512 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
513 },
514}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700515</div>
516
517<div class="method">
518 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
519 <pre>Retrieves the next page of results.
520
521Args:
522 previous_request: The request for the previous page. (required)
523 previous_response: The response from the request for the previous page. (required)
524
525Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700526 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700527 page. Returns None if there are no more items in the collection.
528 </pre>
529</div>
530
531<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700532 <code class="details" id="patch">patch(project, firewall, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 <pre>Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700534
535Args:
536 project: string, Project ID for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400537 firewall: string, Name of the firewall rule to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700538 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700539 The object takes the form of:
540
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700541{ # Represents a Firewall Rule resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700542 #
543 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
544 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
545 {
546 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
547 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
548 #
549 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
550 &quot;A String&quot;,
551 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700552 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700553 ],
554 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
555 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
556 {
557 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
558 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
559 #
560 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
561 &quot;A String&quot;,
562 ],
563 },
564 ],
565 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
566 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
567 &quot;A String&quot;,
568 ],
569 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
570 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700571 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
573 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700574 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
576 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
577 },
578 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
579 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
580 # global/networks/default
581 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
582 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
583 # - projects/myproject/global/networks/my-network
584 # - global/networks/default
585 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
586 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
587 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
588 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a 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 fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
589 &quot;A String&quot;,
590 ],
591 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
592 &quot;A String&quot;,
593 ],
594 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
595 &quot;A String&quot;,
596 ],
597 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
598 &quot;A String&quot;,
599 ],
600 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
601 &quot;A String&quot;,
602 ],
603}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700604
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700605 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
606
607For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
608
609The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700610
611Returns:
612 An object of the form:
613
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800615 #
616 # Google Compute Engine has three Operation resources:
617 #
618 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
619 #
620 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
621 #
622 # Operations can be global, regional or zonal.
623 # - For global operations, use the `globalOperations` resource.
624 # - For regional operations, use the `regionOperations` resource.
625 # - For zonal operations, use the `zonalOperations` resource.
626 #
627 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
628 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
629 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
630 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
631 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
632 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
633 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700634 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800635 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
636 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
637 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 },
639 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800640 },
641 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
642 &quot;httpErrorStatusCode&quot;: 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.
643 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
644 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
645 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
646 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800647 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800648 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
649 &quot;progress&quot;: 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.
650 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
651 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
652 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
653 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
654 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
655 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
656 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
657 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
658 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
659 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
660 {
661 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
662 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
663 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
664 {
665 &quot;key&quot;: &quot;A String&quot;, # [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).
666 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
667 },
668 ],
669 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
670 },
671 ],
672 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
673}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700674</div>
675
676<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700677 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700678 <pre>Returns permissions that a caller has on the specified resource.
679
680Args:
681 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700683 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700684 The object takes the form of:
685
686{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800687 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
688 &quot;A String&quot;,
689 ],
690}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700691
692
693Returns:
694 An object of the form:
695
696 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800697 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
698 &quot;A String&quot;,
699 ],
700}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700701</div>
702
703<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 <code class="details" id="update">update(project, firewall, body=None, requestId=None)</code>
705 <pre>Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700706
707Args:
708 project: string, Project ID for this request. (required)
709 firewall: string, Name of the firewall rule to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700710 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700711 The object takes the form of:
712
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713{ # Represents a Firewall Rule resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 #
715 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
716 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
717 {
718 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
719 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
720 #
721 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
722 &quot;A String&quot;,
723 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700724 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 ],
726 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
727 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
728 {
729 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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, ipip, sctp) or the IP protocol number.
730 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for the 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.
731 #
732 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
733 &quot;A String&quot;,
734 ],
735 },
736 ],
737 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
738 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
739 &quot;A String&quot;,
740 ],
741 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
742 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700743 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700744 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
745 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700746 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
748 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
749 },
750 &quot;name&quot;: &quot;A String&quot;, # 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])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
751 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
752 # global/networks/default
753 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
754 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
755 # - projects/myproject/global/networks/my-network
756 # - global/networks/default
757 &quot;priority&quot;: 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
758 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
759 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
760 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic that has a 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 fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
761 &quot;A String&quot;,
762 ],
763 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance&#x27;s external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
764 &quot;A String&quot;,
765 ],
766 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance&#x27;s external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
767 &quot;A String&quot;,
768 ],
769 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
770 &quot;A String&quot;,
771 ],
772 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
773 &quot;A String&quot;,
774 ],
775}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700776
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700777 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
778
779For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
780
781The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700782
783Returns:
784 An object of the form:
785
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800787 #
788 # Google Compute Engine has three Operation resources:
789 #
790 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
791 #
792 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
793 #
794 # Operations can be global, regional or zonal.
795 # - For global operations, use the `globalOperations` resource.
796 # - For regional operations, use the `regionOperations` resource.
797 # - For zonal operations, use the `zonalOperations` resource.
798 #
799 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
800 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
801 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
802 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
803 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
804 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
805 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800807 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
808 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
809 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700810 },
811 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800812 },
813 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
814 &quot;httpErrorStatusCode&quot;: 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.
815 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
816 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
817 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
818 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800819 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800820 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
821 &quot;progress&quot;: 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.
822 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
823 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
824 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
825 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
826 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
827 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
828 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
829 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
830 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
831 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
832 {
833 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
834 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
835 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
836 {
837 &quot;key&quot;: &quot;A String&quot;, # [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).
838 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
839 },
840 ],
841 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
842 },
843 ],
844 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
845}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700846</div>
847
848</body></html>