Debian Codegraph @

docs/dyn/compute_v1.firewalls.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.firewalls.html">firewalls</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#delete">delete(project, firewall, requestId=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Deletes the specified firewall.</p>
83 <p class="toc_element">
84 <code><a href="#get">get(project, firewall, x__xgafv=None)</a></code></p>
85 <p class="firstline">Returns the specified firewall.</p>
86 <p class="toc_element">
87 <code><a href="#insert">insert(project, body=None, requestId=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Creates a firewall rule in the specified project using the data</p>
89 <p class="toc_element">
90 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Retrieves the list of firewall rules available to the specified</p>
92 <p class="toc_element">
93 <code><a href="#list_next">list_next()</a></code></p>
94 <p class="firstline">Retrieves the next page of results.</p>
95 <p class="toc_element">
96 <code><a href="#patch">patch(project, firewall, body=None, requestId=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Updates the specified firewall rule with the data included in the</p>
98 <p class="toc_element">
99 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">Returns permissions that a caller has on the specified resource.</p>
101 <p class="toc_element">
102 <code><a href="#update">update(project, firewall, body=None, requestId=None, x__xgafv=None)</a></code></p>
103 <p class="firstline">Updates the specified firewall rule with the data included in the</p>
104 <h3>Method Details</h3>
105 <div class="method">
106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108 </div>
109
110 <div class="method">
111 <code class="details" id="delete">delete(project, firewall, requestId=None, x__xgafv=None)</code>
112 <pre>Deletes the specified firewall.
113
114 Args:
115 project: string, Project ID for this request. (required)
116 firewall: string, Name of the firewall rule to delete. (required)
117 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
118 that if you must retry your request, the server will know to ignore the
119 request if it has already been completed.
120
121 For example, consider a situation where you make an initial request and
122 the request times out. If you make the request again with the same
123 request ID, the server can check if original operation with the same
124 request ID was received, and if so, will ignore the second request. This
125 prevents clients from accidentally creating duplicate commitments.
126
127 The request ID must be
128 a valid UUID with the exception that zero UUID is not supported
129 (00000000-0000-0000-0000-000000000000).
130 x__xgafv: string, V1 error format.
131 Allowed values
132 1 - v1 error format
133 2 - v2 error format
134
135 Returns:
136 An object of the form:
137
138 { # Represents an Operation resource.
139 #
140 # Google Compute Engine has three Operation resources:
141 #
142 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
143 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
144 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
145 #
146 # You can use an operation resource to manage asynchronous API requests.
147 # For more information, readHandling
148 # API responses.
149 #
150 # Operations can be global, regional or zonal.
151 #
152 # - For global operations, use the `globalOperations`
153 # resource.
154 # - For regional operations, use the
155 # `regionOperations` resource.
156 # - For zonal operations, use
157 # the `zoneOperations` resource.
158 #
159 #
160 #
161 # For more information, read
162 # Global, Regional, and Zonal Resources.
163 #
164 # Note that completed Operation resources have a limited
165 # retention period.
166 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
167 # Not present otherwise.
168 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
169 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
170 # set when the operation is created.
171 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
172 # text format.
173 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
174 # this field will be populated.
175 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
176 # operation.
177 {
178 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
179 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
180 # details. There is a set of defined message types to use for providing
181 # details.The syntax depends on the error code. For example,
182 # QuotaExceededInfo will have details when the error code is
183 # QUOTA_EXCEEDED.
184 {
185 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
186 #
187 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
188 # is not enabled:
189 #
190 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
191 # &quot;domain&quot;: &quot;googleapis.com&quot;
192 # &quot;metadata&quot;: {
193 # &quot;resource&quot;: &quot;projects/123&quot;,
194 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
195 # }
196 # }
197 #
198 # This response indicates that the pubsub.googleapis.com API is not enabled.
199 #
200 # Example of an error that is returned when attempting to create a Spanner
201 # instance in a region that is out of stock:
202 #
203 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
204 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
205 # &quot;metadata&quot;: {
206 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
207 # }
208 # }
209 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
210 # is typically the registered service name of the tool or product that
211 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
212 # generated by some common infrastructure, the error domain must be a
213 # globally unique value that identifies the infrastructure. For Google API
214 # infrastructure, the error domain is &quot;googleapis.com&quot;.
215 &quot;metadatas&quot;: { # Additional structured details about this error.
216 #
217 # Keys must match a regular expression of `a-z+` but should
218 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
219 # length. When identifying the current value of an exceeded limit, the units
220 # should be contained in the key, not the value. For example, rather than
221 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
222 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
223 # instances that can be created in a single (batch) request.
224 &quot;a_key&quot;: &quot;A String&quot;,
225 },
226 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
227 # proximate cause of the error. Error reasons are unique within a particular
228 # domain of errors. This should be at most 63 characters and match a
229 # regular expression of `A-Z+[A-Z0-9]`, which represents
230 # UPPER_SNAKE_CASE.
231 },
232 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
233 #
234 # For example, if a quota check failed with an error indicating the calling
235 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
236 # directly to the right place in the developer console to flip the bit.
237 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
238 { # Describes a URL link.
239 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
240 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
241 },
242 ],
243 },
244 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
245 # which can be attached to an RPC error.
246 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
247 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
248 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
249 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
250 },
251 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
252 &quot;dimensions&quot;: { # The map holding related quota dimensions.
253 &quot;a_key&quot;: &quot;A String&quot;,
254 },
255 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
256 # type or metric.
257 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
258 # or metric.
259 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
260 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
261 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
262 },
263 },
264 ],
265 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
266 # This property is optional.
267 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
268 },
269 ],
270 },
271 &quot;getVersionOperationMetadata&quot;: {
272 &quot;inlineSbomInfo&quot;: {
273 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
274 # appropriate identifiers.
275 &quot;a_key&quot;: &quot;A String&quot;,
276 },
277 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
278 # identifiers.
279 &quot;a_key&quot;: &quot;A String&quot;,
280 },
281 },
282 },
283 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
284 # message that was returned, such as `NOT FOUND`.
285 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
286 # status code that was returned. For example, a `404` means the
287 # resource was not found.
288 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
289 # defined by the server.
290 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
291 # This value is inRFC3339
292 # text format.
293 &quot;instancesBulkInsertOperationMetadata&quot;: {
294 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
295 # Example key: zones/us-central1-a
296 &quot;a_key&quot;: {
297 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
298 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
299 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
300 # error.
301 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
302 # if the flow is rolling forward or rolling back.
303 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
304 },
305 },
306 },
307 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
308 # Operation resources.
309 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
310 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
311 # group of operations results from a `bulkInsert` API request.
312 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
313 # `update`, or `delete`, and so on.
314 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
315 # There is no requirement that this be linear or support any granularity of
316 # operations. This should not be used to guess when the operation will be
317 # complete. This number should monotonically increase as the operation
318 # progresses.
319 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
320 # applicable when performing regional operations.
321 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
322 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
323 # this field will contain information on all underlying zonal actions and
324 # their state.
325 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
326 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
327 # Example key: zones/us-central1-a
328 &quot;a_key&quot;: {
329 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
330 # populated.
331 # different programming environments, including REST APIs and RPC APIs. It is
332 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
333 # three pieces of data: error code, error message, and error details.
334 #
335 # You can find out more about this error model and how to work with it in the
336 # [API Design Guide](https://cloud.google.com/apis/design/errors).
337 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
338 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
339 # message types for APIs to use.
340 {
341 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
342 },
343 ],
344 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
345 # user-facing error message should be localized and sent in the
346 # google.rpc.Status.details field, or localized by the client.
347 },
348 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
349 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
350 },
351 },
352 },
353 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
354 # This value is inRFC3339
355 # text format.
356 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
357 # following:
358 # `PENDING`, `RUNNING`, or `DONE`.
359 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
360 # operation.
361 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
362 # of the target resource.
363 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
364 # operations related to creating a snapshot, this points to the disk
365 # that the snapshot was created from.
366 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
367 # `[email protected]` or
368 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
369 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
370 # operation, this field will be populated.
371 {
372 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
373 # Engine returns NO_RESULTS_ON_PAGE if there
374 # are no results in the response.
375 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
376 # value format. For example:
377 #
378 # &quot;data&quot;: [
379 # {
380 # &quot;key&quot;: &quot;scope&quot;,
381 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
382 # }
383 {
384 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
385 # returned. For example, for warnings where there are no results in a list
386 # request for a particular zone, this key might be scope and
387 # the key value might be the zone name. Other examples might be a key
388 # indicating a deprecated resource and a suggested replacement, or a
389 # warning about invalid network settings (for example, if an instance
390 # attempts to perform IP forwarding but is not enabled for IP forwarding).
391 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
392 },
393 ],
394 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
395 },
396 ],
397 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
398 # applicable when performing per-zone operations.
399 }</pre>
400 </div>
401
402 <div class="method">
403 <code class="details" id="get">get(project, firewall, x__xgafv=None)</code>
404 <pre>Returns the specified firewall.
405
406 Args:
407 project: string, Project ID for this request. (required)
408 firewall: string, Name of the firewall rule to return. (required)
409 x__xgafv: string, V1 error format.
410 Allowed values
411 1 - v1 error format
412 2 - v2 error format
413
414 Returns:
415 An object of the form:
416
417 { # Represents a Firewall Rule resource.
418 #
419 # Firewall rules allow or deny ingress traffic to, and egress traffic from your
420 # instances. For more information, readFirewall rules.
421 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a
422 # protocol and port-range tuple that describes a permitted connection.
423 {
424 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
425 # required when creating a firewall rule. This value can either be one of the
426 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
427 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
428 # This field is only applicable for the UDP or TCP protocol.
429 # Each entry must be either an integer or a range.
430 # If not specified, this rule applies to connections through any port.
431 #
432 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
433 # and [&quot;12345-12349&quot;].
434 &quot;A String&quot;,
435 ],
436 },
437 ],
438 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
439 # text format.
440 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a
441 # protocol and port-range tuple that describes a denied connection.
442 {
443 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
444 # required when creating a firewall rule. This value can either be one of the
445 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
446 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
447 # This field is only applicable for the UDP or TCP protocol.
448 # Each entry must be either an integer or a range.
449 # If not specified, this rule applies to connections through any port.
450 #
451 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
452 # and [&quot;12345-12349&quot;].
453 &quot;A String&quot;,
454 ],
455 },
456 ],
457 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you
458 # create the resource.
459 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to
460 # traffic that has destination IP address in these ranges. These ranges must
461 # be expressed inCIDR format. Both IPv4 and IPv6 are 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
465 # `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot
466 # specify the sourceTags fields.
467 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the
468 # firewall rule is not enforced and the network behaves as if it did not
469 # exist. If this is unspecified, the firewall rule will be enabled.
470 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
471 # defined by the server.
472 &quot;kind&quot;: &quot;compute#firewall&quot;, # Output only. [Output Only] Type of the resource. Always compute#firewall
473 # for firewall rules.
474 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If
475 # logging is enabled, logs will be exported to Cloud Logging.
476 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall
477 # rule.
478 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if
479 # logging is enabled for that rule. This field denotes whether to include
480 # or exclude metadata for firewall logs.
481 },
482 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created.
483 # The name must be 1-63 characters long, and comply withRFC1035.
484 # Specifically, the name must be 1-63 characters long and match the regular
485 # expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character
486 # must be a lowercase letter, and all following characters (except for the
487 # last character) must be a dash, lowercase letter, or digit. The last
488 # character must be a lowercase letter or digit.
489 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not
490 # specified when creating a firewall rule, the default network
491 # is used:
492 #
493 # global/networks/default
494 #
495 # If you choose to specify this field, you can specify the network as a full
496 # or partial URL. For example, the following are all valid URLs:
497 #
498 # -
499 # https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
500 # - projects/myproject/global/networks/my-network
501 # - global/networks/default
502 &quot;params&quot;: { # Additional firewall parameters. # Input only. [Input Only] Additional params passed with the request, but not persisted
503 # as part of resource payload.
504 &quot;resourceManagerTags&quot;: { # Tag keys/values directly bound to this resource.
505 # Tag keys and values have the same definition as resource
506 # manager tags. The field is allowed for INSERT
507 # only. The keys/values to set on the resource should be specified in
508 # either ID { : } or Namespaced format
509 # { : }.
510 # For example the following are valid inputs:
511 # * {&quot;tagKeys/333&quot; : &quot;tagValues/444&quot;, &quot;tagKeys/123&quot; : &quot;tagValues/456&quot;}
512 # * {&quot;123/environment&quot; : &quot;production&quot;, &quot;345/abc&quot; : &quot;xyz&quot;}
513 # Note:
514 # * Invalid combinations of ID &amp; namespaced format is not supported. For
515 # instance: {&quot;123/environment&quot; : &quot;tagValues/444&quot;} is invalid.
516 &quot;a_key&quot;: &quot;A String&quot;,
517 },
518 },
519 &quot;priority&quot;: 42, # Priority for this rule.
520 # This is an integer between `0` and `65535`, both inclusive.
521 # The default value is `1000`.
522 # Relative priorities determine which rule takes effect if multiple rules
523 # apply. Lower values indicate higher priority. For example, a rule with
524 # priority `0` has higher precedence than a rule with priority `1`.
525 # DENY rules take precedence over ALLOW rules if they have equal priority.
526 # Note that VPC networks have implied
527 # rules with a priority of `65535`. To avoid conflicts with the implied
528 # rules, use a priority number less than `65535`.
529 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
530 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic
531 # that has a source IP address in these ranges. These ranges must be
532 # expressed inCIDR format. One or both of sourceRanges
533 # and sourceTags may be set.
534 # If both fields are set, the rule applies to traffic that has a
535 # source IP address within sourceRanges OR a source IP
536 # from a resource with a matching tag listed in thesourceTags field. The connection does not need to match
537 # both fields for the rule to
538 # apply. Both IPv4 and IPv6 are supported.
539 &quot;A String&quot;,
540 ],
541 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to
542 # traffic originating from an instance with a service account in this list.
543 # Source service accounts cannot be used to control traffic to an instance&#x27;s
544 # external IP address because service accounts are associated with an
545 # instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts.
546 # If both are set, the firewall applies to traffic that
547 # has a source IP address within the sourceRanges OR a source
548 # IP that belongs to an instance with service account listed insourceServiceAccount. The connection does not need to match
549 # both fields for the firewall to apply.sourceServiceAccounts cannot be used at the same time assourceTags or targetTags.
550 &quot;A String&quot;,
551 ],
552 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic
553 # with source IPs that match the primary network interfaces of VM instances
554 # that have the tag and are in the same VPC network.
555 # Source tags cannot be used to control traffic to an instance&#x27;s external IP
556 # address, it only applies to traffic between instances in the same virtual
557 # network. Because tags are associated with instances, not IP addresses.
558 # One or both of sourceRanges and sourceTags may be
559 # set. If both fields are set, the firewall applies to traffic that has a
560 # source IP address within sourceRanges OR a source IP from a
561 # resource with a matching tag listed in the sourceTags
562 # field. The connection does not need to match both fields for the
563 # firewall to apply.
564 &quot;A String&quot;,
565 ],
566 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the
567 # network that may make network connections as specified inallowed[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags.
568 # If neither targetServiceAccounts nor targetTags
569 # are specified, the firewall rule applies to all instances on the specified
570 # network.
571 &quot;A String&quot;,
572 ],
573 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule
574 # applies to. If targetTags are specified, then the firewall
575 # rule applies only to instances in the VPC network that have one of those
576 # tags. If no targetTags are specified, the firewall rule
577 # applies to all instances on the specified network.
578 &quot;A String&quot;,
579 ],
580 }</pre>
581 </div>
582
583 <div class="method">
584 <code class="details" id="insert">insert(project, body=None, requestId=None, x__xgafv=None)</code>
585 <pre>Creates a firewall rule in the specified project using the data
586 included in the request.
587
588 Args:
589 project: string, Project ID for this request. (required)
590 body: object, The request body.
591 The object takes the form of:
592
593 { # Represents a Firewall Rule resource.
594 #
595 # Firewall rules allow or deny ingress traffic to, and egress traffic from your
596 # instances. For more information, readFirewall rules.
597 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a
598 # protocol and port-range tuple that describes a permitted connection.
599 {
600 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
601 # required when creating a firewall rule. This value can either be one of the
602 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
603 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
604 # This field is only applicable for the UDP or TCP protocol.
605 # Each entry must be either an integer or a range.
606 # If not specified, this rule applies to connections through any port.
607 #
608 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
609 # and [&quot;12345-12349&quot;].
610 &quot;A String&quot;,
611 ],
612 },
613 ],
614 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
615 # text format.
616 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a
617 # protocol and port-range tuple that describes a denied connection.
618 {
619 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
620 # required when creating a firewall rule. This value can either be one of the
621 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
622 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
623 # This field is only applicable for the UDP or TCP protocol.
624 # Each entry must be either an integer or a range.
625 # If not specified, this rule applies to connections through any port.
626 #
627 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
628 # and [&quot;12345-12349&quot;].
629 &quot;A String&quot;,
630 ],
631 },
632 ],
633 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you
634 # create the resource.
635 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to
636 # traffic that has destination IP address in these ranges. These ranges must
637 # be expressed inCIDR format. Both IPv4 and IPv6 are supported.
638 &quot;A String&quot;,
639 ],
640 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or
641 # `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot
642 # specify the sourceTags fields.
643 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the
644 # firewall rule is not enforced and the network behaves as if it did not
645 # exist. If this is unspecified, the firewall rule will be enabled.
646 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
647 # defined by the server.
648 &quot;kind&quot;: &quot;compute#firewall&quot;, # Output only. [Output Only] Type of the resource. Always compute#firewall
649 # for firewall rules.
650 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If
651 # logging is enabled, logs will be exported to Cloud Logging.
652 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall
653 # rule.
654 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if
655 # logging is enabled for that rule. This field denotes whether to include
656 # or exclude metadata for firewall logs.
657 },
658 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created.
659 # The name must be 1-63 characters long, and comply withRFC1035.
660 # Specifically, the name must be 1-63 characters long and match the regular
661 # expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character
662 # must be a lowercase letter, and all following characters (except for the
663 # last character) must be a dash, lowercase letter, or digit. The last
664 # character must be a lowercase letter or digit.
665 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not
666 # specified when creating a firewall rule, the default network
667 # is used:
668 #
669 # global/networks/default
670 #
671 # If you choose to specify this field, you can specify the network as a full
672 # or partial URL. For example, the following are all valid URLs:
673 #
674 # -
675 # https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
676 # - projects/myproject/global/networks/my-network
677 # - global/networks/default
678 &quot;params&quot;: { # Additional firewall parameters. # Input only. [Input Only] Additional params passed with the request, but not persisted
679 # as part of resource payload.
680 &quot;resourceManagerTags&quot;: { # Tag keys/values directly bound to this resource.
681 # Tag keys and values have the same definition as resource
682 # manager tags. The field is allowed for INSERT
683 # only. The keys/values to set on the resource should be specified in
684 # either ID { : } or Namespaced format
685 # { : }.
686 # For example the following are valid inputs:
687 # * {&quot;tagKeys/333&quot; : &quot;tagValues/444&quot;, &quot;tagKeys/123&quot; : &quot;tagValues/456&quot;}
688 # * {&quot;123/environment&quot; : &quot;production&quot;, &quot;345/abc&quot; : &quot;xyz&quot;}
689 # Note:
690 # * Invalid combinations of ID &amp; namespaced format is not supported. For
691 # instance: {&quot;123/environment&quot; : &quot;tagValues/444&quot;} is invalid.
692 &quot;a_key&quot;: &quot;A String&quot;,
693 },
694 },
695 &quot;priority&quot;: 42, # Priority for this rule.
696 # This is an integer between `0` and `65535`, both inclusive.
697 # The default value is `1000`.
698 # Relative priorities determine which rule takes effect if multiple rules
699 # apply. Lower values indicate higher priority. For example, a rule with
700 # priority `0` has higher precedence than a rule with priority `1`.
701 # DENY rules take precedence over ALLOW rules if they have equal priority.
702 # Note that VPC networks have implied
703 # rules with a priority of `65535`. To avoid conflicts with the implied
704 # rules, use a priority number less than `65535`.
705 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
706 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic
707 # that has a source IP address in these ranges. These ranges must be
708 # expressed inCIDR format. One or both of sourceRanges
709 # and sourceTags may be set.
710 # If both fields are set, the rule applies to traffic that has a
711 # source IP address within sourceRanges OR a source IP
712 # from a resource with a matching tag listed in thesourceTags field. The connection does not need to match
713 # both fields for the rule to
714 # apply. Both IPv4 and IPv6 are supported.
715 &quot;A String&quot;,
716 ],
717 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to
718 # traffic originating from an instance with a service account in this list.
719 # Source service accounts cannot be used to control traffic to an instance&#x27;s
720 # external IP address because service accounts are associated with an
721 # instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts.
722 # If both are set, the firewall applies to traffic that
723 # has a source IP address within the sourceRanges OR a source
724 # IP that belongs to an instance with service account listed insourceServiceAccount. The connection does not need to match
725 # both fields for the firewall to apply.sourceServiceAccounts cannot be used at the same time assourceTags or targetTags.
726 &quot;A String&quot;,
727 ],
728 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic
729 # with source IPs that match the primary network interfaces of VM instances
730 # that have the tag and are in the same VPC network.
731 # Source tags cannot be used to control traffic to an instance&#x27;s external IP
732 # address, it only applies to traffic between instances in the same virtual
733 # network. Because tags are associated with instances, not IP addresses.
734 # One or both of sourceRanges and sourceTags may be
735 # set. If both fields are set, the firewall applies to traffic that has a
736 # source IP address within sourceRanges OR a source IP from a
737 # resource with a matching tag listed in the sourceTags
738 # field. The connection does not need to match both fields for the
739 # firewall to apply.
740 &quot;A String&quot;,
741 ],
742 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the
743 # network that may make network connections as specified inallowed[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags.
744 # If neither targetServiceAccounts nor targetTags
745 # are specified, the firewall rule applies to all instances on the specified
746 # network.
747 &quot;A String&quot;,
748 ],
749 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule
750 # applies to. If targetTags are specified, then the firewall
751 # rule applies only to instances in the VPC network that have one of those
752 # tags. If no targetTags are specified, the firewall rule
753 # applies to all instances on the specified network.
754 &quot;A String&quot;,
755 ],
756 }
757
758 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
759 that if you must retry your request, the server will know to ignore the
760 request if it has already been completed.
761
762 For example, consider a situation where you make an initial request and
763 the request times out. If you make the request again with the same
764 request ID, the server can check if original operation with the same
765 request ID was received, and if so, will ignore the second request. This
766 prevents clients from accidentally creating duplicate commitments.
767
768 The request ID must be
769 a valid UUID with the exception that zero UUID is not supported
770 (00000000-0000-0000-0000-000000000000).
771 x__xgafv: string, V1 error format.
772 Allowed values
773 1 - v1 error format
774 2 - v2 error format
775
776 Returns:
777 An object of the form:
778
779 { # Represents an Operation resource.
780 #
781 # Google Compute Engine has three Operation resources:
782 #
783 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
784 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
785 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
786 #
787 # You can use an operation resource to manage asynchronous API requests.
788 # For more information, readHandling
789 # API responses.
790 #
791 # Operations can be global, regional or zonal.
792 #
793 # - For global operations, use the `globalOperations`
794 # resource.
795 # - For regional operations, use the
796 # `regionOperations` resource.
797 # - For zonal operations, use
798 # the `zoneOperations` resource.
799 #
800 #
801 #
802 # For more information, read
803 # Global, Regional, and Zonal Resources.
804 #
805 # Note that completed Operation resources have a limited
806 # retention period.
807 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
808 # Not present otherwise.
809 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
810 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
811 # set when the operation is created.
812 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
813 # text format.
814 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
815 # this field will be populated.
816 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
817 # operation.
818 {
819 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
820 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
821 # details. There is a set of defined message types to use for providing
822 # details.The syntax depends on the error code. For example,
823 # QuotaExceededInfo will have details when the error code is
824 # QUOTA_EXCEEDED.
825 {
826 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
827 #
828 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
829 # is not enabled:
830 #
831 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
832 # &quot;domain&quot;: &quot;googleapis.com&quot;
833 # &quot;metadata&quot;: {
834 # &quot;resource&quot;: &quot;projects/123&quot;,
835 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
836 # }
837 # }
838 #
839 # This response indicates that the pubsub.googleapis.com API is not enabled.
840 #
841 # Example of an error that is returned when attempting to create a Spanner
842 # instance in a region that is out of stock:
843 #
844 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
845 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
846 # &quot;metadata&quot;: {
847 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
848 # }
849 # }
850 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
851 # is typically the registered service name of the tool or product that
852 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
853 # generated by some common infrastructure, the error domain must be a
854 # globally unique value that identifies the infrastructure. For Google API
855 # infrastructure, the error domain is &quot;googleapis.com&quot;.
856 &quot;metadatas&quot;: { # Additional structured details about this error.
857 #
858 # Keys must match a regular expression of `a-z+` but should
859 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
860 # length. When identifying the current value of an exceeded limit, the units
861 # should be contained in the key, not the value. For example, rather than
862 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
863 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
864 # instances that can be created in a single (batch) request.
865 &quot;a_key&quot;: &quot;A String&quot;,
866 },
867 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
868 # proximate cause of the error. Error reasons are unique within a particular
869 # domain of errors. This should be at most 63 characters and match a
870 # regular expression of `A-Z+[A-Z0-9]`, which represents
871 # UPPER_SNAKE_CASE.
872 },
873 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
874 #
875 # For example, if a quota check failed with an error indicating the calling
876 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
877 # directly to the right place in the developer console to flip the bit.
878 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
879 { # Describes a URL link.
880 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
881 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
882 },
883 ],
884 },
885 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
886 # which can be attached to an RPC error.
887 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
888 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
889 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
890 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
891 },
892 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
893 &quot;dimensions&quot;: { # The map holding related quota dimensions.
894 &quot;a_key&quot;: &quot;A String&quot;,
895 },
896 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
897 # type or metric.
898 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
899 # or metric.
900 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
901 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
902 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
903 },
904 },
905 ],
906 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
907 # This property is optional.
908 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
909 },
910 ],
911 },
912 &quot;getVersionOperationMetadata&quot;: {
913 &quot;inlineSbomInfo&quot;: {
914 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
915 # appropriate identifiers.
916 &quot;a_key&quot;: &quot;A String&quot;,
917 },
918 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
919 # identifiers.
920 &quot;a_key&quot;: &quot;A String&quot;,
921 },
922 },
923 },
924 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
925 # message that was returned, such as `NOT FOUND`.
926 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
927 # status code that was returned. For example, a `404` means the
928 # resource was not found.
929 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
930 # defined by the server.
931 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
932 # This value is inRFC3339
933 # text format.
934 &quot;instancesBulkInsertOperationMetadata&quot;: {
935 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
936 # Example key: zones/us-central1-a
937 &quot;a_key&quot;: {
938 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
939 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
940 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
941 # error.
942 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
943 # if the flow is rolling forward or rolling back.
944 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
945 },
946 },
947 },
948 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
949 # Operation resources.
950 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
951 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
952 # group of operations results from a `bulkInsert` API request.
953 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
954 # `update`, or `delete`, and so on.
955 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
956 # There is no requirement that this be linear or support any granularity of
957 # operations. This should not be used to guess when the operation will be
958 # complete. This number should monotonically increase as the operation
959 # progresses.
960 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
961 # applicable when performing regional operations.
962 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
963 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
964 # this field will contain information on all underlying zonal actions and
965 # their state.
966 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
967 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
968 # Example key: zones/us-central1-a
969 &quot;a_key&quot;: {
970 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
971 # populated.
972 # different programming environments, including REST APIs and RPC APIs. It is
973 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
974 # three pieces of data: error code, error message, and error details.
975 #
976 # You can find out more about this error model and how to work with it in the
977 # [API Design Guide](https://cloud.google.com/apis/design/errors).
978 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
979 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
980 # message types for APIs to use.
981 {
982 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
983 },
984 ],
985 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
986 # user-facing error message should be localized and sent in the
987 # google.rpc.Status.details field, or localized by the client.
988 },
989 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
990 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
991 },
992 },
993 },
994 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
995 # This value is inRFC3339
996 # text format.
997 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
998 # following:
999 # `PENDING`, `RUNNING`, or `DONE`.
1000 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1001 # operation.
1002 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1003 # of the target resource.
1004 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1005 # operations related to creating a snapshot, this points to the disk
1006 # that the snapshot was created from.
1007 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1008 # `[email protected]` or
1009 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1010 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1011 # operation, this field will be populated.
1012 {
1013 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1014 # Engine returns NO_RESULTS_ON_PAGE if there
1015 # are no results in the response.
1016 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1017 # value format. For example:
1018 #
1019 # &quot;data&quot;: [
1020 # {
1021 # &quot;key&quot;: &quot;scope&quot;,
1022 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1023 # }
1024 {
1025 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1026 # returned. For example, for warnings where there are no results in a list
1027 # request for a particular zone, this key might be scope and
1028 # the key value might be the zone name. Other examples might be a key
1029 # indicating a deprecated resource and a suggested replacement, or a
1030 # warning about invalid network settings (for example, if an instance
1031 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1032 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1033 },
1034 ],
1035 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1036 },
1037 ],
1038 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1039 # applicable when performing per-zone operations.
1040 }</pre>
1041 </div>
1042
1043 <div class="method">
1044 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code>
1045 <pre>Retrieves the list of firewall rules available to the specified
1046 project.
1047
1048 Args:
1049 project: string, Project ID for this request. (required)
1050 filter: string, A filter expression that filters resources listed in the response. Most
1051 Compute resources support two types of filter expressions:
1052 expressions that support regular expressions and expressions that follow
1053 API improvement proposal AIP-160.
1054 These two types of filter expressions cannot be mixed in one request.
1055
1056 If you want to use AIP-160, your expression must specify the field name, an
1057 operator, and the value that you want to use for filtering. The value
1058 must be a string, a number, or a boolean. The operator
1059 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
1060
1061 For example, if you are filtering Compute Engine instances, you can
1062 exclude instances named `example-instance` by specifying
1063 `name != example-instance`.
1064
1065 The `:*` comparison can be used to test whether a key has been defined.
1066 For example, to find all objects with `owner` label use:
1067 ```
1068 labels.owner:*
1069 ```
1070
1071 You can also filter nested fields. For example, you could specify
1072 `scheduling.automaticRestart = false` to include instances only
1073 if they are not scheduled for automatic restarts. You can use filtering
1074 on nested fields to filter based onresource labels.
1075
1076 To filter on multiple expressions, provide each separate expression within
1077 parentheses. For example:
1078 ```
1079 (scheduling.automaticRestart = true)
1080 (cpuPlatform = &quot;Intel Skylake&quot;)
1081 ```
1082 By default, each expression is an `AND` expression. However, you
1083 can include `AND` and `OR` expressions explicitly.
1084 For example:
1085 ```
1086 (cpuPlatform = &quot;Intel Skylake&quot;) OR
1087 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
1088 (scheduling.automaticRestart = true)
1089 ```
1090
1091 If you want to use a regular expression, use the `eq` (equal) or `ne`
1092 (not equal) operator against a single un-parenthesized expression with or
1093 without quotes or against multiple parenthesized expressions. Examples:
1094
1095 `fieldname eq unquoted literal`
1096 `fieldname eq &#x27;single quoted literal&#x27;`
1097 `fieldname eq &quot;double quoted literal&quot;`
1098 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
1099
1100 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
1101 The literal value must match the entire field.
1102
1103 For example, to filter for instances that do not end with name &quot;instance&quot;,
1104 you would use `name ne .*instance`.
1105
1106 You cannot combine constraints on multiple fields using regular
1107 expressions.
1108 maxResults: integer, The maximum number of results per page that should be returned.
1109 If the number of available results is larger than `maxResults`,
1110 Compute Engine returns a `nextPageToken` that can be used to get
1111 the next page of results in subsequent list requests. Acceptable values are
1112 `0` to `500`, inclusive. (Default: `500`)
1113 orderBy: string, Sorts list results by a certain order. By default, results
1114 are returned in alphanumerical order based on the resource name.
1115
1116 You can also sort results in descending order based on the creation
1117 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
1118 results based on the `creationTimestamp` field in
1119 reverse chronological order (newest result first). Use this to sort
1120 resources like operations so that the newest operation is returned first.
1121
1122 Currently, only sorting by `name` or
1123 `creationTimestamp desc` is supported.
1124 pageToken: string, Specifies a page token to use. Set `pageToken` to the
1125 `nextPageToken` returned by a previous list request to get
1126 the next page of results.
1127 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
1128 of failure. The default value is false.
1129
1130 For example, when partial success behavior is enabled, aggregatedList for a
1131 single zone scope either returns all resources in the zone or no resources,
1132 with an error code.
1133 x__xgafv: string, V1 error format.
1134 Allowed values
1135 1 - v1 error format
1136 2 - v2 error format
1137
1138 Returns:
1139 An object of the form:
1140
1141 { # Contains a list of firewalls.
1142 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1143 &quot;items&quot;: [ # A list of Firewall resources.
1144 { # Represents a Firewall Rule resource.
1145 #
1146 # Firewall rules allow or deny ingress traffic to, and egress traffic from your
1147 # instances. For more information, readFirewall rules.
1148 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a
1149 # protocol and port-range tuple that describes a permitted connection.
1150 {
1151 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1152 # required when creating a firewall rule. This value can either be one of the
1153 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
1154 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
1155 # This field is only applicable for the UDP or TCP protocol.
1156 # Each entry must be either an integer or a range.
1157 # If not specified, this rule applies to connections through any port.
1158 #
1159 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
1160 # and [&quot;12345-12349&quot;].
1161 &quot;A String&quot;,
1162 ],
1163 },
1164 ],
1165 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1166 # text format.
1167 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a
1168 # protocol and port-range tuple that describes a denied connection.
1169 {
1170 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1171 # required when creating a firewall rule. This value can either be one of the
1172 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
1173 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
1174 # This field is only applicable for the UDP or TCP protocol.
1175 # Each entry must be either an integer or a range.
1176 # If not specified, this rule applies to connections through any port.
1177 #
1178 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
1179 # and [&quot;12345-12349&quot;].
1180 &quot;A String&quot;,
1181 ],
1182 },
1183 ],
1184 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you
1185 # create the resource.
1186 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to
1187 # traffic that has destination IP address in these ranges. These ranges must
1188 # be expressed inCIDR format. Both IPv4 and IPv6 are supported.
1189 &quot;A String&quot;,
1190 ],
1191 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or
1192 # `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot
1193 # specify the sourceTags fields.
1194 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the
1195 # firewall rule is not enforced and the network behaves as if it did not
1196 # exist. If this is unspecified, the firewall rule will be enabled.
1197 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1198 # defined by the server.
1199 &quot;kind&quot;: &quot;compute#firewall&quot;, # Output only. [Output Only] Type of the resource. Always compute#firewall
1200 # for firewall rules.
1201 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If
1202 # logging is enabled, logs will be exported to Cloud Logging.
1203 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall
1204 # rule.
1205 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if
1206 # logging is enabled for that rule. This field denotes whether to include
1207 # or exclude metadata for firewall logs.
1208 },
1209 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created.
1210 # The name must be 1-63 characters long, and comply withRFC1035.
1211 # Specifically, the name must be 1-63 characters long and match the regular
1212 # expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character
1213 # must be a lowercase letter, and all following characters (except for the
1214 # last character) must be a dash, lowercase letter, or digit. The last
1215 # character must be a lowercase letter or digit.
1216 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not
1217 # specified when creating a firewall rule, the default network
1218 # is used:
1219 #
1220 # global/networks/default
1221 #
1222 # If you choose to specify this field, you can specify the network as a full
1223 # or partial URL. For example, the following are all valid URLs:
1224 #
1225 # -
1226 # https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
1227 # - projects/myproject/global/networks/my-network
1228 # - global/networks/default
1229 &quot;params&quot;: { # Additional firewall parameters. # Input only. [Input Only] Additional params passed with the request, but not persisted
1230 # as part of resource payload.
1231 &quot;resourceManagerTags&quot;: { # Tag keys/values directly bound to this resource.
1232 # Tag keys and values have the same definition as resource
1233 # manager tags. The field is allowed for INSERT
1234 # only. The keys/values to set on the resource should be specified in
1235 # either ID { : } or Namespaced format
1236 # { : }.
1237 # For example the following are valid inputs:
1238 # * {&quot;tagKeys/333&quot; : &quot;tagValues/444&quot;, &quot;tagKeys/123&quot; : &quot;tagValues/456&quot;}
1239 # * {&quot;123/environment&quot; : &quot;production&quot;, &quot;345/abc&quot; : &quot;xyz&quot;}
1240 # Note:
1241 # * Invalid combinations of ID &amp; namespaced format is not supported. For
1242 # instance: {&quot;123/environment&quot; : &quot;tagValues/444&quot;} is invalid.
1243 &quot;a_key&quot;: &quot;A String&quot;,
1244 },
1245 },
1246 &quot;priority&quot;: 42, # Priority for this rule.
1247 # This is an integer between `0` and `65535`, both inclusive.
1248 # The default value is `1000`.
1249 # Relative priorities determine which rule takes effect if multiple rules
1250 # apply. Lower values indicate higher priority. For example, a rule with
1251 # priority `0` has higher precedence than a rule with priority `1`.
1252 # DENY rules take precedence over ALLOW rules if they have equal priority.
1253 # Note that VPC networks have implied
1254 # rules with a priority of `65535`. To avoid conflicts with the implied
1255 # rules, use a priority number less than `65535`.
1256 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1257 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic
1258 # that has a source IP address in these ranges. These ranges must be
1259 # expressed inCIDR format. One or both of sourceRanges
1260 # and sourceTags may be set.
1261 # If both fields are set, the rule applies to traffic that has a
1262 # source IP address within sourceRanges OR a source IP
1263 # from a resource with a matching tag listed in thesourceTags field. The connection does not need to match
1264 # both fields for the rule to
1265 # apply. Both IPv4 and IPv6 are supported.
1266 &quot;A String&quot;,
1267 ],
1268 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to
1269 # traffic originating from an instance with a service account in this list.
1270 # Source service accounts cannot be used to control traffic to an instance&#x27;s
1271 # external IP address because service accounts are associated with an
1272 # instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts.
1273 # If both are set, the firewall applies to traffic that
1274 # has a source IP address within the sourceRanges OR a source
1275 # IP that belongs to an instance with service account listed insourceServiceAccount. The connection does not need to match
1276 # both fields for the firewall to apply.sourceServiceAccounts cannot be used at the same time assourceTags or targetTags.
1277 &quot;A String&quot;,
1278 ],
1279 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic
1280 # with source IPs that match the primary network interfaces of VM instances
1281 # that have the tag and are in the same VPC network.
1282 # Source tags cannot be used to control traffic to an instance&#x27;s external IP
1283 # address, it only applies to traffic between instances in the same virtual
1284 # network. Because tags are associated with instances, not IP addresses.
1285 # One or both of sourceRanges and sourceTags may be
1286 # set. If both fields are set, the firewall applies to traffic that has a
1287 # source IP address within sourceRanges OR a source IP from a
1288 # resource with a matching tag listed in the sourceTags
1289 # field. The connection does not need to match both fields for the
1290 # firewall to apply.
1291 &quot;A String&quot;,
1292 ],
1293 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the
1294 # network that may make network connections as specified inallowed[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags.
1295 # If neither targetServiceAccounts nor targetTags
1296 # are specified, the firewall rule applies to all instances on the specified
1297 # network.
1298 &quot;A String&quot;,
1299 ],
1300 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule
1301 # applies to. If targetTags are specified, then the firewall
1302 # rule applies only to instances in the VPC network that have one of those
1303 # tags. If no targetTags are specified, the firewall rule
1304 # applies to all instances on the specified network.
1305 &quot;A String&quot;,
1306 ],
1307 },
1308 ],
1309 &quot;kind&quot;: &quot;compute#firewallList&quot;, # Output only. [Output Only] Type of resource. Always compute#firewallList
1310 # for lists of firewalls.
1311 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
1312 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
1313 # the query parameter pageToken in the next list request.
1314 # Subsequent list requests will have their own nextPageToken to
1315 # continue paging through the results.
1316 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource.
1317 &quot;warning&quot;: { # [Output Only] Informational warning message.
1318 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1319 # Engine returns NO_RESULTS_ON_PAGE if there
1320 # are no results in the response.
1321 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1322 # value format. For example:
1323 #
1324 # &quot;data&quot;: [
1325 # {
1326 # &quot;key&quot;: &quot;scope&quot;,
1327 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1328 # }
1329 {
1330 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1331 # returned. For example, for warnings where there are no results in a list
1332 # request for a particular zone, this key might be scope and
1333 # the key value might be the zone name. Other examples might be a key
1334 # indicating a deprecated resource and a suggested replacement, or a
1335 # warning about invalid network settings (for example, if an instance
1336 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1337 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1338 },
1339 ],
1340 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1341 },
1342 }</pre>
1343 </div>
1344
1345 <div class="method">
1346 <code class="details" id="list_next">list_next()</code>
1347 <pre>Retrieves the next page of results.
1348
1349 Args:
1350 previous_request: The request for the previous page. (required)
1351 previous_response: The response from the request for the previous page. (required)
1352
1353 Returns:
1354 A request object that you can call &#x27;execute()&#x27; on to request the next
1355 page. Returns None if there are no more items in the collection.
1356 </pre>
1357 </div>
1358
1359 <div class="method">
1360 <code class="details" id="patch">patch(project, firewall, body=None, requestId=None, x__xgafv=None)</code>
1361 <pre>Updates the specified firewall rule with the data included in the
1362 request. This method supportsPATCH
1363 semantics and uses theJSON merge
1364 patch format and processing rules.
1365
1366 Args:
1367 project: string, Project ID for this request. (required)
1368 firewall: string, Name of the firewall rule to patch. (required)
1369 body: object, The request body.
1370 The object takes the form of:
1371
1372 { # Represents a Firewall Rule resource.
1373 #
1374 # Firewall rules allow or deny ingress traffic to, and egress traffic from your
1375 # instances. For more information, readFirewall rules.
1376 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a
1377 # protocol and port-range tuple that describes a permitted connection.
1378 {
1379 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1380 # required when creating a firewall rule. This value can either be one of the
1381 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
1382 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
1383 # This field is only applicable for the UDP or TCP protocol.
1384 # Each entry must be either an integer or a range.
1385 # If not specified, this rule applies to connections through any port.
1386 #
1387 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
1388 # and [&quot;12345-12349&quot;].
1389 &quot;A String&quot;,
1390 ],
1391 },
1392 ],
1393 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1394 # text format.
1395 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a
1396 # protocol and port-range tuple that describes a denied connection.
1397 {
1398 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1399 # required when creating a firewall rule. This value can either be one of the
1400 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
1401 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
1402 # This field is only applicable for the UDP or TCP protocol.
1403 # Each entry must be either an integer or a range.
1404 # If not specified, this rule applies to connections through any port.
1405 #
1406 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
1407 # and [&quot;12345-12349&quot;].
1408 &quot;A String&quot;,
1409 ],
1410 },
1411 ],
1412 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you
1413 # create the resource.
1414 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to
1415 # traffic that has destination IP address in these ranges. These ranges must
1416 # be expressed inCIDR format. Both IPv4 and IPv6 are supported.
1417 &quot;A String&quot;,
1418 ],
1419 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or
1420 # `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot
1421 # specify the sourceTags fields.
1422 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the
1423 # firewall rule is not enforced and the network behaves as if it did not
1424 # exist. If this is unspecified, the firewall rule will be enabled.
1425 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1426 # defined by the server.
1427 &quot;kind&quot;: &quot;compute#firewall&quot;, # Output only. [Output Only] Type of the resource. Always compute#firewall
1428 # for firewall rules.
1429 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If
1430 # logging is enabled, logs will be exported to Cloud Logging.
1431 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall
1432 # rule.
1433 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if
1434 # logging is enabled for that rule. This field denotes whether to include
1435 # or exclude metadata for firewall logs.
1436 },
1437 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created.
1438 # The name must be 1-63 characters long, and comply withRFC1035.
1439 # Specifically, the name must be 1-63 characters long and match the regular
1440 # expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character
1441 # must be a lowercase letter, and all following characters (except for the
1442 # last character) must be a dash, lowercase letter, or digit. The last
1443 # character must be a lowercase letter or digit.
1444 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not
1445 # specified when creating a firewall rule, the default network
1446 # is used:
1447 #
1448 # global/networks/default
1449 #
1450 # If you choose to specify this field, you can specify the network as a full
1451 # or partial URL. For example, the following are all valid URLs:
1452 #
1453 # -
1454 # https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
1455 # - projects/myproject/global/networks/my-network
1456 # - global/networks/default
1457 &quot;params&quot;: { # Additional firewall parameters. # Input only. [Input Only] Additional params passed with the request, but not persisted
1458 # as part of resource payload.
1459 &quot;resourceManagerTags&quot;: { # Tag keys/values directly bound to this resource.
1460 # Tag keys and values have the same definition as resource
1461 # manager tags. The field is allowed for INSERT
1462 # only. The keys/values to set on the resource should be specified in
1463 # either ID { : } or Namespaced format
1464 # { : }.
1465 # For example the following are valid inputs:
1466 # * {&quot;tagKeys/333&quot; : &quot;tagValues/444&quot;, &quot;tagKeys/123&quot; : &quot;tagValues/456&quot;}
1467 # * {&quot;123/environment&quot; : &quot;production&quot;, &quot;345/abc&quot; : &quot;xyz&quot;}
1468 # Note:
1469 # * Invalid combinations of ID &amp; namespaced format is not supported. For
1470 # instance: {&quot;123/environment&quot; : &quot;tagValues/444&quot;} is invalid.
1471 &quot;a_key&quot;: &quot;A String&quot;,
1472 },
1473 },
1474 &quot;priority&quot;: 42, # Priority for this rule.
1475 # This is an integer between `0` and `65535`, both inclusive.
1476 # The default value is `1000`.
1477 # Relative priorities determine which rule takes effect if multiple rules
1478 # apply. Lower values indicate higher priority. For example, a rule with
1479 # priority `0` has higher precedence than a rule with priority `1`.
1480 # DENY rules take precedence over ALLOW rules if they have equal priority.
1481 # Note that VPC networks have implied
1482 # rules with a priority of `65535`. To avoid conflicts with the implied
1483 # rules, use a priority number less than `65535`.
1484 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1485 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic
1486 # that has a source IP address in these ranges. These ranges must be
1487 # expressed inCIDR format. One or both of sourceRanges
1488 # and sourceTags may be set.
1489 # If both fields are set, the rule applies to traffic that has a
1490 # source IP address within sourceRanges OR a source IP
1491 # from a resource with a matching tag listed in thesourceTags field. The connection does not need to match
1492 # both fields for the rule to
1493 # apply. Both IPv4 and IPv6 are supported.
1494 &quot;A String&quot;,
1495 ],
1496 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to
1497 # traffic originating from an instance with a service account in this list.
1498 # Source service accounts cannot be used to control traffic to an instance&#x27;s
1499 # external IP address because service accounts are associated with an
1500 # instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts.
1501 # If both are set, the firewall applies to traffic that
1502 # has a source IP address within the sourceRanges OR a source
1503 # IP that belongs to an instance with service account listed insourceServiceAccount. The connection does not need to match
1504 # both fields for the firewall to apply.sourceServiceAccounts cannot be used at the same time assourceTags or targetTags.
1505 &quot;A String&quot;,
1506 ],
1507 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic
1508 # with source IPs that match the primary network interfaces of VM instances
1509 # that have the tag and are in the same VPC network.
1510 # Source tags cannot be used to control traffic to an instance&#x27;s external IP
1511 # address, it only applies to traffic between instances in the same virtual
1512 # network. Because tags are associated with instances, not IP addresses.
1513 # One or both of sourceRanges and sourceTags may be
1514 # set. If both fields are set, the firewall applies to traffic that has a
1515 # source IP address within sourceRanges OR a source IP from a
1516 # resource with a matching tag listed in the sourceTags
1517 # field. The connection does not need to match both fields for the
1518 # firewall to apply.
1519 &quot;A String&quot;,
1520 ],
1521 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the
1522 # network that may make network connections as specified inallowed[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags.
1523 # If neither targetServiceAccounts nor targetTags
1524 # are specified, the firewall rule applies to all instances on the specified
1525 # network.
1526 &quot;A String&quot;,
1527 ],
1528 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule
1529 # applies to. If targetTags are specified, then the firewall
1530 # rule applies only to instances in the VPC network that have one of those
1531 # tags. If no targetTags are specified, the firewall rule
1532 # applies to all instances on the specified network.
1533 &quot;A String&quot;,
1534 ],
1535 }
1536
1537 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1538 that if you must retry your request, the server will know to ignore the
1539 request if it has already been completed.
1540
1541 For example, consider a situation where you make an initial request and
1542 the request times out. If you make the request again with the same
1543 request ID, the server can check if original operation with the same
1544 request ID was received, and if so, will ignore the second request. This
1545 prevents clients from accidentally creating duplicate commitments.
1546
1547 The request ID must be
1548 a valid UUID with the exception that zero UUID is not supported
1549 (00000000-0000-0000-0000-000000000000).
1550 x__xgafv: string, V1 error format.
1551 Allowed values
1552 1 - v1 error format
1553 2 - v2 error format
1554
1555 Returns:
1556 An object of the form:
1557
1558 { # Represents an Operation resource.
1559 #
1560 # Google Compute Engine has three Operation resources:
1561 #
1562 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
1563 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
1564 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
1565 #
1566 # You can use an operation resource to manage asynchronous API requests.
1567 # For more information, readHandling
1568 # API responses.
1569 #
1570 # Operations can be global, regional or zonal.
1571 #
1572 # - For global operations, use the `globalOperations`
1573 # resource.
1574 # - For regional operations, use the
1575 # `regionOperations` resource.
1576 # - For zonal operations, use
1577 # the `zoneOperations` resource.
1578 #
1579 #
1580 #
1581 # For more information, read
1582 # Global, Regional, and Zonal Resources.
1583 #
1584 # Note that completed Operation resources have a limited
1585 # retention period.
1586 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1587 # Not present otherwise.
1588 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1589 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1590 # set when the operation is created.
1591 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1592 # text format.
1593 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1594 # this field will be populated.
1595 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1596 # operation.
1597 {
1598 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1599 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1600 # details. There is a set of defined message types to use for providing
1601 # details.The syntax depends on the error code. For example,
1602 # QuotaExceededInfo will have details when the error code is
1603 # QUOTA_EXCEEDED.
1604 {
1605 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1606 #
1607 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1608 # is not enabled:
1609 #
1610 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1611 # &quot;domain&quot;: &quot;googleapis.com&quot;
1612 # &quot;metadata&quot;: {
1613 # &quot;resource&quot;: &quot;projects/123&quot;,
1614 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1615 # }
1616 # }
1617 #
1618 # This response indicates that the pubsub.googleapis.com API is not enabled.
1619 #
1620 # Example of an error that is returned when attempting to create a Spanner
1621 # instance in a region that is out of stock:
1622 #
1623 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1624 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1625 # &quot;metadata&quot;: {
1626 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1627 # }
1628 # }
1629 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1630 # is typically the registered service name of the tool or product that
1631 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1632 # generated by some common infrastructure, the error domain must be a
1633 # globally unique value that identifies the infrastructure. For Google API
1634 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1635 &quot;metadatas&quot;: { # Additional structured details about this error.
1636 #
1637 # Keys must match a regular expression of `a-z+` but should
1638 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1639 # length. When identifying the current value of an exceeded limit, the units
1640 # should be contained in the key, not the value. For example, rather than
1641 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1642 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1643 # instances that can be created in a single (batch) request.
1644 &quot;a_key&quot;: &quot;A String&quot;,
1645 },
1646 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1647 # proximate cause of the error. Error reasons are unique within a particular
1648 # domain of errors. This should be at most 63 characters and match a
1649 # regular expression of `A-Z+[A-Z0-9]`, which represents
1650 # UPPER_SNAKE_CASE.
1651 },
1652 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1653 #
1654 # For example, if a quota check failed with an error indicating the calling
1655 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1656 # directly to the right place in the developer console to flip the bit.
1657 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1658 { # Describes a URL link.
1659 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1660 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1661 },
1662 ],
1663 },
1664 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1665 # which can be attached to an RPC error.
1666 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1667 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1668 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1669 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1670 },
1671 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1672 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1673 &quot;a_key&quot;: &quot;A String&quot;,
1674 },
1675 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1676 # type or metric.
1677 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1678 # or metric.
1679 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1680 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1681 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1682 },
1683 },
1684 ],
1685 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1686 # This property is optional.
1687 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1688 },
1689 ],
1690 },
1691 &quot;getVersionOperationMetadata&quot;: {
1692 &quot;inlineSbomInfo&quot;: {
1693 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1694 # appropriate identifiers.
1695 &quot;a_key&quot;: &quot;A String&quot;,
1696 },
1697 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1698 # identifiers.
1699 &quot;a_key&quot;: &quot;A String&quot;,
1700 },
1701 },
1702 },
1703 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1704 # message that was returned, such as `NOT FOUND`.
1705 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1706 # status code that was returned. For example, a `404` means the
1707 # resource was not found.
1708 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1709 # defined by the server.
1710 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1711 # This value is inRFC3339
1712 # text format.
1713 &quot;instancesBulkInsertOperationMetadata&quot;: {
1714 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1715 # Example key: zones/us-central1-a
1716 &quot;a_key&quot;: {
1717 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1718 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1719 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1720 # error.
1721 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1722 # if the flow is rolling forward or rolling back.
1723 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1724 },
1725 },
1726 },
1727 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1728 # Operation resources.
1729 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1730 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1731 # group of operations results from a `bulkInsert` API request.
1732 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1733 # `update`, or `delete`, and so on.
1734 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1735 # There is no requirement that this be linear or support any granularity of
1736 # operations. This should not be used to guess when the operation will be
1737 # complete. This number should monotonically increase as the operation
1738 # progresses.
1739 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1740 # applicable when performing regional operations.
1741 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1742 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1743 # this field will contain information on all underlying zonal actions and
1744 # their state.
1745 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1746 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1747 # Example key: zones/us-central1-a
1748 &quot;a_key&quot;: {
1749 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
1750 # populated.
1751 # different programming environments, including REST APIs and RPC APIs. It is
1752 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1753 # three pieces of data: error code, error message, and error details.
1754 #
1755 # You can find out more about this error model and how to work with it in the
1756 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1757 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1758 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1759 # message types for APIs to use.
1760 {
1761 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1762 },
1763 ],
1764 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1765 # user-facing error message should be localized and sent in the
1766 # google.rpc.Status.details field, or localized by the client.
1767 },
1768 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1769 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1770 },
1771 },
1772 },
1773 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1774 # This value is inRFC3339
1775 # text format.
1776 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1777 # following:
1778 # `PENDING`, `RUNNING`, or `DONE`.
1779 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1780 # operation.
1781 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1782 # of the target resource.
1783 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1784 # operations related to creating a snapshot, this points to the disk
1785 # that the snapshot was created from.
1786 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1787 # `[email protected]` or
1788 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1789 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1790 # operation, this field will be populated.
1791 {
1792 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1793 # Engine returns NO_RESULTS_ON_PAGE if there
1794 # are no results in the response.
1795 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1796 # value format. For example:
1797 #
1798 # &quot;data&quot;: [
1799 # {
1800 # &quot;key&quot;: &quot;scope&quot;,
1801 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1802 # }
1803 {
1804 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1805 # returned. For example, for warnings where there are no results in a list
1806 # request for a particular zone, this key might be scope and
1807 # the key value might be the zone name. Other examples might be a key
1808 # indicating a deprecated resource and a suggested replacement, or a
1809 # warning about invalid network settings (for example, if an instance
1810 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1811 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1812 },
1813 ],
1814 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1815 },
1816 ],
1817 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1818 # applicable when performing per-zone operations.
1819 }</pre>
1820 </div>
1821
1822 <div class="method">
1823 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</code>
1824 <pre>Returns permissions that a caller has on the specified resource.
1825
1826 Args:
1827 project: string, Project ID for this request. (required)
1828 resource: string, Name or id of the resource for this request. (required)
1829 body: object, The request body.
1830 The object takes the form of:
1831
1832 {
1833 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with
1834 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1835 &quot;A String&quot;,
1836 ],
1837 }
1838
1839 x__xgafv: string, V1 error format.
1840 Allowed values
1841 1 - v1 error format
1842 2 - v2 error format
1843
1844 Returns:
1845 An object of the form:
1846
1847 {
1848 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1849 # allowed.
1850 &quot;A String&quot;,
1851 ],
1852 }</pre>
1853 </div>
1854
1855 <div class="method">
1856 <code class="details" id="update">update(project, firewall, body=None, requestId=None, x__xgafv=None)</code>
1857 <pre>Updates the specified firewall rule with the data included in the
1858 request.
1859 Note that all fields will be updated if using PUT, even fields that are not
1860 specified. To update individual fields, please use PATCH instead.
1861
1862 Args:
1863 project: string, Project ID for this request. (required)
1864 firewall: string, Name of the firewall rule to update. (required)
1865 body: object, The request body.
1866 The object takes the form of:
1867
1868 { # Represents a Firewall Rule resource.
1869 #
1870 # Firewall rules allow or deny ingress traffic to, and egress traffic from your
1871 # instances. For more information, readFirewall rules.
1872 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a
1873 # protocol and port-range tuple that describes a permitted connection.
1874 {
1875 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1876 # required when creating a firewall rule. This value can either be one of the
1877 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
1878 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
1879 # This field is only applicable for the UDP or TCP protocol.
1880 # Each entry must be either an integer or a range.
1881 # If not specified, this rule applies to connections through any port.
1882 #
1883 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
1884 # and [&quot;12345-12349&quot;].
1885 &quot;A String&quot;,
1886 ],
1887 },
1888 ],
1889 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1890 # text format.
1891 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a
1892 # protocol and port-range tuple that describes a denied connection.
1893 {
1894 &quot;IPProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1895 # required when creating a firewall rule. This value can either be one of the
1896 # following well known protocol strings (tcp, udp,icmp, esp, ah, ipip,sctp) or the IP protocol number.
1897 &quot;ports&quot;: [ # An optional list of ports to which this rule applies.
1898 # This field is only applicable for the UDP or TCP protocol.
1899 # Each entry must be either an integer or a range.
1900 # If not specified, this rule applies to connections through any port.
1901 #
1902 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;],
1903 # and [&quot;12345-12349&quot;].
1904 &quot;A String&quot;,
1905 ],
1906 },
1907 ],
1908 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you
1909 # create the resource.
1910 &quot;destinationRanges&quot;: [ # If destination ranges are specified, the firewall rule applies only to
1911 # traffic that has destination IP address in these ranges. These ranges must
1912 # be expressed inCIDR format. Both IPv4 and IPv6 are supported.
1913 &quot;A String&quot;,
1914 ],
1915 &quot;direction&quot;: &quot;A String&quot;, # Direction of traffic to which this firewall applies, either `INGRESS` or
1916 # `EGRESS`. The default is `INGRESS`. For `EGRESS` traffic, you cannot
1917 # specify the sourceTags fields.
1918 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the
1919 # firewall rule is not enforced and the network behaves as if it did not
1920 # exist. If this is unspecified, the firewall rule will be enabled.
1921 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1922 # defined by the server.
1923 &quot;kind&quot;: &quot;compute#firewall&quot;, # Output only. [Output Only] Type of the resource. Always compute#firewall
1924 # for firewall rules.
1925 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If
1926 # logging is enabled, logs will be exported to Cloud Logging.
1927 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall
1928 # rule.
1929 &quot;metadata&quot;: &quot;A String&quot;, # This field can only be specified for a particular firewall rule if
1930 # logging is enabled for that rule. This field denotes whether to include
1931 # or exclude metadata for firewall logs.
1932 },
1933 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created.
1934 # The name must be 1-63 characters long, and comply withRFC1035.
1935 # Specifically, the name must be 1-63 characters long and match the regular
1936 # expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character
1937 # must be a lowercase letter, and all following characters (except for the
1938 # last character) must be a dash, lowercase letter, or digit. The last
1939 # character must be a lowercase letter or digit.
1940 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not
1941 # specified when creating a firewall rule, the default network
1942 # is used:
1943 #
1944 # global/networks/default
1945 #
1946 # If you choose to specify this field, you can specify the network as a full
1947 # or partial URL. For example, the following are all valid URLs:
1948 #
1949 # -
1950 # https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
1951 # - projects/myproject/global/networks/my-network
1952 # - global/networks/default
1953 &quot;params&quot;: { # Additional firewall parameters. # Input only. [Input Only] Additional params passed with the request, but not persisted
1954 # as part of resource payload.
1955 &quot;resourceManagerTags&quot;: { # Tag keys/values directly bound to this resource.
1956 # Tag keys and values have the same definition as resource
1957 # manager tags. The field is allowed for INSERT
1958 # only. The keys/values to set on the resource should be specified in
1959 # either ID { : } or Namespaced format
1960 # { : }.
1961 # For example the following are valid inputs:
1962 # * {&quot;tagKeys/333&quot; : &quot;tagValues/444&quot;, &quot;tagKeys/123&quot; : &quot;tagValues/456&quot;}
1963 # * {&quot;123/environment&quot; : &quot;production&quot;, &quot;345/abc&quot; : &quot;xyz&quot;}
1964 # Note:
1965 # * Invalid combinations of ID &amp; namespaced format is not supported. For
1966 # instance: {&quot;123/environment&quot; : &quot;tagValues/444&quot;} is invalid.
1967 &quot;a_key&quot;: &quot;A String&quot;,
1968 },
1969 },
1970 &quot;priority&quot;: 42, # Priority for this rule.
1971 # This is an integer between `0` and `65535`, both inclusive.
1972 # The default value is `1000`.
1973 # Relative priorities determine which rule takes effect if multiple rules
1974 # apply. Lower values indicate higher priority. For example, a rule with
1975 # priority `0` has higher precedence than a rule with priority `1`.
1976 # DENY rules take precedence over ALLOW rules if they have equal priority.
1977 # Note that VPC networks have implied
1978 # rules with a priority of `65535`. To avoid conflicts with the implied
1979 # rules, use a priority number less than `65535`.
1980 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1981 &quot;sourceRanges&quot;: [ # If source ranges are specified, the firewall rule applies only to traffic
1982 # that has a source IP address in these ranges. These ranges must be
1983 # expressed inCIDR format. One or both of sourceRanges
1984 # and sourceTags may be set.
1985 # If both fields are set, the rule applies to traffic that has a
1986 # source IP address within sourceRanges OR a source IP
1987 # from a resource with a matching tag listed in thesourceTags field. The connection does not need to match
1988 # both fields for the rule to
1989 # apply. Both IPv4 and IPv6 are supported.
1990 &quot;A String&quot;,
1991 ],
1992 &quot;sourceServiceAccounts&quot;: [ # If source service accounts are specified, the firewall rules apply only to
1993 # traffic originating from an instance with a service account in this list.
1994 # Source service accounts cannot be used to control traffic to an instance&#x27;s
1995 # external IP address because service accounts are associated with an
1996 # instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts.
1997 # If both are set, the firewall applies to traffic that
1998 # has a source IP address within the sourceRanges OR a source
1999 # IP that belongs to an instance with service account listed insourceServiceAccount. The connection does not need to match
2000 # both fields for the firewall to apply.sourceServiceAccounts cannot be used at the same time assourceTags or targetTags.
2001 &quot;A String&quot;,
2002 ],
2003 &quot;sourceTags&quot;: [ # If source tags are specified, the firewall rule applies only to traffic
2004 # with source IPs that match the primary network interfaces of VM instances
2005 # that have the tag and are in the same VPC network.
2006 # Source tags cannot be used to control traffic to an instance&#x27;s external IP
2007 # address, it only applies to traffic between instances in the same virtual
2008 # network. Because tags are associated with instances, not IP addresses.
2009 # One or both of sourceRanges and sourceTags may be
2010 # set. If both fields are set, the firewall applies to traffic that has a
2011 # source IP address within sourceRanges OR a source IP from a
2012 # resource with a matching tag listed in the sourceTags
2013 # field. The connection does not need to match both fields for the
2014 # firewall to apply.
2015 &quot;A String&quot;,
2016 ],
2017 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating sets of instances located in the
2018 # network that may make network connections as specified inallowed[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags.
2019 # If neither targetServiceAccounts nor targetTags
2020 # are specified, the firewall rule applies to all instances on the specified
2021 # network.
2022 &quot;A String&quot;,
2023 ],
2024 &quot;targetTags&quot;: [ # A list of tags that controls which instances the firewall rule
2025 # applies to. If targetTags are specified, then the firewall
2026 # rule applies only to instances in the VPC network that have one of those
2027 # tags. If no targetTags are specified, the firewall rule
2028 # applies to all instances on the specified network.
2029 &quot;A String&quot;,
2030 ],
2031 }
2032
2033 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
2034 that if you must retry your request, the server will know to ignore the
2035 request if it has already been completed.
2036
2037 For example, consider a situation where you make an initial request and
2038 the request times out. If you make the request again with the same
2039 request ID, the server can check if original operation with the same
2040 request ID was received, and if so, will ignore the second request. This
2041 prevents clients from accidentally creating duplicate commitments.
2042
2043 The request ID must be
2044 a valid UUID with the exception that zero UUID is not supported
2045 (00000000-0000-0000-0000-000000000000).
2046 x__xgafv: string, V1 error format.
2047 Allowed values
2048 1 - v1 error format
2049 2 - v2 error format
2050
2051 Returns:
2052 An object of the form:
2053
2054 { # Represents an Operation resource.
2055 #
2056 # Google Compute Engine has three Operation resources:
2057 #
2058 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
2059 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
2060 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
2061 #
2062 # You can use an operation resource to manage asynchronous API requests.
2063 # For more information, readHandling
2064 # API responses.
2065 #
2066 # Operations can be global, regional or zonal.
2067 #
2068 # - For global operations, use the `globalOperations`
2069 # resource.
2070 # - For regional operations, use the
2071 # `regionOperations` resource.
2072 # - For zonal operations, use
2073 # the `zoneOperations` resource.
2074 #
2075 #
2076 #
2077 # For more information, read
2078 # Global, Regional, and Zonal Resources.
2079 #
2080 # Note that completed Operation resources have a limited
2081 # retention period.
2082 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
2083 # Not present otherwise.
2084 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2085 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
2086 # set when the operation is created.
2087 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
2088 # text format.
2089 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
2090 # this field will be populated.
2091 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
2092 # operation.
2093 {
2094 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2095 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
2096 # details. There is a set of defined message types to use for providing
2097 # details.The syntax depends on the error code. For example,
2098 # QuotaExceededInfo will have details when the error code is
2099 # QUOTA_EXCEEDED.
2100 {
2101 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
2102 #
2103 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
2104 # is not enabled:
2105 #
2106 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
2107 # &quot;domain&quot;: &quot;googleapis.com&quot;
2108 # &quot;metadata&quot;: {
2109 # &quot;resource&quot;: &quot;projects/123&quot;,
2110 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
2111 # }
2112 # }
2113 #
2114 # This response indicates that the pubsub.googleapis.com API is not enabled.
2115 #
2116 # Example of an error that is returned when attempting to create a Spanner
2117 # instance in a region that is out of stock:
2118 #
2119 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
2120 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
2121 # &quot;metadata&quot;: {
2122 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
2123 # }
2124 # }
2125 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
2126 # is typically the registered service name of the tool or product that
2127 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
2128 # generated by some common infrastructure, the error domain must be a
2129 # globally unique value that identifies the infrastructure. For Google API
2130 # infrastructure, the error domain is &quot;googleapis.com&quot;.
2131 &quot;metadatas&quot;: { # Additional structured details about this error.
2132 #
2133 # Keys must match a regular expression of `a-z+` but should
2134 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
2135 # length. When identifying the current value of an exceeded limit, the units
2136 # should be contained in the key, not the value. For example, rather than
2137 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
2138 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
2139 # instances that can be created in a single (batch) request.
2140 &quot;a_key&quot;: &quot;A String&quot;,
2141 },
2142 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
2143 # proximate cause of the error. Error reasons are unique within a particular
2144 # domain of errors. This should be at most 63 characters and match a
2145 # regular expression of `A-Z+[A-Z0-9]`, which represents
2146 # UPPER_SNAKE_CASE.
2147 },
2148 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
2149 #
2150 # For example, if a quota check failed with an error indicating the calling
2151 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
2152 # directly to the right place in the developer console to flip the bit.
2153 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
2154 { # Describes a URL link.
2155 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
2156 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
2157 },
2158 ],
2159 },
2160 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
2161 # which can be attached to an RPC error.
2162 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
2163 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
2164 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
2165 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
2166 },
2167 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
2168 &quot;dimensions&quot;: { # The map holding related quota dimensions.
2169 &quot;a_key&quot;: &quot;A String&quot;,
2170 },
2171 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
2172 # type or metric.
2173 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
2174 # or metric.
2175 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
2176 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
2177 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
2178 },
2179 },
2180 ],
2181 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
2182 # This property is optional.
2183 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
2184 },
2185 ],
2186 },
2187 &quot;getVersionOperationMetadata&quot;: {
2188 &quot;inlineSbomInfo&quot;: {
2189 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
2190 # appropriate identifiers.
2191 &quot;a_key&quot;: &quot;A String&quot;,
2192 },
2193 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
2194 # identifiers.
2195 &quot;a_key&quot;: &quot;A String&quot;,
2196 },
2197 },
2198 },
2199 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
2200 # message that was returned, such as `NOT FOUND`.
2201 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
2202 # status code that was returned. For example, a `404` means the
2203 # resource was not found.
2204 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
2205 # defined by the server.
2206 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
2207 # This value is inRFC3339
2208 # text format.
2209 &quot;instancesBulkInsertOperationMetadata&quot;: {
2210 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
2211 # Example key: zones/us-central1-a
2212 &quot;a_key&quot;: {
2213 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
2214 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
2215 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
2216 # error.
2217 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
2218 # if the flow is rolling forward or rolling back.
2219 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
2220 },
2221 },
2222 },
2223 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
2224 # Operation resources.
2225 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2226 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
2227 # group of operations results from a `bulkInsert` API request.
2228 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
2229 # `update`, or `delete`, and so on.
2230 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
2231 # There is no requirement that this be linear or support any granularity of
2232 # operations. This should not be used to guess when the operation will be
2233 # complete. This number should monotonically increase as the operation
2234 # progresses.
2235 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
2236 # applicable when performing regional operations.
2237 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2238 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
2239 # this field will contain information on all underlying zonal actions and
2240 # their state.
2241 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
2242 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
2243 # Example key: zones/us-central1-a
2244 &quot;a_key&quot;: {
2245 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
2246 # populated.
2247 # different programming environments, including REST APIs and RPC APIs. It is
2248 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2249 # three pieces of data: error code, error message, and error details.
2250 #
2251 # You can find out more about this error model and how to work with it in the
2252 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2253 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2254 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2255 # message types for APIs to use.
2256 {
2257 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2258 },
2259 ],
2260 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2261 # user-facing error message should be localized and sent in the
2262 # google.rpc.Status.details field, or localized by the client.
2263 },
2264 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
2265 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
2266 },
2267 },
2268 },
2269 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
2270 # This value is inRFC3339
2271 # text format.
2272 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
2273 # following:
2274 # `PENDING`, `RUNNING`, or `DONE`.
2275 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
2276 # operation.
2277 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
2278 # of the target resource.
2279 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
2280 # operations related to creating a snapshot, this points to the disk
2281 # that the snapshot was created from.
2282 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
2283 # `[email protected]` or
2284 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
2285 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
2286 # operation, this field will be populated.
2287 {
2288 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
2289 # Engine returns NO_RESULTS_ON_PAGE if there
2290 # are no results in the response.
2291 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
2292 # value format. For example:
2293 #
2294 # &quot;data&quot;: [
2295 # {
2296 # &quot;key&quot;: &quot;scope&quot;,
2297 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
2298 # }
2299 {
2300 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
2301 # returned. For example, for warnings where there are no results in a list
2302 # request for a particular zone, this key might be scope and
2303 # the key value might be the zone name. Other examples might be a key
2304 # indicating a deprecated resource and a suggested replacement, or a
2305 # warning about invalid network settings (for example, if an instance
2306 # attempts to perform IP forwarding but is not enabled for IP forwarding).
2307 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2308 },
2309 ],
2310 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2311 },
2312 ],
2313 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
2314 # applicable when performing per-zone operations.
2315 }</pre>
2316 </div>
2317
2318 </body></html>