Debian Codegraph @

docs/dyn/compute_beta.organizationSecurityPolicies.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_beta.html">Compute Engine API</a> . <a href="compute_beta.organizationSecurityPolicies.html">organizationSecurityPolicies</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#addAssociation">addAssociation(securityPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</a></code></p>
79 <p class="firstline">Inserts an association for the specified security policy.</p>
80 <p class="toc_element">
81 <code><a href="#addRule">addRule(securityPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Inserts a rule into a security policy.</p>
83 <p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85 <p class="firstline">Close httplib2 connections.</p>
86 <p class="toc_element">
87 <code><a href="#copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Copies rules to the specified security policy.</p>
89 <p class="toc_element">
90 <code><a href="#delete">delete(securityPolicy, requestId=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Deletes the specified policy.</p>
92 <p class="toc_element">
93 <code><a href="#get">get(securityPolicy, x__xgafv=None)</a></code></p>
94 <p class="firstline">List all of the ordered rules present in a single specified policy.</p>
95 <p class="toc_element">
96 <code><a href="#getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Gets an association with the specified name.</p>
98 <p class="toc_element">
99 <code><a href="#getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">Gets a rule at the specified priority.</p>
101 <p class="toc_element">
102 <code><a href="#insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
103 <p class="firstline">Creates a new policy in the specified organization using the data included</p>
104 <p class="toc_element">
105 <code><a href="#list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
106 <p class="firstline">List all the policies that have been configured for the specified</p>
107 <p class="toc_element">
108 <code><a href="#listAssociations">listAssociations(targetResource=None, x__xgafv=None)</a></code></p>
109 <p class="firstline">Lists associations of a specified target, i.e., organization or folder.</p>
110 <p class="toc_element">
111 <code><a href="#listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
112 <p class="firstline">Gets the current list of preconfigured Web Application Firewall (WAF)</p>
113 <p class="toc_element">
114 <code><a href="#list_next">list_next()</a></code></p>
115 <p class="firstline">Retrieves the next page of results.</p>
116 <p class="toc_element">
117 <code><a href="#move">move(securityPolicy, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
118 <p class="firstline">Moves the specified security policy.</p>
119 <p class="toc_element">
120 <code><a href="#patch">patch(securityPolicy, body=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p>
121 <p class="firstline">Patches the specified policy with the data included in the request.</p>
122 <p class="toc_element">
123 <code><a href="#patchRule">patchRule(securityPolicy, body=None, priority=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p>
124 <p class="firstline">Patches a rule at the specified priority.</p>
125 <p class="toc_element">
126 <code><a href="#removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None, x__xgafv=None)</a></code></p>
127 <p class="firstline">Removes an association for the specified security policy.</p>
128 <p class="toc_element">
129 <code><a href="#removeRule">removeRule(securityPolicy, priority=None, requestId=None, x__xgafv=None)</a></code></p>
130 <p class="firstline">Deletes a rule at the specified priority.</p>
131 <h3>Method Details</h3>
132 <div class="method">
133 <code class="details" id="addAssociation">addAssociation(securityPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</code>
134 <pre>Inserts an association for the specified security policy.
135
136 This has billing implications. Projects in the hierarchy with effective
137 hierarchical security policies will be automatically enrolled into Cloud
138 Armor Enterprise if not already enrolled.
139
140 Use this API to modify Cloud Armor policies. Previously, alpha and beta
141 versions of this API were used to modify firewall policies. This usage is
142 now disabled for most organizations. Use firewallPolicies.addAssociation
143 instead.
144
145 Args:
146 securityPolicy: string, Name of the security policy to update. (required)
147 body: object, The request body.
148 The object takes the form of:
149
150 {
151 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
152 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
153 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
154 &quot;A String&quot;,
155 ],
156 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
157 &quot;A String&quot;,
158 ],
159 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
160 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
161 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
162 }
163
164 replaceExistingAssociation: boolean, Indicates whether or not to replace it if an association of the attachment
165 already exists. This is false by default, in which case an error will be
166 returned if an association already exists.
167 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
168 that if you must retry your request, the server will know to ignore the
169 request if it has already been completed.
170
171 For example, consider a situation where you make an initial request and
172 the request times out. If you make the request again with the same
173 request ID, the server can check if original operation with the same
174 request ID was received, and if so, will ignore the second request. This
175 prevents clients from accidentally creating duplicate commitments.
176
177 The request ID must be
178 a valid UUID with the exception that zero UUID is not supported
179 (00000000-0000-0000-0000-000000000000).
180 x__xgafv: string, V1 error format.
181 Allowed values
182 1 - v1 error format
183 2 - v2 error format
184
185 Returns:
186 An object of the form:
187
188 { # Represents an Operation resource.
189 #
190 # Google Compute Engine has three Operation resources:
191 #
192 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
193 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
194 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
195 #
196 # You can use an operation resource to manage asynchronous API requests.
197 # For more information, readHandling
198 # API responses.
199 #
200 # Operations can be global, regional or zonal.
201 #
202 # - For global operations, use the `globalOperations`
203 # resource.
204 # - For regional operations, use the
205 # `regionOperations` resource.
206 # - For zonal operations, use
207 # the `zoneOperations` resource.
208 #
209 #
210 #
211 # For more information, read
212 # Global, Regional, and Zonal Resources.
213 #
214 # Note that completed Operation resources have a limited
215 # retention period.
216 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
217 # Not present otherwise.
218 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
219 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
220 # set when the operation is created.
221 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
222 # text format.
223 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
224 # this field will be populated.
225 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
226 # operation.
227 {
228 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
229 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
230 # details. There is a set of defined message types to use for providing
231 # details.The syntax depends on the error code. For example,
232 # QuotaExceededInfo will have details when the error code is
233 # QUOTA_EXCEEDED.
234 {
235 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
236 #
237 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
238 # is not enabled:
239 #
240 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
241 # &quot;domain&quot;: &quot;googleapis.com&quot;
242 # &quot;metadata&quot;: {
243 # &quot;resource&quot;: &quot;projects/123&quot;,
244 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
245 # }
246 # }
247 #
248 # This response indicates that the pubsub.googleapis.com API is not enabled.
249 #
250 # Example of an error that is returned when attempting to create a Spanner
251 # instance in a region that is out of stock:
252 #
253 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
254 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
255 # &quot;metadata&quot;: {
256 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
257 # }
258 # }
259 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
260 # is typically the registered service name of the tool or product that
261 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
262 # generated by some common infrastructure, the error domain must be a
263 # globally unique value that identifies the infrastructure. For Google API
264 # infrastructure, the error domain is &quot;googleapis.com&quot;.
265 &quot;metadatas&quot;: { # Additional structured details about this error.
266 #
267 # Keys must match a regular expression of `a-z+` but should
268 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
269 # length. When identifying the current value of an exceeded limit, the units
270 # should be contained in the key, not the value. For example, rather than
271 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
272 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
273 # instances that can be created in a single (batch) request.
274 &quot;a_key&quot;: &quot;A String&quot;,
275 },
276 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
277 # proximate cause of the error. Error reasons are unique within a particular
278 # domain of errors. This should be at most 63 characters and match a
279 # regular expression of `A-Z+[A-Z0-9]`, which represents
280 # UPPER_SNAKE_CASE.
281 },
282 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
283 #
284 # For example, if a quota check failed with an error indicating the calling
285 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
286 # directly to the right place in the developer console to flip the bit.
287 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
288 { # Describes a URL link.
289 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
290 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
291 },
292 ],
293 },
294 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
295 # which can be attached to an RPC error.
296 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
297 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
298 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
299 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
300 },
301 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
302 &quot;dimensions&quot;: { # The map holding related quota dimensions.
303 &quot;a_key&quot;: &quot;A String&quot;,
304 },
305 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
306 # type or metric.
307 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
308 # or metric.
309 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
310 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
311 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
312 },
313 },
314 ],
315 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
316 # This property is optional.
317 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
318 },
319 ],
320 },
321 &quot;getVersionOperationMetadata&quot;: {
322 &quot;inlineSbomInfo&quot;: {
323 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
324 # appropriate identifiers.
325 &quot;a_key&quot;: &quot;A String&quot;,
326 },
327 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
328 # identifiers.
329 &quot;a_key&quot;: &quot;A String&quot;,
330 },
331 },
332 },
333 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
334 # message that was returned, such as `NOT FOUND`.
335 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
336 # status code that was returned. For example, a `404` means the
337 # resource was not found.
338 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
339 # defined by the server.
340 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
341 # This value is inRFC3339
342 # text format.
343 &quot;instancesBulkInsertOperationMetadata&quot;: {
344 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
345 # Example key: zones/us-central1-a
346 &quot;a_key&quot;: {
347 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
348 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
349 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
350 # error.
351 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
352 # if the flow is rolling forward or rolling back.
353 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
354 },
355 },
356 },
357 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
358 # Operation resources.
359 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
360 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
361 # group of operations results from a `bulkInsert` API request.
362 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
363 # `update`, or `delete`, and so on.
364 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
365 # There is no requirement that this be linear or support any granularity of
366 # operations. This should not be used to guess when the operation will be
367 # complete. This number should monotonically increase as the operation
368 # progresses.
369 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
370 # applicable when performing regional operations.
371 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
372 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
373 # this field will contain information on all underlying zonal actions and
374 # their state.
375 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
376 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
377 # Example key: zones/us-central1-a
378 &quot;a_key&quot;: {
379 &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
380 # populated.
381 # different programming environments, including REST APIs and RPC APIs. It is
382 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
383 # three pieces of data: error code, error message, and error details.
384 #
385 # You can find out more about this error model and how to work with it in the
386 # [API Design Guide](https://cloud.google.com/apis/design/errors).
387 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
388 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
389 # message types for APIs to use.
390 {
391 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
392 },
393 ],
394 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
395 # user-facing error message should be localized and sent in the
396 # google.rpc.Status.details field, or localized by the client.
397 },
398 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
399 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
400 },
401 },
402 },
403 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
404 # This value is inRFC3339
405 # text format.
406 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
407 # following:
408 # `PENDING`, `RUNNING`, or `DONE`.
409 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
410 # operation.
411 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
412 # of the target resource.
413 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
414 # operations related to creating a snapshot, this points to the disk
415 # that the snapshot was created from.
416 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
417 # `[email protected]` or
418 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
419 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
420 # operation, this field will be populated.
421 {
422 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
423 # Engine returns NO_RESULTS_ON_PAGE if there
424 # are no results in the response.
425 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
426 # value format. For example:
427 #
428 # &quot;data&quot;: [
429 # {
430 # &quot;key&quot;: &quot;scope&quot;,
431 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
432 # }
433 {
434 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
435 # returned. For example, for warnings where there are no results in a list
436 # request for a particular zone, this key might be scope and
437 # the key value might be the zone name. Other examples might be a key
438 # indicating a deprecated resource and a suggested replacement, or a
439 # warning about invalid network settings (for example, if an instance
440 # attempts to perform IP forwarding but is not enabled for IP forwarding).
441 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
442 },
443 ],
444 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
445 },
446 ],
447 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
448 # applicable when performing per-zone operations.
449 }</pre>
450 </div>
451
452 <div class="method">
453 <code class="details" id="addRule">addRule(securityPolicy, body=None, requestId=None, x__xgafv=None)</code>
454 <pre>Inserts a rule into a security policy.
455
456 Use this API to modify Cloud Armor policies. Previously, alpha and beta
457 versions of this API were used to modify firewall policies. This usage is
458 now disabled for most organizations. Use firewallPolicies.addRule instead.
459
460 Args:
461 securityPolicy: string, Name of the security policy to update. (required)
462 body: object, The request body.
463 The object takes the form of:
464
465 { # Represents a rule that describes one or more match conditions along with
466 # the action to be taken when traffic matches this condition (allow or deny).
467 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
468 # The following are the valid actions:
469 #
470 # - allow: allow access to target.
471 # - deny(STATUS): deny access to target, returns the
472 # HTTP response code specified. Valid values for `STATUS`
473 # are 403, 404, and 502.
474 # - rate_based_ban: limit client traffic to the configured
475 # threshold and ban the client if the traffic exceeds the threshold.
476 # Configure parameters for this action in RateLimitOptions. Requires
477 # rate_limit_options to be set.
478 # - redirect: redirect to a different target. This can
479 # either be an internal reCAPTCHA redirect, or an external URL-based
480 # redirect via a 302 response. Parameters for this action can be configured
481 # via redirectOptions. This action is only supported in Global Security
482 # Policies of type CLOUD_ARMOR.
483 # - throttle: limit
484 # client traffic to the configured threshold. Configure parameters for this
485 # action in rateLimitOptions. Requires rate_limit_options to be set for
486 # this.
487 # - fairshare (preview only): when traffic reaches the
488 # threshold limit, requests from the clients matching this rule begin to be
489 # rate-limited using the Fair Share algorithm. This action is only allowed
490 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
491 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
492 # create the resource.
493 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
494 # specified when versioned_expr is set to FIREWALL.
495 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
496 # enabled, logs will be exported to the configured export destination in
497 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
498 # cannot enable logging on &quot;goto_next&quot; rules.
499 #
500 # This field may only be specified when the versioned_expr is set to
501 # FIREWALL.
502 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
503 # This field is only supported in Global Security Policies of type
504 # CLOUD_ARMOR.
505 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
506 # present.
507 {
508 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
509 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
510 },
511 ],
512 },
513 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
514 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
515 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
516 # Exactly one field must be specified.
517 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
518 # This field must be specified if versioned_expr is specified and cannot
519 # be specified if versioned_expr is not specified.
520 &quot;destIpRanges&quot;: [ # CIDR IP address range.
521 #
522 # This field may only be specified when versioned_expr is set to
523 # FIREWALL.
524 &quot;A String&quot;,
525 ],
526 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
527 #
528 # This field may only be specified when versioned_expr is set to
529 # FIREWALL.
530 {
531 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
532 # required when creating a firewall rule. This value can either be
533 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
534 # protocol number.
535 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
536 # only applicable for UDP or TCP protocol. Each entry must be either
537 # an integer or a range. If not specified, this rule applies to
538 # connections through any port.
539 #
540 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
541 #
542 # This field may only be specified when versioned_expr is set to
543 # FIREWALL.
544 &quot;A String&quot;,
545 ],
546 },
547 ],
548 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
549 # Maximum number of src_ip_ranges allowed is 10.
550 &quot;A String&quot;,
551 ],
552 },
553 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
554 # A CEVAL expression is used to specify match criteria such as origin.ip,
555 # source.region_code and contents in the request header.
556 # Expressions containing `evaluateThreatIntelligence` require a Cloud
557 # Armor Enterprise subscription and are not supported in Edge Policies
558 # nor in Regional Policies. Expressions containing
559 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
560 # Enterprise subscription and are only supported in Global Security
561 # Policies.
562 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
563 # are documented at https://github.com/google/cel-spec.
564 #
565 # Example (Comparison):
566 #
567 # title: &quot;Summary size limit&quot;
568 # description: &quot;Determines if a summary is less than 100 chars&quot;
569 # expression: &quot;document.summary.size() &lt; 100&quot;
570 #
571 # Example (Equality):
572 #
573 # title: &quot;Requestor is owner&quot;
574 # description: &quot;Determines if requestor is the document owner&quot;
575 # expression: &quot;document.owner == request.auth.claims.email&quot;
576 #
577 # Example (Logic):
578 #
579 # title: &quot;Public documents&quot;
580 # description: &quot;Determine whether the document should be publicly visible&quot;
581 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
582 #
583 # Example (Data Manipulation):
584 #
585 # title: &quot;Notification string&quot;
586 # description: &quot;Create a notification string with a timestamp.&quot;
587 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
588 #
589 # The exact variables and functions that may be referenced within an expression
590 # are determined by the service that evaluates it. See the service
591 # documentation for additional information.
592 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
593 # describes the expression, e.g. when hovered over it in a UI.
594 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
595 # syntax.
596 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
597 # reporting, e.g. a file name and a position in the file.
598 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
599 # its purpose. This can be used e.g. in UIs which allow to enter the
600 # expression.
601 },
602 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
603 # CEVAL expression (i.e., &#x27;expr&#x27;).
604 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
605 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
606 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
607 # action-tokens. The provided site keys need to be created from
608 # reCAPTCHA API under the same project where the security policy is
609 # created.
610 &quot;A String&quot;,
611 ],
612 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
613 # session-tokens. The provided site keys need to be created from
614 # reCAPTCHA API under the same project where the security policy is
615 # created.
616 &quot;A String&quot;,
617 ],
618 },
619 },
620 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
621 # If this field is specified, config must also be specified.
622 # Available preconfigured expressions along with their requirements are:
623 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
624 # config.
625 },
626 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
627 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
628 # &#x27;action&#x27; is enforced.
629 #
630 # The match criteria for a rule consists of built-in match fields (like
631 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
632 # (&#x27;userDefinedFields&#x27;).
633 #
634 # Field values may be extracted directly from the packet or derived from it
635 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
636 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
637 # header is found in the packet and the entire field is in bounds.
638 #
639 # Each match field may specify which values can match it, listing one or
640 # more ranges, prefixes, or exact values that are considered a match for
641 # the field. A field value must be present in order to match a specified
642 # match field. If no match values are specified for a match field, then any
643 # field value is considered to match it, and it&#x27;s not required to be
644 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
645 #
646 # For a packet to match a rule, all specified match fields must match the
647 # corresponding field values derived from the packet.
648 #
649 # Example:
650 #
651 # networkMatch:
652 # srcIpRanges:
653 # - &quot;192.0.2.0/24&quot;
654 # - &quot;198.51.100.0/24&quot;
655 # userDefinedFields:
656 # - name: &quot;ipv4_fragment_offset&quot;
657 # values:
658 # - &quot;1-0x1fff&quot;
659 #
660 # The above match condition matches packets with a source IP in
661 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
662 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
663 # against.
664 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
665 # format.
666 &quot;A String&quot;,
667 ],
668 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
669 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
670 &quot;A String&quot;,
671 ],
672 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
673 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
674 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
675 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
676 &quot;A String&quot;,
677 ],
678 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
679 42,
680 ],
681 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
682 &quot;A String&quot;,
683 ],
684 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
685 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
686 &quot;A String&quot;,
687 ],
688 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
689 # IP address.
690 &quot;A String&quot;,
691 ],
692 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
693 # matching values for that field.
694 {
695 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
696 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
697 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
698 # range (e.g. &quot;0x400-0x7ff&quot;).
699 &quot;A String&quot;,
700 ],
701 },
702 ],
703 },
704 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
705 # does not evaluate preconfigured WAF rules, i.e., if
706 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
707 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
708 {
709 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
710 # preconfigured WAF evaluation.
711 {
712 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
713 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
714 },
715 ],
716 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
717 # inspection during preconfigured WAF evaluation.
718 {
719 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
720 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
721 },
722 ],
723 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
724 # inspection during preconfigured WAF evaluation.
725 {
726 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
727 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
728 },
729 ],
730 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
731 # from inspection during preconfigured WAF evaluation. Note that the
732 # parameter can be in the query string or in the POST body.
733 {
734 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
735 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
736 },
737 ],
738 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
739 # inspection during preconfigured WAF evaluation. When specifying this
740 # field, the query or fragment part should be excluded.
741 {
742 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
743 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
744 },
745 ],
746 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
747 # preconfigured WAF exclusion. If omitted, it refers to all the rule
748 # IDs under the WAF rule set.
749 &quot;A String&quot;,
750 ],
751 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
752 },
753 ],
754 },
755 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
756 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
757 # must be a positive value between 0 and 2147483647.
758 # Rules are evaluated from highest to lowest priority where 0 is the
759 # highest priority and 2147483647 is the lowest priority.
760 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
761 # &quot;fairshare&quot;. Cannot be specified for any other actions.
762 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
763 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
764 # the traffic will continue to be banned by the rate limit after the
765 # rate falls below the threshold.
766 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
767 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
768 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
769 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
770 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
771 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
772 },
773 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
774 # threshold. Valid option is &quot;allow&quot; only.
775 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
776 # values are:
777 #
778 # - ALL: A single rate limit threshold is applied to all
779 # the requests matching this rule. This is the default value if
780 # &quot;enforceOnKey&quot; is not configured.
781 # - IP: The source IP address of
782 # the request is the key. Each IP has this limit enforced
783 # separately.
784 # - HTTP_HEADER: The value of the HTTP
785 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
786 # value is truncated to the first 128 bytes of the header value. If no
787 # such header is present in the request, the key type defaults toALL.
788 # - XFF_IP: The first IP address (i.e. the
789 # originating client IP address) specified in the list of IPs under
790 # X-Forwarded-For HTTP header. If no such header is present or the value
791 # is not a valid IP, the key defaults to the source IP address of
792 # the request i.e. key type IP.
793 # - HTTP_COOKIE: The value of the HTTP
794 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
795 # value is truncated to the first 128 bytes of the cookie value. If no
796 # such cookie is present in the request, the key type defaults toALL.
797 # - HTTP_PATH: The URL path of the HTTP request. The key
798 # value is truncated to the first 128 bytes.
799 # - SNI: Server name indication in the TLS session of the
800 # HTTPS request. The key value is truncated to the first 128 bytes. The
801 # key type defaults to ALL on a HTTP session.
802 # - REGION_CODE: The country/region from which the request
803 # originates.
804 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
805 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
806 # key type defaults to ALL.
807 # - USER_IP: The IP address of the originating client,
808 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
809 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
810 # an IP address cannot be resolved from it, the key type defaults toIP.
811 #
812 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
813 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
814 # key type defaults to ALL.
815 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
816 # limit threshold is enforced for all the requests matching the rule.
817 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
818 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
819 # ratelimit threshold/action is enforced. You can specify up to 3
820 # enforce_on_key_configs. If enforce_on_key_configs is specified,
821 # enforce_on_key must not be specified.
822 {
823 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
824 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
825 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
826 # taken as the key value.
827 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
828 # values are:
829 #
830 # - ALL: A single rate limit threshold is applied to all
831 # the requests matching this rule. This is the default value if
832 # &quot;enforceOnKeyConfigs&quot; is not configured.
833 # - IP: The source IP address of
834 # the request is the key. Each IP has this limit enforced
835 # separately.
836 # - HTTP_HEADER: The value of the HTTP
837 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
838 # value is truncated to the first 128 bytes of the header value. If no
839 # such header is present in the request, the key type defaults toALL.
840 # - XFF_IP: The first IP address (i.e. the
841 # originating client IP address) specified in the list of IPs under
842 # X-Forwarded-For HTTP header. If no such header is present or the
843 # value is not a valid IP, the key defaults to the source IP address of
844 # the request i.e. key type IP.
845 # - HTTP_COOKIE: The value of the HTTP
846 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
847 # value is truncated to the first 128 bytes of the cookie value. If no
848 # such cookie is present in the request, the key type defaults toALL.
849 # - HTTP_PATH: The URL path of the HTTP request. The key
850 # value is truncated to the first 128 bytes.
851 # - SNI: Server name indication in the TLS session of
852 # the HTTPS request. The key value is truncated to the first 128 bytes.
853 # The key type defaults to ALL on a HTTP session.
854 # - REGION_CODE: The country/region from which the
855 # request originates.
856 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
857 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
858 # key type defaults to ALL.
859 # - USER_IP: The IP address of the originating client,
860 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
861 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
862 # or an IP address cannot be resolved from it, the key type defaults toIP.
863 #
864 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
865 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
866 # key type defaults to ALL.
867 },
868 ],
869 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
870 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
871 # value.
872 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
873 # value.
874 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
875 # threshold, to either deny with a specified HTTP response code, or
876 # redirect to a different endpoint.
877 # Valid options are `deny(STATUS)`, where valid values for
878 # `STATUS` are 403, 404, 429, and 502, and
879 # `redirect`, where the redirect parameters come from
880 # `exceedRedirectOptions` below.
881 # The `redirect` action is only supported in Global Security Policies of
882 # type CLOUD_ARMOR.
883 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
884 # action. Cannot be specified if the exceed action is not redirect.
885 # This field is only supported in Global Security Policies of type
886 # CLOUD_ARMOR.
887 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
888 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
889 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
890 #
891 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
892 # challenge assessment.
893 # - EXTERNAL_302: redirect to a different URL via a 302
894 # response.
895 },
896 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
897 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
898 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
899 },
900 },
901 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
902 # other actions.
903 # This field is only supported in Global Security Policies of type
904 # CLOUD_ARMOR.
905 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
906 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
907 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
908 #
909 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
910 # challenge assessment.
911 # - EXTERNAL_302: redirect to a different URL via a 302
912 # response.
913 },
914 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
915 # policy. This can only be set during rule creation, if rule number is not
916 # specified it will be generated by the server.
917 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
918 # policy rule.
919 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
920 # allows you to control which network&#x27;s VMs get this rule. If this field
921 # is left blank, all VMs within the organization will receive the rule.
922 #
923 # This field may only be specified when versioned_expr is set to FIREWALL.
924 &quot;A String&quot;,
925 ],
926 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
927 # applied with this rule.
928 &quot;A String&quot;,
929 ],
930 }
931
932 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
933 that if you must retry your request, the server will know to ignore the
934 request if it has already been completed.
935
936 For example, consider a situation where you make an initial request and
937 the request times out. If you make the request again with the same
938 request ID, the server can check if original operation with the same
939 request ID was received, and if so, will ignore the second request. This
940 prevents clients from accidentally creating duplicate commitments.
941
942 The request ID must be
943 a valid UUID with the exception that zero UUID is not supported
944 (00000000-0000-0000-0000-000000000000).
945 x__xgafv: string, V1 error format.
946 Allowed values
947 1 - v1 error format
948 2 - v2 error format
949
950 Returns:
951 An object of the form:
952
953 { # Represents an Operation resource.
954 #
955 # Google Compute Engine has three Operation resources:
956 #
957 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
958 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
959 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
960 #
961 # You can use an operation resource to manage asynchronous API requests.
962 # For more information, readHandling
963 # API responses.
964 #
965 # Operations can be global, regional or zonal.
966 #
967 # - For global operations, use the `globalOperations`
968 # resource.
969 # - For regional operations, use the
970 # `regionOperations` resource.
971 # - For zonal operations, use
972 # the `zoneOperations` resource.
973 #
974 #
975 #
976 # For more information, read
977 # Global, Regional, and Zonal Resources.
978 #
979 # Note that completed Operation resources have a limited
980 # retention period.
981 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
982 # Not present otherwise.
983 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
984 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
985 # set when the operation is created.
986 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
987 # text format.
988 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
989 # this field will be populated.
990 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
991 # operation.
992 {
993 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
994 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
995 # details. There is a set of defined message types to use for providing
996 # details.The syntax depends on the error code. For example,
997 # QuotaExceededInfo will have details when the error code is
998 # QUOTA_EXCEEDED.
999 {
1000 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1001 #
1002 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1003 # is not enabled:
1004 #
1005 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1006 # &quot;domain&quot;: &quot;googleapis.com&quot;
1007 # &quot;metadata&quot;: {
1008 # &quot;resource&quot;: &quot;projects/123&quot;,
1009 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1010 # }
1011 # }
1012 #
1013 # This response indicates that the pubsub.googleapis.com API is not enabled.
1014 #
1015 # Example of an error that is returned when attempting to create a Spanner
1016 # instance in a region that is out of stock:
1017 #
1018 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1019 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1020 # &quot;metadata&quot;: {
1021 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1022 # }
1023 # }
1024 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1025 # is typically the registered service name of the tool or product that
1026 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1027 # generated by some common infrastructure, the error domain must be a
1028 # globally unique value that identifies the infrastructure. For Google API
1029 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1030 &quot;metadatas&quot;: { # Additional structured details about this error.
1031 #
1032 # Keys must match a regular expression of `a-z+` but should
1033 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1034 # length. When identifying the current value of an exceeded limit, the units
1035 # should be contained in the key, not the value. For example, rather than
1036 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1037 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1038 # instances that can be created in a single (batch) request.
1039 &quot;a_key&quot;: &quot;A String&quot;,
1040 },
1041 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1042 # proximate cause of the error. Error reasons are unique within a particular
1043 # domain of errors. This should be at most 63 characters and match a
1044 # regular expression of `A-Z+[A-Z0-9]`, which represents
1045 # UPPER_SNAKE_CASE.
1046 },
1047 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1048 #
1049 # For example, if a quota check failed with an error indicating the calling
1050 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1051 # directly to the right place in the developer console to flip the bit.
1052 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1053 { # Describes a URL link.
1054 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1055 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1056 },
1057 ],
1058 },
1059 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1060 # which can be attached to an RPC error.
1061 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1062 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1063 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1064 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1065 },
1066 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1067 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1068 &quot;a_key&quot;: &quot;A String&quot;,
1069 },
1070 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1071 # type or metric.
1072 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1073 # or metric.
1074 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1075 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1076 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1077 },
1078 },
1079 ],
1080 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1081 # This property is optional.
1082 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1083 },
1084 ],
1085 },
1086 &quot;getVersionOperationMetadata&quot;: {
1087 &quot;inlineSbomInfo&quot;: {
1088 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1089 # appropriate identifiers.
1090 &quot;a_key&quot;: &quot;A String&quot;,
1091 },
1092 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1093 # identifiers.
1094 &quot;a_key&quot;: &quot;A String&quot;,
1095 },
1096 },
1097 },
1098 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1099 # message that was returned, such as `NOT FOUND`.
1100 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1101 # status code that was returned. For example, a `404` means the
1102 # resource was not found.
1103 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1104 # defined by the server.
1105 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1106 # This value is inRFC3339
1107 # text format.
1108 &quot;instancesBulkInsertOperationMetadata&quot;: {
1109 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1110 # Example key: zones/us-central1-a
1111 &quot;a_key&quot;: {
1112 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1113 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1114 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1115 # error.
1116 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1117 # if the flow is rolling forward or rolling back.
1118 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1119 },
1120 },
1121 },
1122 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1123 # Operation resources.
1124 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1125 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1126 # group of operations results from a `bulkInsert` API request.
1127 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1128 # `update`, or `delete`, and so on.
1129 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1130 # There is no requirement that this be linear or support any granularity of
1131 # operations. This should not be used to guess when the operation will be
1132 # complete. This number should monotonically increase as the operation
1133 # progresses.
1134 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1135 # applicable when performing regional operations.
1136 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1137 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1138 # this field will contain information on all underlying zonal actions and
1139 # their state.
1140 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1141 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1142 # Example key: zones/us-central1-a
1143 &quot;a_key&quot;: {
1144 &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
1145 # populated.
1146 # different programming environments, including REST APIs and RPC APIs. It is
1147 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1148 # three pieces of data: error code, error message, and error details.
1149 #
1150 # You can find out more about this error model and how to work with it in the
1151 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1152 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1153 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1154 # message types for APIs to use.
1155 {
1156 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1157 },
1158 ],
1159 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1160 # user-facing error message should be localized and sent in the
1161 # google.rpc.Status.details field, or localized by the client.
1162 },
1163 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1164 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1165 },
1166 },
1167 },
1168 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1169 # This value is inRFC3339
1170 # text format.
1171 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1172 # following:
1173 # `PENDING`, `RUNNING`, or `DONE`.
1174 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1175 # operation.
1176 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1177 # of the target resource.
1178 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1179 # operations related to creating a snapshot, this points to the disk
1180 # that the snapshot was created from.
1181 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1182 # `[email protected]` or
1183 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1184 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1185 # operation, this field will be populated.
1186 {
1187 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1188 # Engine returns NO_RESULTS_ON_PAGE if there
1189 # are no results in the response.
1190 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1191 # value format. For example:
1192 #
1193 # &quot;data&quot;: [
1194 # {
1195 # &quot;key&quot;: &quot;scope&quot;,
1196 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1197 # }
1198 {
1199 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1200 # returned. For example, for warnings where there are no results in a list
1201 # request for a particular zone, this key might be scope and
1202 # the key value might be the zone name. Other examples might be a key
1203 # indicating a deprecated resource and a suggested replacement, or a
1204 # warning about invalid network settings (for example, if an instance
1205 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1206 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1207 },
1208 ],
1209 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1210 },
1211 ],
1212 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1213 # applicable when performing per-zone operations.
1214 }</pre>
1215 </div>
1216
1217 <div class="method">
1218 <code class="details" id="close">close()</code>
1219 <pre>Close httplib2 connections.</pre>
1220 </div>
1221
1222 <div class="method">
1223 <code class="details" id="copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</code>
1224 <pre>Copies rules to the specified security policy.
1225
1226 Use this API to modify Cloud Armor policies. Previously, alpha and beta
1227 versions of this API were used to modify firewall policies. This usage is
1228 now disabled for most organizations. Use firewallPolicies.cloneRules
1229 instead.
1230
1231 Args:
1232 securityPolicy: string, Name of the security policy to update. (required)
1233 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1234 that if you must retry your request, the server will know to ignore the
1235 request if it has already been completed.
1236
1237 For example, consider a situation where you make an initial request and
1238 the request times out. If you make the request again with the same
1239 request ID, the server can check if original operation with the same
1240 request ID was received, and if so, will ignore the second request. This
1241 prevents clients from accidentally creating duplicate commitments.
1242
1243 The request ID must be
1244 a valid UUID with the exception that zero UUID is not supported
1245 (00000000-0000-0000-0000-000000000000).
1246 sourceSecurityPolicy: string, The security policy from which to copy rules.
1247 x__xgafv: string, V1 error format.
1248 Allowed values
1249 1 - v1 error format
1250 2 - v2 error format
1251
1252 Returns:
1253 An object of the form:
1254
1255 { # Represents an Operation resource.
1256 #
1257 # Google Compute Engine has three Operation resources:
1258 #
1259 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
1260 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
1261 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
1262 #
1263 # You can use an operation resource to manage asynchronous API requests.
1264 # For more information, readHandling
1265 # API responses.
1266 #
1267 # Operations can be global, regional or zonal.
1268 #
1269 # - For global operations, use the `globalOperations`
1270 # resource.
1271 # - For regional operations, use the
1272 # `regionOperations` resource.
1273 # - For zonal operations, use
1274 # the `zoneOperations` resource.
1275 #
1276 #
1277 #
1278 # For more information, read
1279 # Global, Regional, and Zonal Resources.
1280 #
1281 # Note that completed Operation resources have a limited
1282 # retention period.
1283 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1284 # Not present otherwise.
1285 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1286 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1287 # set when the operation is created.
1288 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1289 # text format.
1290 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1291 # this field will be populated.
1292 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1293 # operation.
1294 {
1295 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1296 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1297 # details. There is a set of defined message types to use for providing
1298 # details.The syntax depends on the error code. For example,
1299 # QuotaExceededInfo will have details when the error code is
1300 # QUOTA_EXCEEDED.
1301 {
1302 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1303 #
1304 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1305 # is not enabled:
1306 #
1307 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1308 # &quot;domain&quot;: &quot;googleapis.com&quot;
1309 # &quot;metadata&quot;: {
1310 # &quot;resource&quot;: &quot;projects/123&quot;,
1311 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1312 # }
1313 # }
1314 #
1315 # This response indicates that the pubsub.googleapis.com API is not enabled.
1316 #
1317 # Example of an error that is returned when attempting to create a Spanner
1318 # instance in a region that is out of stock:
1319 #
1320 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1321 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1322 # &quot;metadata&quot;: {
1323 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1324 # }
1325 # }
1326 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1327 # is typically the registered service name of the tool or product that
1328 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1329 # generated by some common infrastructure, the error domain must be a
1330 # globally unique value that identifies the infrastructure. For Google API
1331 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1332 &quot;metadatas&quot;: { # Additional structured details about this error.
1333 #
1334 # Keys must match a regular expression of `a-z+` but should
1335 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1336 # length. When identifying the current value of an exceeded limit, the units
1337 # should be contained in the key, not the value. For example, rather than
1338 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1339 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1340 # instances that can be created in a single (batch) request.
1341 &quot;a_key&quot;: &quot;A String&quot;,
1342 },
1343 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1344 # proximate cause of the error. Error reasons are unique within a particular
1345 # domain of errors. This should be at most 63 characters and match a
1346 # regular expression of `A-Z+[A-Z0-9]`, which represents
1347 # UPPER_SNAKE_CASE.
1348 },
1349 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1350 #
1351 # For example, if a quota check failed with an error indicating the calling
1352 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1353 # directly to the right place in the developer console to flip the bit.
1354 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1355 { # Describes a URL link.
1356 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1357 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1358 },
1359 ],
1360 },
1361 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1362 # which can be attached to an RPC error.
1363 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1364 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1365 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1366 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1367 },
1368 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1369 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1370 &quot;a_key&quot;: &quot;A String&quot;,
1371 },
1372 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1373 # type or metric.
1374 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1375 # or metric.
1376 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1377 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1378 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1379 },
1380 },
1381 ],
1382 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1383 # This property is optional.
1384 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1385 },
1386 ],
1387 },
1388 &quot;getVersionOperationMetadata&quot;: {
1389 &quot;inlineSbomInfo&quot;: {
1390 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1391 # appropriate identifiers.
1392 &quot;a_key&quot;: &quot;A String&quot;,
1393 },
1394 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1395 # identifiers.
1396 &quot;a_key&quot;: &quot;A String&quot;,
1397 },
1398 },
1399 },
1400 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1401 # message that was returned, such as `NOT FOUND`.
1402 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1403 # status code that was returned. For example, a `404` means the
1404 # resource was not found.
1405 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1406 # defined by the server.
1407 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1408 # This value is inRFC3339
1409 # text format.
1410 &quot;instancesBulkInsertOperationMetadata&quot;: {
1411 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1412 # Example key: zones/us-central1-a
1413 &quot;a_key&quot;: {
1414 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1415 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1416 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1417 # error.
1418 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1419 # if the flow is rolling forward or rolling back.
1420 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1421 },
1422 },
1423 },
1424 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1425 # Operation resources.
1426 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1427 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1428 # group of operations results from a `bulkInsert` API request.
1429 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1430 # `update`, or `delete`, and so on.
1431 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1432 # There is no requirement that this be linear or support any granularity of
1433 # operations. This should not be used to guess when the operation will be
1434 # complete. This number should monotonically increase as the operation
1435 # progresses.
1436 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1437 # applicable when performing regional operations.
1438 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1439 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1440 # this field will contain information on all underlying zonal actions and
1441 # their state.
1442 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1443 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1444 # Example key: zones/us-central1-a
1445 &quot;a_key&quot;: {
1446 &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
1447 # populated.
1448 # different programming environments, including REST APIs and RPC APIs. It is
1449 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1450 # three pieces of data: error code, error message, and error details.
1451 #
1452 # You can find out more about this error model and how to work with it in the
1453 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1454 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1455 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1456 # message types for APIs to use.
1457 {
1458 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1459 },
1460 ],
1461 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1462 # user-facing error message should be localized and sent in the
1463 # google.rpc.Status.details field, or localized by the client.
1464 },
1465 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1466 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1467 },
1468 },
1469 },
1470 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1471 # This value is inRFC3339
1472 # text format.
1473 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1474 # following:
1475 # `PENDING`, `RUNNING`, or `DONE`.
1476 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1477 # operation.
1478 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1479 # of the target resource.
1480 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1481 # operations related to creating a snapshot, this points to the disk
1482 # that the snapshot was created from.
1483 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1484 # `[email protected]` or
1485 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1486 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1487 # operation, this field will be populated.
1488 {
1489 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1490 # Engine returns NO_RESULTS_ON_PAGE if there
1491 # are no results in the response.
1492 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1493 # value format. For example:
1494 #
1495 # &quot;data&quot;: [
1496 # {
1497 # &quot;key&quot;: &quot;scope&quot;,
1498 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1499 # }
1500 {
1501 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1502 # returned. For example, for warnings where there are no results in a list
1503 # request for a particular zone, this key might be scope and
1504 # the key value might be the zone name. Other examples might be a key
1505 # indicating a deprecated resource and a suggested replacement, or a
1506 # warning about invalid network settings (for example, if an instance
1507 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1508 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1509 },
1510 ],
1511 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1512 },
1513 ],
1514 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1515 # applicable when performing per-zone operations.
1516 }</pre>
1517 </div>
1518
1519 <div class="method">
1520 <code class="details" id="delete">delete(securityPolicy, requestId=None, x__xgafv=None)</code>
1521 <pre>Deletes the specified policy.
1522
1523 Use this API to remove Cloud Armor policies. Previously, alpha and beta
1524 versions of this API were used to remove firewall policies. This usage is
1525 now disabled for most organizations. Use firewallPolicies.delete instead.
1526
1527 Args:
1528 securityPolicy: string, Name of the security policy to delete. (required)
1529 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1530 that if you must retry your request, the server will know to ignore the
1531 request if it has already been completed.
1532
1533 For example, consider a situation where you make an initial request and
1534 the request times out. If you make the request again with the same
1535 request ID, the server can check if original operation with the same
1536 request ID was received, and if so, will ignore the second request. This
1537 prevents clients from accidentally creating duplicate commitments.
1538
1539 The request ID must be
1540 a valid UUID with the exception that zero UUID is not supported
1541 (00000000-0000-0000-0000-000000000000).
1542 x__xgafv: string, V1 error format.
1543 Allowed values
1544 1 - v1 error format
1545 2 - v2 error format
1546
1547 Returns:
1548 An object of the form:
1549
1550 { # Represents an Operation resource.
1551 #
1552 # Google Compute Engine has three Operation resources:
1553 #
1554 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
1555 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
1556 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
1557 #
1558 # You can use an operation resource to manage asynchronous API requests.
1559 # For more information, readHandling
1560 # API responses.
1561 #
1562 # Operations can be global, regional or zonal.
1563 #
1564 # - For global operations, use the `globalOperations`
1565 # resource.
1566 # - For regional operations, use the
1567 # `regionOperations` resource.
1568 # - For zonal operations, use
1569 # the `zoneOperations` resource.
1570 #
1571 #
1572 #
1573 # For more information, read
1574 # Global, Regional, and Zonal Resources.
1575 #
1576 # Note that completed Operation resources have a limited
1577 # retention period.
1578 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1579 # Not present otherwise.
1580 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1581 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1582 # set when the operation is created.
1583 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1584 # text format.
1585 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1586 # this field will be populated.
1587 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1588 # operation.
1589 {
1590 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1591 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1592 # details. There is a set of defined message types to use for providing
1593 # details.The syntax depends on the error code. For example,
1594 # QuotaExceededInfo will have details when the error code is
1595 # QUOTA_EXCEEDED.
1596 {
1597 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1598 #
1599 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1600 # is not enabled:
1601 #
1602 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1603 # &quot;domain&quot;: &quot;googleapis.com&quot;
1604 # &quot;metadata&quot;: {
1605 # &quot;resource&quot;: &quot;projects/123&quot;,
1606 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1607 # }
1608 # }
1609 #
1610 # This response indicates that the pubsub.googleapis.com API is not enabled.
1611 #
1612 # Example of an error that is returned when attempting to create a Spanner
1613 # instance in a region that is out of stock:
1614 #
1615 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1616 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1617 # &quot;metadata&quot;: {
1618 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1619 # }
1620 # }
1621 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1622 # is typically the registered service name of the tool or product that
1623 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1624 # generated by some common infrastructure, the error domain must be a
1625 # globally unique value that identifies the infrastructure. For Google API
1626 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1627 &quot;metadatas&quot;: { # Additional structured details about this error.
1628 #
1629 # Keys must match a regular expression of `a-z+` but should
1630 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1631 # length. When identifying the current value of an exceeded limit, the units
1632 # should be contained in the key, not the value. For example, rather than
1633 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1634 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1635 # instances that can be created in a single (batch) request.
1636 &quot;a_key&quot;: &quot;A String&quot;,
1637 },
1638 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1639 # proximate cause of the error. Error reasons are unique within a particular
1640 # domain of errors. This should be at most 63 characters and match a
1641 # regular expression of `A-Z+[A-Z0-9]`, which represents
1642 # UPPER_SNAKE_CASE.
1643 },
1644 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1645 #
1646 # For example, if a quota check failed with an error indicating the calling
1647 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1648 # directly to the right place in the developer console to flip the bit.
1649 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1650 { # Describes a URL link.
1651 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1652 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1653 },
1654 ],
1655 },
1656 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1657 # which can be attached to an RPC error.
1658 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1659 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1660 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1661 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1662 },
1663 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1664 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1665 &quot;a_key&quot;: &quot;A String&quot;,
1666 },
1667 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1668 # type or metric.
1669 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1670 # or metric.
1671 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1672 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1673 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1674 },
1675 },
1676 ],
1677 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1678 # This property is optional.
1679 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1680 },
1681 ],
1682 },
1683 &quot;getVersionOperationMetadata&quot;: {
1684 &quot;inlineSbomInfo&quot;: {
1685 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1686 # appropriate identifiers.
1687 &quot;a_key&quot;: &quot;A String&quot;,
1688 },
1689 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1690 # identifiers.
1691 &quot;a_key&quot;: &quot;A String&quot;,
1692 },
1693 },
1694 },
1695 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1696 # message that was returned, such as `NOT FOUND`.
1697 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1698 # status code that was returned. For example, a `404` means the
1699 # resource was not found.
1700 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1701 # defined by the server.
1702 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1703 # This value is inRFC3339
1704 # text format.
1705 &quot;instancesBulkInsertOperationMetadata&quot;: {
1706 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1707 # Example key: zones/us-central1-a
1708 &quot;a_key&quot;: {
1709 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1710 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1711 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1712 # error.
1713 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1714 # if the flow is rolling forward or rolling back.
1715 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1716 },
1717 },
1718 },
1719 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1720 # Operation resources.
1721 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1722 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1723 # group of operations results from a `bulkInsert` API request.
1724 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1725 # `update`, or `delete`, and so on.
1726 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1727 # There is no requirement that this be linear or support any granularity of
1728 # operations. This should not be used to guess when the operation will be
1729 # complete. This number should monotonically increase as the operation
1730 # progresses.
1731 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1732 # applicable when performing regional operations.
1733 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1734 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1735 # this field will contain information on all underlying zonal actions and
1736 # their state.
1737 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1738 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1739 # Example key: zones/us-central1-a
1740 &quot;a_key&quot;: {
1741 &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
1742 # populated.
1743 # different programming environments, including REST APIs and RPC APIs. It is
1744 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1745 # three pieces of data: error code, error message, and error details.
1746 #
1747 # You can find out more about this error model and how to work with it in the
1748 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1749 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1750 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1751 # message types for APIs to use.
1752 {
1753 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1754 },
1755 ],
1756 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1757 # user-facing error message should be localized and sent in the
1758 # google.rpc.Status.details field, or localized by the client.
1759 },
1760 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1761 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1762 },
1763 },
1764 },
1765 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1766 # This value is inRFC3339
1767 # text format.
1768 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1769 # following:
1770 # `PENDING`, `RUNNING`, or `DONE`.
1771 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1772 # operation.
1773 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1774 # of the target resource.
1775 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1776 # operations related to creating a snapshot, this points to the disk
1777 # that the snapshot was created from.
1778 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1779 # `[email protected]` or
1780 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1781 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1782 # operation, this field will be populated.
1783 {
1784 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1785 # Engine returns NO_RESULTS_ON_PAGE if there
1786 # are no results in the response.
1787 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1788 # value format. For example:
1789 #
1790 # &quot;data&quot;: [
1791 # {
1792 # &quot;key&quot;: &quot;scope&quot;,
1793 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1794 # }
1795 {
1796 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1797 # returned. For example, for warnings where there are no results in a list
1798 # request for a particular zone, this key might be scope and
1799 # the key value might be the zone name. Other examples might be a key
1800 # indicating a deprecated resource and a suggested replacement, or a
1801 # warning about invalid network settings (for example, if an instance
1802 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1803 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1804 },
1805 ],
1806 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1807 },
1808 ],
1809 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1810 # applicable when performing per-zone operations.
1811 }</pre>
1812 </div>
1813
1814 <div class="method">
1815 <code class="details" id="get">get(securityPolicy, x__xgafv=None)</code>
1816 <pre>List all of the ordered rules present in a single specified policy.
1817
1818 Use this API to read Cloud Armor policies. Previously, alpha and beta
1819 versions of this API were used to read firewall policies. This usage is now
1820 disabled for most organizations. Use firewallPolicies.get instead.
1821
1822 Args:
1823 securityPolicy: string, Name of the security policy to get. (required)
1824 x__xgafv: string, V1 error format.
1825 Allowed values
1826 1 - v1 error format
1827 2 - v2 error format
1828
1829 Returns:
1830 An object of the form:
1831
1832 { # Represents a Google Cloud Armor security policy resource.
1833 #
1834 # Only external backend services that use load balancers can
1835 # reference a security policy. For more information, see
1836 # Google Cloud Armor security policy overview.
1837 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
1838 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
1839 &quot;confidenceThreshold&quot;: 3.14,
1840 &quot;expirationSec&quot;: 42,
1841 &quot;impactedBaselineThreshold&quot;: 3.14,
1842 &quot;loadThreshold&quot;: 3.14,
1843 },
1844 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
1845 # This field is only supported in Global Security Policies of type
1846 # CLOUD_ARMOR.
1847 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
1848 # This field is only supported in Global Security Policies of type
1849 # CLOUD_ARMOR.
1850 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
1851 # STANDARD - opaque rules. (default)
1852 # PREMIUM - transparent rules.
1853 # This field is only supported in Global Security Policies of type
1854 # CLOUD_ARMOR.
1855 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
1856 # customizable thresholds.
1857 {
1858 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
1859 &quot;autoDeployExpirationSec&quot;: 42,
1860 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
1861 &quot;autoDeployLoadThreshold&quot;: 3.14,
1862 &quot;detectionAbsoluteQps&quot;: 3.14,
1863 &quot;detectionLoadThreshold&quot;: 3.14,
1864 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
1865 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
1866 # The name must be unique within the security policy.
1867 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
1868 # on specified granular traffic units.
1869 { # Configurations to specifc granular traffic units processed by
1870 # Adaptive Protection.
1871 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
1872 # type constitutes a separate traffic unit.
1873 # It can only be set to true if `value` is empty.
1874 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
1875 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
1876 },
1877 ],
1878 },
1879 ],
1880 },
1881 },
1882 &quot;advancedOptionsConfig&quot;: {
1883 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
1884 # json_parsing is set to STANDARD.
1885 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
1886 #
1887 # As per RFC 1341, a Content-Type header value has the following format:
1888 #
1889 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
1890 #
1891 # When configuring a custom Content-Type header value, only the
1892 # type/subtype needs to be specified, and the parameters should be
1893 # excluded.
1894 &quot;A String&quot;,
1895 ],
1896 },
1897 &quot;jsonParsing&quot;: &quot;A String&quot;,
1898 &quot;logLevel&quot;: &quot;A String&quot;,
1899 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
1900 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
1901 # Values are case insensitive.
1902 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
1903 # resolving the callers client IP address.
1904 &quot;A String&quot;,
1905 ],
1906 },
1907 &quot;associations&quot;: [ # A list of associations that belong to this policy.
1908 {
1909 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1910 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
1911 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
1912 &quot;A String&quot;,
1913 ],
1914 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
1915 &quot;A String&quot;,
1916 ],
1917 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1918 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
1919 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
1920 },
1921 ],
1922 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1923 # text format.
1924 &quot;ddosProtectionConfig&quot;: {
1925 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
1926 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
1927 # builds DDoS mitigations that minimize collateral damage. It quantifies
1928 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
1929 # blocked.
1930 #
1931 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
1932 # not be deployed. Using a lower value will prioritize keeping collateral
1933 # damage low, possibly at the cost of its effectiveness in rate limiting
1934 # some or all of the attack. It should typically be unset, so Advanced DDoS
1935 # (and Adaptive Protection) uses the best mitigation it can find. Setting
1936 # the threshold is advised if there are logs for false positive detections
1937 # with high collateral damage, and will cause Advanced DDoS to attempt to
1938 # find a less aggressive rule that satisfies the constraint. If a suitable
1939 # rule cannot be found, the system falls back to either no mitigation for
1940 # smaller attacks or broader network throttles for larger ones.
1941 &quot;ddosProtection&quot;: &quot;A String&quot;,
1942 },
1943 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1944 # create the resource.
1945 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
1946 # unique in the organization in which the security policy is created. This
1947 # should only be used when SecurityPolicyType is FIREWALL.
1948 # The name must be 1-63 characters long, and comply with
1949 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
1950 # characters long and match the regular expression
1951 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
1952 # lowercase letter, and all following characters must be a dash, lowercase
1953 # letter, or digit, except the last character, which cannot be a dash.
1954 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
1955 # the metadata&#x27;s contents and used for optimistic locking. The
1956 # fingerprint is initially generated by Compute Engine and changes after
1957 # every request to modify or update metadata. You must always provide an
1958 # up-to-date fingerprint hash in order to update or change metadata,
1959 # otherwise the request will fail with error412 conditionNotMet.
1960 #
1961 # To see the latest fingerprint, make get() request to the
1962 # security policy.
1963 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1964 # defined by the server.
1965 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
1966 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
1967 # is essentially a hash of the labels set used for optimistic locking. The
1968 # fingerprint is initially generated by Compute Engine and changes after
1969 # every request to modify or update labels. You must always provide an
1970 # up-to-date fingerprint hash in order to update or change labels.
1971 #
1972 # To see the latest fingerprint, make get() request to the
1973 # security policy.
1974 &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.
1975 # Label values may be empty.
1976 &quot;a_key&quot;: &quot;A String&quot;,
1977 },
1978 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
1979 # The name must be 1-63 characters long, and comply withRFC1035.
1980 # Specifically, the name must be 1-63 characters long and match the regular
1981 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
1982 # character must be a lowercase letter, and all following characters must
1983 # be a dash, lowercase letter, or digit, except the last character, which
1984 # cannot be a dash.
1985 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
1986 &quot;recaptchaOptionsConfig&quot;: {
1987 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
1988 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
1989 # the security policy. The specified site key needs to be created from the
1990 # reCAPTCHA API. The user is responsible for the validity of the specified
1991 # site key. If not specified, a Google-managed site key is used.
1992 # This field is only supported in Global Security Policies of type
1993 # CLOUD_ARMOR.
1994 },
1995 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
1996 # resides. This field is not applicable to global security policies.
1997 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
1998 # policy can not exceed a set number of tuples.
1999 &quot;rules&quot;: [ # A list of rules that belong to this policy.
2000 # There must always be a default rule which is a rule with priority
2001 # 2147483647 and match all condition (for the match condition this means
2002 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
2003 # must be either match &quot;*&quot; or not set). If no rules are provided when
2004 # creating a security policy, a default rule with action &quot;allow&quot; will be
2005 # added.
2006 { # Represents a rule that describes one or more match conditions along with
2007 # the action to be taken when traffic matches this condition (allow or deny).
2008 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2009 # The following are the valid actions:
2010 #
2011 # - allow: allow access to target.
2012 # - deny(STATUS): deny access to target, returns the
2013 # HTTP response code specified. Valid values for `STATUS`
2014 # are 403, 404, and 502.
2015 # - rate_based_ban: limit client traffic to the configured
2016 # threshold and ban the client if the traffic exceeds the threshold.
2017 # Configure parameters for this action in RateLimitOptions. Requires
2018 # rate_limit_options to be set.
2019 # - redirect: redirect to a different target. This can
2020 # either be an internal reCAPTCHA redirect, or an external URL-based
2021 # redirect via a 302 response. Parameters for this action can be configured
2022 # via redirectOptions. This action is only supported in Global Security
2023 # Policies of type CLOUD_ARMOR.
2024 # - throttle: limit
2025 # client traffic to the configured threshold. Configure parameters for this
2026 # action in rateLimitOptions. Requires rate_limit_options to be set for
2027 # this.
2028 # - fairshare (preview only): when traffic reaches the
2029 # threshold limit, requests from the clients matching this rule begin to be
2030 # rate-limited using the Fair Share algorithm. This action is only allowed
2031 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2032 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2033 # create the resource.
2034 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
2035 # specified when versioned_expr is set to FIREWALL.
2036 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
2037 # enabled, logs will be exported to the configured export destination in
2038 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
2039 # cannot enable logging on &quot;goto_next&quot; rules.
2040 #
2041 # This field may only be specified when the versioned_expr is set to
2042 # FIREWALL.
2043 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2044 # This field is only supported in Global Security Policies of type
2045 # CLOUD_ARMOR.
2046 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2047 # present.
2048 {
2049 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2050 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2051 },
2052 ],
2053 },
2054 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2055 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2056 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2057 # Exactly one field must be specified.
2058 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2059 # This field must be specified if versioned_expr is specified and cannot
2060 # be specified if versioned_expr is not specified.
2061 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2062 #
2063 # This field may only be specified when versioned_expr is set to
2064 # FIREWALL.
2065 &quot;A String&quot;,
2066 ],
2067 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2068 #
2069 # This field may only be specified when versioned_expr is set to
2070 # FIREWALL.
2071 {
2072 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2073 # required when creating a firewall rule. This value can either be
2074 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2075 # protocol number.
2076 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2077 # only applicable for UDP or TCP protocol. Each entry must be either
2078 # an integer or a range. If not specified, this rule applies to
2079 # connections through any port.
2080 #
2081 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2082 #
2083 # This field may only be specified when versioned_expr is set to
2084 # FIREWALL.
2085 &quot;A String&quot;,
2086 ],
2087 },
2088 ],
2089 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2090 # Maximum number of src_ip_ranges allowed is 10.
2091 &quot;A String&quot;,
2092 ],
2093 },
2094 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
2095 # A CEVAL expression is used to specify match criteria such as origin.ip,
2096 # source.region_code and contents in the request header.
2097 # Expressions containing `evaluateThreatIntelligence` require a Cloud
2098 # Armor Enterprise subscription and are not supported in Edge Policies
2099 # nor in Regional Policies. Expressions containing
2100 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
2101 # Enterprise subscription and are only supported in Global Security
2102 # Policies.
2103 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2104 # are documented at https://github.com/google/cel-spec.
2105 #
2106 # Example (Comparison):
2107 #
2108 # title: &quot;Summary size limit&quot;
2109 # description: &quot;Determines if a summary is less than 100 chars&quot;
2110 # expression: &quot;document.summary.size() &lt; 100&quot;
2111 #
2112 # Example (Equality):
2113 #
2114 # title: &quot;Requestor is owner&quot;
2115 # description: &quot;Determines if requestor is the document owner&quot;
2116 # expression: &quot;document.owner == request.auth.claims.email&quot;
2117 #
2118 # Example (Logic):
2119 #
2120 # title: &quot;Public documents&quot;
2121 # description: &quot;Determine whether the document should be publicly visible&quot;
2122 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2123 #
2124 # Example (Data Manipulation):
2125 #
2126 # title: &quot;Notification string&quot;
2127 # description: &quot;Create a notification string with a timestamp.&quot;
2128 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2129 #
2130 # The exact variables and functions that may be referenced within an expression
2131 # are determined by the service that evaluates it. See the service
2132 # documentation for additional information.
2133 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2134 # describes the expression, e.g. when hovered over it in a UI.
2135 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2136 # syntax.
2137 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2138 # reporting, e.g. a file name and a position in the file.
2139 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2140 # its purpose. This can be used e.g. in UIs which allow to enter the
2141 # expression.
2142 },
2143 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2144 # CEVAL expression (i.e., &#x27;expr&#x27;).
2145 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2146 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2147 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2148 # action-tokens. The provided site keys need to be created from
2149 # reCAPTCHA API under the same project where the security policy is
2150 # created.
2151 &quot;A String&quot;,
2152 ],
2153 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2154 # session-tokens. The provided site keys need to be created from
2155 # reCAPTCHA API under the same project where the security policy is
2156 # created.
2157 &quot;A String&quot;,
2158 ],
2159 },
2160 },
2161 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2162 # If this field is specified, config must also be specified.
2163 # Available preconfigured expressions along with their requirements are:
2164 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2165 # config.
2166 },
2167 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2168 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2169 # &#x27;action&#x27; is enforced.
2170 #
2171 # The match criteria for a rule consists of built-in match fields (like
2172 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2173 # (&#x27;userDefinedFields&#x27;).
2174 #
2175 # Field values may be extracted directly from the packet or derived from it
2176 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
2177 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
2178 # header is found in the packet and the entire field is in bounds.
2179 #
2180 # Each match field may specify which values can match it, listing one or
2181 # more ranges, prefixes, or exact values that are considered a match for
2182 # the field. A field value must be present in order to match a specified
2183 # match field. If no match values are specified for a match field, then any
2184 # field value is considered to match it, and it&#x27;s not required to be
2185 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
2186 #
2187 # For a packet to match a rule, all specified match fields must match the
2188 # corresponding field values derived from the packet.
2189 #
2190 # Example:
2191 #
2192 # networkMatch:
2193 # srcIpRanges:
2194 # - &quot;192.0.2.0/24&quot;
2195 # - &quot;198.51.100.0/24&quot;
2196 # userDefinedFields:
2197 # - name: &quot;ipv4_fragment_offset&quot;
2198 # values:
2199 # - &quot;1-0x1fff&quot;
2200 #
2201 # The above match condition matches packets with a source IP in
2202 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
2203 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
2204 # against.
2205 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
2206 # format.
2207 &quot;A String&quot;,
2208 ],
2209 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2210 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2211 &quot;A String&quot;,
2212 ],
2213 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
2214 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
2215 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
2216 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
2217 &quot;A String&quot;,
2218 ],
2219 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
2220 42,
2221 ],
2222 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
2223 &quot;A String&quot;,
2224 ],
2225 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2226 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2227 &quot;A String&quot;,
2228 ],
2229 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
2230 # IP address.
2231 &quot;A String&quot;,
2232 ],
2233 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
2234 # matching values for that field.
2235 {
2236 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
2237 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
2238 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
2239 # range (e.g. &quot;0x400-0x7ff&quot;).
2240 &quot;A String&quot;,
2241 ],
2242 },
2243 ],
2244 },
2245 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
2246 # does not evaluate preconfigured WAF rules, i.e., if
2247 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
2248 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
2249 {
2250 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
2251 # preconfigured WAF evaluation.
2252 {
2253 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2254 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2255 },
2256 ],
2257 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
2258 # inspection during preconfigured WAF evaluation.
2259 {
2260 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2261 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2262 },
2263 ],
2264 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
2265 # inspection during preconfigured WAF evaluation.
2266 {
2267 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2268 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2269 },
2270 ],
2271 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
2272 # from inspection during preconfigured WAF evaluation. Note that the
2273 # parameter can be in the query string or in the POST body.
2274 {
2275 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2276 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2277 },
2278 ],
2279 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
2280 # inspection during preconfigured WAF evaluation. When specifying this
2281 # field, the query or fragment part should be excluded.
2282 {
2283 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2284 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2285 },
2286 ],
2287 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
2288 # preconfigured WAF exclusion. If omitted, it refers to all the rule
2289 # IDs under the WAF rule set.
2290 &quot;A String&quot;,
2291 ],
2292 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
2293 },
2294 ],
2295 },
2296 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2297 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
2298 # must be a positive value between 0 and 2147483647.
2299 # Rules are evaluated from highest to lowest priority where 0 is the
2300 # highest priority and 2147483647 is the lowest priority.
2301 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
2302 # &quot;fairshare&quot;. Cannot be specified for any other actions.
2303 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
2304 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
2305 # the traffic will continue to be banned by the rate limit after the
2306 # rate falls below the threshold.
2307 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
2308 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
2309 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
2310 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2311 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2312 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2313 },
2314 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
2315 # threshold. Valid option is &quot;allow&quot; only.
2316 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2317 # values are:
2318 #
2319 # - ALL: A single rate limit threshold is applied to all
2320 # the requests matching this rule. This is the default value if
2321 # &quot;enforceOnKey&quot; is not configured.
2322 # - IP: The source IP address of
2323 # the request is the key. Each IP has this limit enforced
2324 # separately.
2325 # - HTTP_HEADER: The value of the HTTP
2326 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2327 # value is truncated to the first 128 bytes of the header value. If no
2328 # such header is present in the request, the key type defaults toALL.
2329 # - XFF_IP: The first IP address (i.e. the
2330 # originating client IP address) specified in the list of IPs under
2331 # X-Forwarded-For HTTP header. If no such header is present or the value
2332 # is not a valid IP, the key defaults to the source IP address of
2333 # the request i.e. key type IP.
2334 # - HTTP_COOKIE: The value of the HTTP
2335 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2336 # value is truncated to the first 128 bytes of the cookie value. If no
2337 # such cookie is present in the request, the key type defaults toALL.
2338 # - HTTP_PATH: The URL path of the HTTP request. The key
2339 # value is truncated to the first 128 bytes.
2340 # - SNI: Server name indication in the TLS session of the
2341 # HTTPS request. The key value is truncated to the first 128 bytes. The
2342 # key type defaults to ALL on a HTTP session.
2343 # - REGION_CODE: The country/region from which the request
2344 # originates.
2345 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2346 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2347 # key type defaults to ALL.
2348 # - USER_IP: The IP address of the originating client,
2349 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2350 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
2351 # an IP address cannot be resolved from it, the key type defaults toIP.
2352 #
2353 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2354 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2355 # key type defaults to ALL.
2356 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
2357 # limit threshold is enforced for all the requests matching the rule.
2358 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
2359 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
2360 # ratelimit threshold/action is enforced. You can specify up to 3
2361 # enforce_on_key_configs. If enforce_on_key_configs is specified,
2362 # enforce_on_key must not be specified.
2363 {
2364 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2365 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
2366 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
2367 # taken as the key value.
2368 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2369 # values are:
2370 #
2371 # - ALL: A single rate limit threshold is applied to all
2372 # the requests matching this rule. This is the default value if
2373 # &quot;enforceOnKeyConfigs&quot; is not configured.
2374 # - IP: The source IP address of
2375 # the request is the key. Each IP has this limit enforced
2376 # separately.
2377 # - HTTP_HEADER: The value of the HTTP
2378 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2379 # value is truncated to the first 128 bytes of the header value. If no
2380 # such header is present in the request, the key type defaults toALL.
2381 # - XFF_IP: The first IP address (i.e. the
2382 # originating client IP address) specified in the list of IPs under
2383 # X-Forwarded-For HTTP header. If no such header is present or the
2384 # value is not a valid IP, the key defaults to the source IP address of
2385 # the request i.e. key type IP.
2386 # - HTTP_COOKIE: The value of the HTTP
2387 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2388 # value is truncated to the first 128 bytes of the cookie value. If no
2389 # such cookie is present in the request, the key type defaults toALL.
2390 # - HTTP_PATH: The URL path of the HTTP request. The key
2391 # value is truncated to the first 128 bytes.
2392 # - SNI: Server name indication in the TLS session of
2393 # the HTTPS request. The key value is truncated to the first 128 bytes.
2394 # The key type defaults to ALL on a HTTP session.
2395 # - REGION_CODE: The country/region from which the
2396 # request originates.
2397 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2398 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2399 # key type defaults to ALL.
2400 # - USER_IP: The IP address of the originating client,
2401 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2402 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
2403 # or an IP address cannot be resolved from it, the key type defaults toIP.
2404 #
2405 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2406 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2407 # key type defaults to ALL.
2408 },
2409 ],
2410 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2411 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
2412 # value.
2413 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
2414 # value.
2415 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
2416 # threshold, to either deny with a specified HTTP response code, or
2417 # redirect to a different endpoint.
2418 # Valid options are `deny(STATUS)`, where valid values for
2419 # `STATUS` are 403, 404, 429, and 502, and
2420 # `redirect`, where the redirect parameters come from
2421 # `exceedRedirectOptions` below.
2422 # The `redirect` action is only supported in Global Security Policies of
2423 # type CLOUD_ARMOR.
2424 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
2425 # action. Cannot be specified if the exceed action is not redirect.
2426 # This field is only supported in Global Security Policies of type
2427 # CLOUD_ARMOR.
2428 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2429 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2430 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2431 #
2432 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2433 # challenge assessment.
2434 # - EXTERNAL_302: redirect to a different URL via a 302
2435 # response.
2436 },
2437 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
2438 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2439 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2440 },
2441 },
2442 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
2443 # other actions.
2444 # This field is only supported in Global Security Policies of type
2445 # CLOUD_ARMOR.
2446 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2447 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2448 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2449 #
2450 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2451 # challenge assessment.
2452 # - EXTERNAL_302: redirect to a different URL via a 302
2453 # response.
2454 },
2455 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
2456 # policy. This can only be set during rule creation, if rule number is not
2457 # specified it will be generated by the server.
2458 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
2459 # policy rule.
2460 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
2461 # allows you to control which network&#x27;s VMs get this rule. If this field
2462 # is left blank, all VMs within the organization will receive the rule.
2463 #
2464 # This field may only be specified when versioned_expr is set to FIREWALL.
2465 &quot;A String&quot;,
2466 ],
2467 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
2468 # applied with this rule.
2469 &quot;A String&quot;,
2470 ],
2471 },
2472 ],
2473 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
2474 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
2475 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
2476 # unique in the organization in which the security policy is created. This
2477 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
2478 # The name must be 1-63 characters long, and comply with
2479 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
2480 # characters long and match the regular expression
2481 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
2482 # lowercase letter, and all following characters must be a dash, lowercase
2483 # letter, or digit, except the last character, which cannot be a dash.
2484 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
2485 #
2486 # - CLOUD_ARMOR: Cloud Armor backend security policies can
2487 # be configured to filter incoming HTTP requests targeting backend services.
2488 # They filter requests before they hit the origin servers.
2489 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
2490 # be configured to filter incoming HTTP requests targeting backend services
2491 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
2492 # They filter requests before the request is served from Google&#x27;s cache.
2493 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
2494 # internal service policies can be configured to filter HTTP requests
2495 # targeting services managed by Traffic Director in a service mesh. They
2496 # filter requests before the request is served from the application.
2497 #
2498 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
2499 # can be configured to filter packets targeting network load balancing
2500 # resources such as backend services, target pools, target instances, and
2501 # instances with external IPs. They filter requests before the request is
2502 # served from the application.
2503 #
2504 #
2505 # This field can be set only at resource creation time.
2506 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
2507 # user-defined field consists of up to 4 bytes extracted from a fixed offset
2508 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
2509 # optional mask to select certain bits. Rules may then specify matching
2510 # values for these fields.
2511 #
2512 # Example:
2513 #
2514 # userDefinedFields:
2515 # - name: &quot;ipv4_fragment_offset&quot;
2516 # base: IPV4
2517 # offset: 6
2518 # size: 2
2519 # mask: &quot;0x1fff&quot;
2520 {
2521 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
2522 #
2523 # - IPV4: Points to the beginning of the IPv4 header.
2524 # - IPV6: Points to the beginning of the IPv6 header.
2525 # - TCP: Points to the beginning of the TCP header, skipping
2526 # over any IPv4 options or IPv6 extension headers. Not present for
2527 # non-first fragments.
2528 # - UDP: Points to the beginning of the UDP header, skipping
2529 # over any IPv4 options or IPv6 extension headers. Not present for
2530 # non-first fragments.
2531 #
2532 #
2533 # required
2534 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
2535 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
2536 # The last byte of the field (in network byte order) corresponds to the
2537 # least significant byte of the mask.
2538 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
2539 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
2540 # &#x27;base&#x27;.
2541 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
2542 },
2543 ],
2544 }</pre>
2545 </div>
2546
2547 <div class="method">
2548 <code class="details" id="getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</code>
2549 <pre>Gets an association with the specified name.
2550
2551 Use this API to read Cloud Armor policies. Previously, alpha and beta
2552 versions of this API were used to read firewall policies. This usage is
2553 now disabled for most organizations. Use firewallPolicies.getAssociation
2554 instead.
2555
2556 Args:
2557 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
2558 name: string, The name of the association to get from the security policy.
2559 x__xgafv: string, V1 error format.
2560 Allowed values
2561 1 - v1 error format
2562 2 - v2 error format
2563
2564 Returns:
2565 An object of the form:
2566
2567 {
2568 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
2569 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
2570 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
2571 &quot;A String&quot;,
2572 ],
2573 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
2574 &quot;A String&quot;,
2575 ],
2576 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
2577 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
2578 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
2579 }</pre>
2580 </div>
2581
2582 <div class="method">
2583 <code class="details" id="getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</code>
2584 <pre>Gets a rule at the specified priority.
2585
2586 Use this API to read Cloud Armor policies. Previously, alpha and beta
2587 versions of this API were used to read firewall policies. This usage is now
2588 disabled for most organizations. Use firewallPolicies.getRule instead.
2589
2590 Args:
2591 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
2592 priority: integer, The priority of the rule to get from the security policy.
2593 x__xgafv: string, V1 error format.
2594 Allowed values
2595 1 - v1 error format
2596 2 - v2 error format
2597
2598 Returns:
2599 An object of the form:
2600
2601 { # Represents a rule that describes one or more match conditions along with
2602 # the action to be taken when traffic matches this condition (allow or deny).
2603 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2604 # The following are the valid actions:
2605 #
2606 # - allow: allow access to target.
2607 # - deny(STATUS): deny access to target, returns the
2608 # HTTP response code specified. Valid values for `STATUS`
2609 # are 403, 404, and 502.
2610 # - rate_based_ban: limit client traffic to the configured
2611 # threshold and ban the client if the traffic exceeds the threshold.
2612 # Configure parameters for this action in RateLimitOptions. Requires
2613 # rate_limit_options to be set.
2614 # - redirect: redirect to a different target. This can
2615 # either be an internal reCAPTCHA redirect, or an external URL-based
2616 # redirect via a 302 response. Parameters for this action can be configured
2617 # via redirectOptions. This action is only supported in Global Security
2618 # Policies of type CLOUD_ARMOR.
2619 # - throttle: limit
2620 # client traffic to the configured threshold. Configure parameters for this
2621 # action in rateLimitOptions. Requires rate_limit_options to be set for
2622 # this.
2623 # - fairshare (preview only): when traffic reaches the
2624 # threshold limit, requests from the clients matching this rule begin to be
2625 # rate-limited using the Fair Share algorithm. This action is only allowed
2626 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2627 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2628 # create the resource.
2629 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
2630 # specified when versioned_expr is set to FIREWALL.
2631 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
2632 # enabled, logs will be exported to the configured export destination in
2633 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
2634 # cannot enable logging on &quot;goto_next&quot; rules.
2635 #
2636 # This field may only be specified when the versioned_expr is set to
2637 # FIREWALL.
2638 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2639 # This field is only supported in Global Security Policies of type
2640 # CLOUD_ARMOR.
2641 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2642 # present.
2643 {
2644 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2645 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2646 },
2647 ],
2648 },
2649 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2650 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2651 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2652 # Exactly one field must be specified.
2653 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2654 # This field must be specified if versioned_expr is specified and cannot
2655 # be specified if versioned_expr is not specified.
2656 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2657 #
2658 # This field may only be specified when versioned_expr is set to
2659 # FIREWALL.
2660 &quot;A String&quot;,
2661 ],
2662 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2663 #
2664 # This field may only be specified when versioned_expr is set to
2665 # FIREWALL.
2666 {
2667 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2668 # required when creating a firewall rule. This value can either be
2669 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2670 # protocol number.
2671 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2672 # only applicable for UDP or TCP protocol. Each entry must be either
2673 # an integer or a range. If not specified, this rule applies to
2674 # connections through any port.
2675 #
2676 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2677 #
2678 # This field may only be specified when versioned_expr is set to
2679 # FIREWALL.
2680 &quot;A String&quot;,
2681 ],
2682 },
2683 ],
2684 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2685 # Maximum number of src_ip_ranges allowed is 10.
2686 &quot;A String&quot;,
2687 ],
2688 },
2689 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
2690 # A CEVAL expression is used to specify match criteria such as origin.ip,
2691 # source.region_code and contents in the request header.
2692 # Expressions containing `evaluateThreatIntelligence` require a Cloud
2693 # Armor Enterprise subscription and are not supported in Edge Policies
2694 # nor in Regional Policies. Expressions containing
2695 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
2696 # Enterprise subscription and are only supported in Global Security
2697 # Policies.
2698 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2699 # are documented at https://github.com/google/cel-spec.
2700 #
2701 # Example (Comparison):
2702 #
2703 # title: &quot;Summary size limit&quot;
2704 # description: &quot;Determines if a summary is less than 100 chars&quot;
2705 # expression: &quot;document.summary.size() &lt; 100&quot;
2706 #
2707 # Example (Equality):
2708 #
2709 # title: &quot;Requestor is owner&quot;
2710 # description: &quot;Determines if requestor is the document owner&quot;
2711 # expression: &quot;document.owner == request.auth.claims.email&quot;
2712 #
2713 # Example (Logic):
2714 #
2715 # title: &quot;Public documents&quot;
2716 # description: &quot;Determine whether the document should be publicly visible&quot;
2717 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2718 #
2719 # Example (Data Manipulation):
2720 #
2721 # title: &quot;Notification string&quot;
2722 # description: &quot;Create a notification string with a timestamp.&quot;
2723 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2724 #
2725 # The exact variables and functions that may be referenced within an expression
2726 # are determined by the service that evaluates it. See the service
2727 # documentation for additional information.
2728 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2729 # describes the expression, e.g. when hovered over it in a UI.
2730 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2731 # syntax.
2732 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2733 # reporting, e.g. a file name and a position in the file.
2734 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2735 # its purpose. This can be used e.g. in UIs which allow to enter the
2736 # expression.
2737 },
2738 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2739 # CEVAL expression (i.e., &#x27;expr&#x27;).
2740 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2741 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2742 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2743 # action-tokens. The provided site keys need to be created from
2744 # reCAPTCHA API under the same project where the security policy is
2745 # created.
2746 &quot;A String&quot;,
2747 ],
2748 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2749 # session-tokens. The provided site keys need to be created from
2750 # reCAPTCHA API under the same project where the security policy is
2751 # created.
2752 &quot;A String&quot;,
2753 ],
2754 },
2755 },
2756 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2757 # If this field is specified, config must also be specified.
2758 # Available preconfigured expressions along with their requirements are:
2759 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2760 # config.
2761 },
2762 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2763 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2764 # &#x27;action&#x27; is enforced.
2765 #
2766 # The match criteria for a rule consists of built-in match fields (like
2767 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2768 # (&#x27;userDefinedFields&#x27;).
2769 #
2770 # Field values may be extracted directly from the packet or derived from it
2771 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
2772 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
2773 # header is found in the packet and the entire field is in bounds.
2774 #
2775 # Each match field may specify which values can match it, listing one or
2776 # more ranges, prefixes, or exact values that are considered a match for
2777 # the field. A field value must be present in order to match a specified
2778 # match field. If no match values are specified for a match field, then any
2779 # field value is considered to match it, and it&#x27;s not required to be
2780 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
2781 #
2782 # For a packet to match a rule, all specified match fields must match the
2783 # corresponding field values derived from the packet.
2784 #
2785 # Example:
2786 #
2787 # networkMatch:
2788 # srcIpRanges:
2789 # - &quot;192.0.2.0/24&quot;
2790 # - &quot;198.51.100.0/24&quot;
2791 # userDefinedFields:
2792 # - name: &quot;ipv4_fragment_offset&quot;
2793 # values:
2794 # - &quot;1-0x1fff&quot;
2795 #
2796 # The above match condition matches packets with a source IP in
2797 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
2798 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
2799 # against.
2800 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
2801 # format.
2802 &quot;A String&quot;,
2803 ],
2804 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2805 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2806 &quot;A String&quot;,
2807 ],
2808 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
2809 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
2810 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
2811 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
2812 &quot;A String&quot;,
2813 ],
2814 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
2815 42,
2816 ],
2817 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
2818 &quot;A String&quot;,
2819 ],
2820 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2821 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2822 &quot;A String&quot;,
2823 ],
2824 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
2825 # IP address.
2826 &quot;A String&quot;,
2827 ],
2828 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
2829 # matching values for that field.
2830 {
2831 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
2832 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
2833 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
2834 # range (e.g. &quot;0x400-0x7ff&quot;).
2835 &quot;A String&quot;,
2836 ],
2837 },
2838 ],
2839 },
2840 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
2841 # does not evaluate preconfigured WAF rules, i.e., if
2842 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
2843 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
2844 {
2845 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
2846 # preconfigured WAF evaluation.
2847 {
2848 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2849 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2850 },
2851 ],
2852 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
2853 # inspection during preconfigured WAF evaluation.
2854 {
2855 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2856 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2857 },
2858 ],
2859 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
2860 # inspection during preconfigured WAF evaluation.
2861 {
2862 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2863 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2864 },
2865 ],
2866 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
2867 # from inspection during preconfigured WAF evaluation. Note that the
2868 # parameter can be in the query string or in the POST body.
2869 {
2870 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2871 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2872 },
2873 ],
2874 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
2875 # inspection during preconfigured WAF evaluation. When specifying this
2876 # field, the query or fragment part should be excluded.
2877 {
2878 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2879 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2880 },
2881 ],
2882 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
2883 # preconfigured WAF exclusion. If omitted, it refers to all the rule
2884 # IDs under the WAF rule set.
2885 &quot;A String&quot;,
2886 ],
2887 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
2888 },
2889 ],
2890 },
2891 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2892 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
2893 # must be a positive value between 0 and 2147483647.
2894 # Rules are evaluated from highest to lowest priority where 0 is the
2895 # highest priority and 2147483647 is the lowest priority.
2896 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
2897 # &quot;fairshare&quot;. Cannot be specified for any other actions.
2898 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
2899 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
2900 # the traffic will continue to be banned by the rate limit after the
2901 # rate falls below the threshold.
2902 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
2903 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
2904 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
2905 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2906 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2907 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2908 },
2909 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
2910 # threshold. Valid option is &quot;allow&quot; only.
2911 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2912 # values are:
2913 #
2914 # - ALL: A single rate limit threshold is applied to all
2915 # the requests matching this rule. This is the default value if
2916 # &quot;enforceOnKey&quot; is not configured.
2917 # - IP: The source IP address of
2918 # the request is the key. Each IP has this limit enforced
2919 # separately.
2920 # - HTTP_HEADER: The value of the HTTP
2921 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2922 # value is truncated to the first 128 bytes of the header value. If no
2923 # such header is present in the request, the key type defaults toALL.
2924 # - XFF_IP: The first IP address (i.e. the
2925 # originating client IP address) specified in the list of IPs under
2926 # X-Forwarded-For HTTP header. If no such header is present or the value
2927 # is not a valid IP, the key defaults to the source IP address of
2928 # the request i.e. key type IP.
2929 # - HTTP_COOKIE: The value of the HTTP
2930 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2931 # value is truncated to the first 128 bytes of the cookie value. If no
2932 # such cookie is present in the request, the key type defaults toALL.
2933 # - HTTP_PATH: The URL path of the HTTP request. The key
2934 # value is truncated to the first 128 bytes.
2935 # - SNI: Server name indication in the TLS session of the
2936 # HTTPS request. The key value is truncated to the first 128 bytes. The
2937 # key type defaults to ALL on a HTTP session.
2938 # - REGION_CODE: The country/region from which the request
2939 # originates.
2940 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2941 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2942 # key type defaults to ALL.
2943 # - USER_IP: The IP address of the originating client,
2944 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2945 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
2946 # an IP address cannot be resolved from it, the key type defaults toIP.
2947 #
2948 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2949 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2950 # key type defaults to ALL.
2951 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
2952 # limit threshold is enforced for all the requests matching the rule.
2953 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
2954 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
2955 # ratelimit threshold/action is enforced. You can specify up to 3
2956 # enforce_on_key_configs. If enforce_on_key_configs is specified,
2957 # enforce_on_key must not be specified.
2958 {
2959 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2960 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
2961 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
2962 # taken as the key value.
2963 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2964 # values are:
2965 #
2966 # - ALL: A single rate limit threshold is applied to all
2967 # the requests matching this rule. This is the default value if
2968 # &quot;enforceOnKeyConfigs&quot; is not configured.
2969 # - IP: The source IP address of
2970 # the request is the key. Each IP has this limit enforced
2971 # separately.
2972 # - HTTP_HEADER: The value of the HTTP
2973 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2974 # value is truncated to the first 128 bytes of the header value. If no
2975 # such header is present in the request, the key type defaults toALL.
2976 # - XFF_IP: The first IP address (i.e. the
2977 # originating client IP address) specified in the list of IPs under
2978 # X-Forwarded-For HTTP header. If no such header is present or the
2979 # value is not a valid IP, the key defaults to the source IP address of
2980 # the request i.e. key type IP.
2981 # - HTTP_COOKIE: The value of the HTTP
2982 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2983 # value is truncated to the first 128 bytes of the cookie value. If no
2984 # such cookie is present in the request, the key type defaults toALL.
2985 # - HTTP_PATH: The URL path of the HTTP request. The key
2986 # value is truncated to the first 128 bytes.
2987 # - SNI: Server name indication in the TLS session of
2988 # the HTTPS request. The key value is truncated to the first 128 bytes.
2989 # The key type defaults to ALL on a HTTP session.
2990 # - REGION_CODE: The country/region from which the
2991 # request originates.
2992 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2993 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2994 # key type defaults to ALL.
2995 # - USER_IP: The IP address of the originating client,
2996 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2997 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
2998 # or an IP address cannot be resolved from it, the key type defaults toIP.
2999 #
3000 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3001 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3002 # key type defaults to ALL.
3003 },
3004 ],
3005 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3006 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
3007 # value.
3008 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
3009 # value.
3010 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
3011 # threshold, to either deny with a specified HTTP response code, or
3012 # redirect to a different endpoint.
3013 # Valid options are `deny(STATUS)`, where valid values for
3014 # `STATUS` are 403, 404, 429, and 502, and
3015 # `redirect`, where the redirect parameters come from
3016 # `exceedRedirectOptions` below.
3017 # The `redirect` action is only supported in Global Security Policies of
3018 # type CLOUD_ARMOR.
3019 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
3020 # action. Cannot be specified if the exceed action is not redirect.
3021 # This field is only supported in Global Security Policies of type
3022 # CLOUD_ARMOR.
3023 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3024 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3025 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3026 #
3027 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3028 # challenge assessment.
3029 # - EXTERNAL_302: redirect to a different URL via a 302
3030 # response.
3031 },
3032 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
3033 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3034 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3035 },
3036 },
3037 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
3038 # other actions.
3039 # This field is only supported in Global Security Policies of type
3040 # CLOUD_ARMOR.
3041 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3042 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3043 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3044 #
3045 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3046 # challenge assessment.
3047 # - EXTERNAL_302: redirect to a different URL via a 302
3048 # response.
3049 },
3050 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
3051 # policy. This can only be set during rule creation, if rule number is not
3052 # specified it will be generated by the server.
3053 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
3054 # policy rule.
3055 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
3056 # allows you to control which network&#x27;s VMs get this rule. If this field
3057 # is left blank, all VMs within the organization will receive the rule.
3058 #
3059 # This field may only be specified when versioned_expr is set to FIREWALL.
3060 &quot;A String&quot;,
3061 ],
3062 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
3063 # applied with this rule.
3064 &quot;A String&quot;,
3065 ],
3066 }</pre>
3067 </div>
3068
3069 <div class="method">
3070 <code class="details" id="insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</code>
3071 <pre>Creates a new policy in the specified organization using the data included
3072 in the request.
3073
3074 Use this API to add Cloud Armor policies. Previously, alpha and beta
3075 versions of this API were used to add firewall policies. This usage is now
3076 disabled for most organizations. Use firewallPolicies.insert instead.
3077
3078 Args:
3079 body: object, The request body.
3080 The object takes the form of:
3081
3082 { # Represents a Google Cloud Armor security policy resource.
3083 #
3084 # Only external backend services that use load balancers can
3085 # reference a security policy. For more information, see
3086 # Google Cloud Armor security policy overview.
3087 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
3088 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
3089 &quot;confidenceThreshold&quot;: 3.14,
3090 &quot;expirationSec&quot;: 42,
3091 &quot;impactedBaselineThreshold&quot;: 3.14,
3092 &quot;loadThreshold&quot;: 3.14,
3093 },
3094 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
3095 # This field is only supported in Global Security Policies of type
3096 # CLOUD_ARMOR.
3097 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
3098 # This field is only supported in Global Security Policies of type
3099 # CLOUD_ARMOR.
3100 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
3101 # STANDARD - opaque rules. (default)
3102 # PREMIUM - transparent rules.
3103 # This field is only supported in Global Security Policies of type
3104 # CLOUD_ARMOR.
3105 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
3106 # customizable thresholds.
3107 {
3108 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
3109 &quot;autoDeployExpirationSec&quot;: 42,
3110 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
3111 &quot;autoDeployLoadThreshold&quot;: 3.14,
3112 &quot;detectionAbsoluteQps&quot;: 3.14,
3113 &quot;detectionLoadThreshold&quot;: 3.14,
3114 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
3115 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
3116 # The name must be unique within the security policy.
3117 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
3118 # on specified granular traffic units.
3119 { # Configurations to specifc granular traffic units processed by
3120 # Adaptive Protection.
3121 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
3122 # type constitutes a separate traffic unit.
3123 # It can only be set to true if `value` is empty.
3124 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
3125 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
3126 },
3127 ],
3128 },
3129 ],
3130 },
3131 },
3132 &quot;advancedOptionsConfig&quot;: {
3133 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
3134 # json_parsing is set to STANDARD.
3135 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
3136 #
3137 # As per RFC 1341, a Content-Type header value has the following format:
3138 #
3139 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
3140 #
3141 # When configuring a custom Content-Type header value, only the
3142 # type/subtype needs to be specified, and the parameters should be
3143 # excluded.
3144 &quot;A String&quot;,
3145 ],
3146 },
3147 &quot;jsonParsing&quot;: &quot;A String&quot;,
3148 &quot;logLevel&quot;: &quot;A String&quot;,
3149 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
3150 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
3151 # Values are case insensitive.
3152 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
3153 # resolving the callers client IP address.
3154 &quot;A String&quot;,
3155 ],
3156 },
3157 &quot;associations&quot;: [ # A list of associations that belong to this policy.
3158 {
3159 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
3160 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
3161 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
3162 &quot;A String&quot;,
3163 ],
3164 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
3165 &quot;A String&quot;,
3166 ],
3167 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
3168 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
3169 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
3170 },
3171 ],
3172 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
3173 # text format.
3174 &quot;ddosProtectionConfig&quot;: {
3175 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
3176 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
3177 # builds DDoS mitigations that minimize collateral damage. It quantifies
3178 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
3179 # blocked.
3180 #
3181 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
3182 # not be deployed. Using a lower value will prioritize keeping collateral
3183 # damage low, possibly at the cost of its effectiveness in rate limiting
3184 # some or all of the attack. It should typically be unset, so Advanced DDoS
3185 # (and Adaptive Protection) uses the best mitigation it can find. Setting
3186 # the threshold is advised if there are logs for false positive detections
3187 # with high collateral damage, and will cause Advanced DDoS to attempt to
3188 # find a less aggressive rule that satisfies the constraint. If a suitable
3189 # rule cannot be found, the system falls back to either no mitigation for
3190 # smaller attacks or broader network throttles for larger ones.
3191 &quot;ddosProtection&quot;: &quot;A String&quot;,
3192 },
3193 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3194 # create the resource.
3195 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
3196 # unique in the organization in which the security policy is created. This
3197 # should only be used when SecurityPolicyType is FIREWALL.
3198 # The name must be 1-63 characters long, and comply with
3199 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
3200 # characters long and match the regular expression
3201 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
3202 # lowercase letter, and all following characters must be a dash, lowercase
3203 # letter, or digit, except the last character, which cannot be a dash.
3204 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
3205 # the metadata&#x27;s contents and used for optimistic locking. The
3206 # fingerprint is initially generated by Compute Engine and changes after
3207 # every request to modify or update metadata. You must always provide an
3208 # up-to-date fingerprint hash in order to update or change metadata,
3209 # otherwise the request will fail with error412 conditionNotMet.
3210 #
3211 # To see the latest fingerprint, make get() request to the
3212 # security policy.
3213 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
3214 # defined by the server.
3215 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
3216 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
3217 # is essentially a hash of the labels set used for optimistic locking. The
3218 # fingerprint is initially generated by Compute Engine and changes after
3219 # every request to modify or update labels. You must always provide an
3220 # up-to-date fingerprint hash in order to update or change labels.
3221 #
3222 # To see the latest fingerprint, make get() request to the
3223 # security policy.
3224 &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.
3225 # Label values may be empty.
3226 &quot;a_key&quot;: &quot;A String&quot;,
3227 },
3228 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
3229 # The name must be 1-63 characters long, and comply withRFC1035.
3230 # Specifically, the name must be 1-63 characters long and match the regular
3231 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
3232 # character must be a lowercase letter, and all following characters must
3233 # be a dash, lowercase letter, or digit, except the last character, which
3234 # cannot be a dash.
3235 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
3236 &quot;recaptchaOptionsConfig&quot;: {
3237 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
3238 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
3239 # the security policy. The specified site key needs to be created from the
3240 # reCAPTCHA API. The user is responsible for the validity of the specified
3241 # site key. If not specified, a Google-managed site key is used.
3242 # This field is only supported in Global Security Policies of type
3243 # CLOUD_ARMOR.
3244 },
3245 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
3246 # resides. This field is not applicable to global security policies.
3247 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
3248 # policy can not exceed a set number of tuples.
3249 &quot;rules&quot;: [ # A list of rules that belong to this policy.
3250 # There must always be a default rule which is a rule with priority
3251 # 2147483647 and match all condition (for the match condition this means
3252 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
3253 # must be either match &quot;*&quot; or not set). If no rules are provided when
3254 # creating a security policy, a default rule with action &quot;allow&quot; will be
3255 # added.
3256 { # Represents a rule that describes one or more match conditions along with
3257 # the action to be taken when traffic matches this condition (allow or deny).
3258 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
3259 # The following are the valid actions:
3260 #
3261 # - allow: allow access to target.
3262 # - deny(STATUS): deny access to target, returns the
3263 # HTTP response code specified. Valid values for `STATUS`
3264 # are 403, 404, and 502.
3265 # - rate_based_ban: limit client traffic to the configured
3266 # threshold and ban the client if the traffic exceeds the threshold.
3267 # Configure parameters for this action in RateLimitOptions. Requires
3268 # rate_limit_options to be set.
3269 # - redirect: redirect to a different target. This can
3270 # either be an internal reCAPTCHA redirect, or an external URL-based
3271 # redirect via a 302 response. Parameters for this action can be configured
3272 # via redirectOptions. This action is only supported in Global Security
3273 # Policies of type CLOUD_ARMOR.
3274 # - throttle: limit
3275 # client traffic to the configured threshold. Configure parameters for this
3276 # action in rateLimitOptions. Requires rate_limit_options to be set for
3277 # this.
3278 # - fairshare (preview only): when traffic reaches the
3279 # threshold limit, requests from the clients matching this rule begin to be
3280 # rate-limited using the Fair Share algorithm. This action is only allowed
3281 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
3282 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3283 # create the resource.
3284 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
3285 # specified when versioned_expr is set to FIREWALL.
3286 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
3287 # enabled, logs will be exported to the configured export destination in
3288 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
3289 # cannot enable logging on &quot;goto_next&quot; rules.
3290 #
3291 # This field may only be specified when the versioned_expr is set to
3292 # FIREWALL.
3293 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
3294 # This field is only supported in Global Security Policies of type
3295 # CLOUD_ARMOR.
3296 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
3297 # present.
3298 {
3299 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
3300 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
3301 },
3302 ],
3303 },
3304 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
3305 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
3306 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
3307 # Exactly one field must be specified.
3308 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
3309 # This field must be specified if versioned_expr is specified and cannot
3310 # be specified if versioned_expr is not specified.
3311 &quot;destIpRanges&quot;: [ # CIDR IP address range.
3312 #
3313 # This field may only be specified when versioned_expr is set to
3314 # FIREWALL.
3315 &quot;A String&quot;,
3316 ],
3317 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
3318 #
3319 # This field may only be specified when versioned_expr is set to
3320 # FIREWALL.
3321 {
3322 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
3323 # required when creating a firewall rule. This value can either be
3324 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
3325 # protocol number.
3326 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
3327 # only applicable for UDP or TCP protocol. Each entry must be either
3328 # an integer or a range. If not specified, this rule applies to
3329 # connections through any port.
3330 #
3331 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
3332 #
3333 # This field may only be specified when versioned_expr is set to
3334 # FIREWALL.
3335 &quot;A String&quot;,
3336 ],
3337 },
3338 ],
3339 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
3340 # Maximum number of src_ip_ranges allowed is 10.
3341 &quot;A String&quot;,
3342 ],
3343 },
3344 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
3345 # A CEVAL expression is used to specify match criteria such as origin.ip,
3346 # source.region_code and contents in the request header.
3347 # Expressions containing `evaluateThreatIntelligence` require a Cloud
3348 # Armor Enterprise subscription and are not supported in Edge Policies
3349 # nor in Regional Policies. Expressions containing
3350 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
3351 # Enterprise subscription and are only supported in Global Security
3352 # Policies.
3353 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3354 # are documented at https://github.com/google/cel-spec.
3355 #
3356 # Example (Comparison):
3357 #
3358 # title: &quot;Summary size limit&quot;
3359 # description: &quot;Determines if a summary is less than 100 chars&quot;
3360 # expression: &quot;document.summary.size() &lt; 100&quot;
3361 #
3362 # Example (Equality):
3363 #
3364 # title: &quot;Requestor is owner&quot;
3365 # description: &quot;Determines if requestor is the document owner&quot;
3366 # expression: &quot;document.owner == request.auth.claims.email&quot;
3367 #
3368 # Example (Logic):
3369 #
3370 # title: &quot;Public documents&quot;
3371 # description: &quot;Determine whether the document should be publicly visible&quot;
3372 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3373 #
3374 # Example (Data Manipulation):
3375 #
3376 # title: &quot;Notification string&quot;
3377 # description: &quot;Create a notification string with a timestamp.&quot;
3378 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3379 #
3380 # The exact variables and functions that may be referenced within an expression
3381 # are determined by the service that evaluates it. See the service
3382 # documentation for additional information.
3383 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3384 # describes the expression, e.g. when hovered over it in a UI.
3385 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3386 # syntax.
3387 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3388 # reporting, e.g. a file name and a position in the file.
3389 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3390 # its purpose. This can be used e.g. in UIs which allow to enter the
3391 # expression.
3392 },
3393 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
3394 # CEVAL expression (i.e., &#x27;expr&#x27;).
3395 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
3396 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
3397 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3398 # action-tokens. The provided site keys need to be created from
3399 # reCAPTCHA API under the same project where the security policy is
3400 # created.
3401 &quot;A String&quot;,
3402 ],
3403 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3404 # session-tokens. The provided site keys need to be created from
3405 # reCAPTCHA API under the same project where the security policy is
3406 # created.
3407 &quot;A String&quot;,
3408 ],
3409 },
3410 },
3411 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
3412 # If this field is specified, config must also be specified.
3413 # Available preconfigured expressions along with their requirements are:
3414 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
3415 # config.
3416 },
3417 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
3418 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
3419 # &#x27;action&#x27; is enforced.
3420 #
3421 # The match criteria for a rule consists of built-in match fields (like
3422 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
3423 # (&#x27;userDefinedFields&#x27;).
3424 #
3425 # Field values may be extracted directly from the packet or derived from it
3426 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
3427 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
3428 # header is found in the packet and the entire field is in bounds.
3429 #
3430 # Each match field may specify which values can match it, listing one or
3431 # more ranges, prefixes, or exact values that are considered a match for
3432 # the field. A field value must be present in order to match a specified
3433 # match field. If no match values are specified for a match field, then any
3434 # field value is considered to match it, and it&#x27;s not required to be
3435 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
3436 #
3437 # For a packet to match a rule, all specified match fields must match the
3438 # corresponding field values derived from the packet.
3439 #
3440 # Example:
3441 #
3442 # networkMatch:
3443 # srcIpRanges:
3444 # - &quot;192.0.2.0/24&quot;
3445 # - &quot;198.51.100.0/24&quot;
3446 # userDefinedFields:
3447 # - name: &quot;ipv4_fragment_offset&quot;
3448 # values:
3449 # - &quot;1-0x1fff&quot;
3450 #
3451 # The above match condition matches packets with a source IP in
3452 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
3453 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
3454 # against.
3455 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
3456 # format.
3457 &quot;A String&quot;,
3458 ],
3459 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3460 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3461 &quot;A String&quot;,
3462 ],
3463 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
3464 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
3465 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
3466 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
3467 &quot;A String&quot;,
3468 ],
3469 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
3470 42,
3471 ],
3472 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
3473 &quot;A String&quot;,
3474 ],
3475 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3476 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3477 &quot;A String&quot;,
3478 ],
3479 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
3480 # IP address.
3481 &quot;A String&quot;,
3482 ],
3483 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
3484 # matching values for that field.
3485 {
3486 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
3487 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
3488 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
3489 # range (e.g. &quot;0x400-0x7ff&quot;).
3490 &quot;A String&quot;,
3491 ],
3492 },
3493 ],
3494 },
3495 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
3496 # does not evaluate preconfigured WAF rules, i.e., if
3497 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
3498 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
3499 {
3500 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
3501 # preconfigured WAF evaluation.
3502 {
3503 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3504 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3505 },
3506 ],
3507 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
3508 # inspection during preconfigured WAF evaluation.
3509 {
3510 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3511 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3512 },
3513 ],
3514 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
3515 # inspection during preconfigured WAF evaluation.
3516 {
3517 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3518 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3519 },
3520 ],
3521 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
3522 # from inspection during preconfigured WAF evaluation. Note that the
3523 # parameter can be in the query string or in the POST body.
3524 {
3525 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3526 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3527 },
3528 ],
3529 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
3530 # inspection during preconfigured WAF evaluation. When specifying this
3531 # field, the query or fragment part should be excluded.
3532 {
3533 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3534 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3535 },
3536 ],
3537 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
3538 # preconfigured WAF exclusion. If omitted, it refers to all the rule
3539 # IDs under the WAF rule set.
3540 &quot;A String&quot;,
3541 ],
3542 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
3543 },
3544 ],
3545 },
3546 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
3547 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
3548 # must be a positive value between 0 and 2147483647.
3549 # Rules are evaluated from highest to lowest priority where 0 is the
3550 # highest priority and 2147483647 is the lowest priority.
3551 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
3552 # &quot;fairshare&quot;. Cannot be specified for any other actions.
3553 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
3554 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
3555 # the traffic will continue to be banned by the rate limit after the
3556 # rate falls below the threshold.
3557 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
3558 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
3559 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
3560 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
3561 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3562 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3563 },
3564 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
3565 # threshold. Valid option is &quot;allow&quot; only.
3566 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3567 # values are:
3568 #
3569 # - ALL: A single rate limit threshold is applied to all
3570 # the requests matching this rule. This is the default value if
3571 # &quot;enforceOnKey&quot; is not configured.
3572 # - IP: The source IP address of
3573 # the request is the key. Each IP has this limit enforced
3574 # separately.
3575 # - HTTP_HEADER: The value of the HTTP
3576 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3577 # value is truncated to the first 128 bytes of the header value. If no
3578 # such header is present in the request, the key type defaults toALL.
3579 # - XFF_IP: The first IP address (i.e. the
3580 # originating client IP address) specified in the list of IPs under
3581 # X-Forwarded-For HTTP header. If no such header is present or the value
3582 # is not a valid IP, the key defaults to the source IP address of
3583 # the request i.e. key type IP.
3584 # - HTTP_COOKIE: The value of the HTTP
3585 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3586 # value is truncated to the first 128 bytes of the cookie value. If no
3587 # such cookie is present in the request, the key type defaults toALL.
3588 # - HTTP_PATH: The URL path of the HTTP request. The key
3589 # value is truncated to the first 128 bytes.
3590 # - SNI: Server name indication in the TLS session of the
3591 # HTTPS request. The key value is truncated to the first 128 bytes. The
3592 # key type defaults to ALL on a HTTP session.
3593 # - REGION_CODE: The country/region from which the request
3594 # originates.
3595 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3596 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3597 # key type defaults to ALL.
3598 # - USER_IP: The IP address of the originating client,
3599 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3600 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
3601 # an IP address cannot be resolved from it, the key type defaults toIP.
3602 #
3603 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3604 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3605 # key type defaults to ALL.
3606 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
3607 # limit threshold is enforced for all the requests matching the rule.
3608 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
3609 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
3610 # ratelimit threshold/action is enforced. You can specify up to 3
3611 # enforce_on_key_configs. If enforce_on_key_configs is specified,
3612 # enforce_on_key must not be specified.
3613 {
3614 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3615 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
3616 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
3617 # taken as the key value.
3618 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3619 # values are:
3620 #
3621 # - ALL: A single rate limit threshold is applied to all
3622 # the requests matching this rule. This is the default value if
3623 # &quot;enforceOnKeyConfigs&quot; is not configured.
3624 # - IP: The source IP address of
3625 # the request is the key. Each IP has this limit enforced
3626 # separately.
3627 # - HTTP_HEADER: The value of the HTTP
3628 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3629 # value is truncated to the first 128 bytes of the header value. If no
3630 # such header is present in the request, the key type defaults toALL.
3631 # - XFF_IP: The first IP address (i.e. the
3632 # originating client IP address) specified in the list of IPs under
3633 # X-Forwarded-For HTTP header. If no such header is present or the
3634 # value is not a valid IP, the key defaults to the source IP address of
3635 # the request i.e. key type IP.
3636 # - HTTP_COOKIE: The value of the HTTP
3637 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3638 # value is truncated to the first 128 bytes of the cookie value. If no
3639 # such cookie is present in the request, the key type defaults toALL.
3640 # - HTTP_PATH: The URL path of the HTTP request. The key
3641 # value is truncated to the first 128 bytes.
3642 # - SNI: Server name indication in the TLS session of
3643 # the HTTPS request. The key value is truncated to the first 128 bytes.
3644 # The key type defaults to ALL on a HTTP session.
3645 # - REGION_CODE: The country/region from which the
3646 # request originates.
3647 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3648 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3649 # key type defaults to ALL.
3650 # - USER_IP: The IP address of the originating client,
3651 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3652 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
3653 # or an IP address cannot be resolved from it, the key type defaults toIP.
3654 #
3655 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3656 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3657 # key type defaults to ALL.
3658 },
3659 ],
3660 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3661 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
3662 # value.
3663 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
3664 # value.
3665 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
3666 # threshold, to either deny with a specified HTTP response code, or
3667 # redirect to a different endpoint.
3668 # Valid options are `deny(STATUS)`, where valid values for
3669 # `STATUS` are 403, 404, 429, and 502, and
3670 # `redirect`, where the redirect parameters come from
3671 # `exceedRedirectOptions` below.
3672 # The `redirect` action is only supported in Global Security Policies of
3673 # type CLOUD_ARMOR.
3674 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
3675 # action. Cannot be specified if the exceed action is not redirect.
3676 # This field is only supported in Global Security Policies of type
3677 # CLOUD_ARMOR.
3678 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3679 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3680 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3681 #
3682 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3683 # challenge assessment.
3684 # - EXTERNAL_302: redirect to a different URL via a 302
3685 # response.
3686 },
3687 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
3688 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3689 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3690 },
3691 },
3692 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
3693 # other actions.
3694 # This field is only supported in Global Security Policies of type
3695 # CLOUD_ARMOR.
3696 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3697 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3698 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3699 #
3700 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3701 # challenge assessment.
3702 # - EXTERNAL_302: redirect to a different URL via a 302
3703 # response.
3704 },
3705 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
3706 # policy. This can only be set during rule creation, if rule number is not
3707 # specified it will be generated by the server.
3708 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
3709 # policy rule.
3710 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
3711 # allows you to control which network&#x27;s VMs get this rule. If this field
3712 # is left blank, all VMs within the organization will receive the rule.
3713 #
3714 # This field may only be specified when versioned_expr is set to FIREWALL.
3715 &quot;A String&quot;,
3716 ],
3717 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
3718 # applied with this rule.
3719 &quot;A String&quot;,
3720 ],
3721 },
3722 ],
3723 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
3724 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
3725 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
3726 # unique in the organization in which the security policy is created. This
3727 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
3728 # The name must be 1-63 characters long, and comply with
3729 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
3730 # characters long and match the regular expression
3731 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
3732 # lowercase letter, and all following characters must be a dash, lowercase
3733 # letter, or digit, except the last character, which cannot be a dash.
3734 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
3735 #
3736 # - CLOUD_ARMOR: Cloud Armor backend security policies can
3737 # be configured to filter incoming HTTP requests targeting backend services.
3738 # They filter requests before they hit the origin servers.
3739 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
3740 # be configured to filter incoming HTTP requests targeting backend services
3741 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
3742 # They filter requests before the request is served from Google&#x27;s cache.
3743 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
3744 # internal service policies can be configured to filter HTTP requests
3745 # targeting services managed by Traffic Director in a service mesh. They
3746 # filter requests before the request is served from the application.
3747 #
3748 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
3749 # can be configured to filter packets targeting network load balancing
3750 # resources such as backend services, target pools, target instances, and
3751 # instances with external IPs. They filter requests before the request is
3752 # served from the application.
3753 #
3754 #
3755 # This field can be set only at resource creation time.
3756 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
3757 # user-defined field consists of up to 4 bytes extracted from a fixed offset
3758 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
3759 # optional mask to select certain bits. Rules may then specify matching
3760 # values for these fields.
3761 #
3762 # Example:
3763 #
3764 # userDefinedFields:
3765 # - name: &quot;ipv4_fragment_offset&quot;
3766 # base: IPV4
3767 # offset: 6
3768 # size: 2
3769 # mask: &quot;0x1fff&quot;
3770 {
3771 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
3772 #
3773 # - IPV4: Points to the beginning of the IPv4 header.
3774 # - IPV6: Points to the beginning of the IPv6 header.
3775 # - TCP: Points to the beginning of the TCP header, skipping
3776 # over any IPv4 options or IPv6 extension headers. Not present for
3777 # non-first fragments.
3778 # - UDP: Points to the beginning of the UDP header, skipping
3779 # over any IPv4 options or IPv6 extension headers. Not present for
3780 # non-first fragments.
3781 #
3782 #
3783 # required
3784 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
3785 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
3786 # The last byte of the field (in network byte order) corresponds to the
3787 # least significant byte of the mask.
3788 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
3789 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
3790 # &#x27;base&#x27;.
3791 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
3792 },
3793 ],
3794 }
3795
3796 parentId: string, Parent ID for this request. The ID can be either be &quot;folders/[FOLDER_ID]&quot;
3797 if the parent is a folder or &quot;organizations/[ORGANIZATION_ID]&quot; if the
3798 parent is an organization.
3799 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
3800 that if you must retry your request, the server will know to ignore the
3801 request if it has already been completed.
3802
3803 For example, consider a situation where you make an initial request and
3804 the request times out. If you make the request again with the same
3805 request ID, the server can check if original operation with the same
3806 request ID was received, and if so, will ignore the second request. This
3807 prevents clients from accidentally creating duplicate commitments.
3808
3809 The request ID must be
3810 a valid UUID with the exception that zero UUID is not supported
3811 (00000000-0000-0000-0000-000000000000).
3812 x__xgafv: string, V1 error format.
3813 Allowed values
3814 1 - v1 error format
3815 2 - v2 error format
3816
3817 Returns:
3818 An object of the form:
3819
3820 { # Represents an Operation resource.
3821 #
3822 # Google Compute Engine has three Operation resources:
3823 #
3824 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
3825 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
3826 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
3827 #
3828 # You can use an operation resource to manage asynchronous API requests.
3829 # For more information, readHandling
3830 # API responses.
3831 #
3832 # Operations can be global, regional or zonal.
3833 #
3834 # - For global operations, use the `globalOperations`
3835 # resource.
3836 # - For regional operations, use the
3837 # `regionOperations` resource.
3838 # - For zonal operations, use
3839 # the `zoneOperations` resource.
3840 #
3841 #
3842 #
3843 # For more information, read
3844 # Global, Regional, and Zonal Resources.
3845 #
3846 # Note that completed Operation resources have a limited
3847 # retention period.
3848 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
3849 # Not present otherwise.
3850 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3851 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
3852 # set when the operation is created.
3853 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
3854 # text format.
3855 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
3856 # this field will be populated.
3857 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
3858 # operation.
3859 {
3860 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3861 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
3862 # details. There is a set of defined message types to use for providing
3863 # details.The syntax depends on the error code. For example,
3864 # QuotaExceededInfo will have details when the error code is
3865 # QUOTA_EXCEEDED.
3866 {
3867 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
3868 #
3869 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
3870 # is not enabled:
3871 #
3872 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
3873 # &quot;domain&quot;: &quot;googleapis.com&quot;
3874 # &quot;metadata&quot;: {
3875 # &quot;resource&quot;: &quot;projects/123&quot;,
3876 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
3877 # }
3878 # }
3879 #
3880 # This response indicates that the pubsub.googleapis.com API is not enabled.
3881 #
3882 # Example of an error that is returned when attempting to create a Spanner
3883 # instance in a region that is out of stock:
3884 #
3885 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
3886 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
3887 # &quot;metadata&quot;: {
3888 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
3889 # }
3890 # }
3891 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
3892 # is typically the registered service name of the tool or product that
3893 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
3894 # generated by some common infrastructure, the error domain must be a
3895 # globally unique value that identifies the infrastructure. For Google API
3896 # infrastructure, the error domain is &quot;googleapis.com&quot;.
3897 &quot;metadatas&quot;: { # Additional structured details about this error.
3898 #
3899 # Keys must match a regular expression of `a-z+` but should
3900 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
3901 # length. When identifying the current value of an exceeded limit, the units
3902 # should be contained in the key, not the value. For example, rather than
3903 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
3904 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
3905 # instances that can be created in a single (batch) request.
3906 &quot;a_key&quot;: &quot;A String&quot;,
3907 },
3908 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
3909 # proximate cause of the error. Error reasons are unique within a particular
3910 # domain of errors. This should be at most 63 characters and match a
3911 # regular expression of `A-Z+[A-Z0-9]`, which represents
3912 # UPPER_SNAKE_CASE.
3913 },
3914 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
3915 #
3916 # For example, if a quota check failed with an error indicating the calling
3917 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
3918 # directly to the right place in the developer console to flip the bit.
3919 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
3920 { # Describes a URL link.
3921 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
3922 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
3923 },
3924 ],
3925 },
3926 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
3927 # which can be attached to an RPC error.
3928 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
3929 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
3930 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
3931 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
3932 },
3933 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
3934 &quot;dimensions&quot;: { # The map holding related quota dimensions.
3935 &quot;a_key&quot;: &quot;A String&quot;,
3936 },
3937 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
3938 # type or metric.
3939 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
3940 # or metric.
3941 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
3942 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
3943 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
3944 },
3945 },
3946 ],
3947 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
3948 # This property is optional.
3949 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
3950 },
3951 ],
3952 },
3953 &quot;getVersionOperationMetadata&quot;: {
3954 &quot;inlineSbomInfo&quot;: {
3955 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
3956 # appropriate identifiers.
3957 &quot;a_key&quot;: &quot;A String&quot;,
3958 },
3959 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
3960 # identifiers.
3961 &quot;a_key&quot;: &quot;A String&quot;,
3962 },
3963 },
3964 },
3965 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
3966 # message that was returned, such as `NOT FOUND`.
3967 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
3968 # status code that was returned. For example, a `404` means the
3969 # resource was not found.
3970 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
3971 # defined by the server.
3972 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
3973 # This value is inRFC3339
3974 # text format.
3975 &quot;instancesBulkInsertOperationMetadata&quot;: {
3976 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
3977 # Example key: zones/us-central1-a
3978 &quot;a_key&quot;: {
3979 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
3980 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
3981 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
3982 # error.
3983 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
3984 # if the flow is rolling forward or rolling back.
3985 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
3986 },
3987 },
3988 },
3989 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
3990 # Operation resources.
3991 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3992 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
3993 # group of operations results from a `bulkInsert` API request.
3994 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
3995 # `update`, or `delete`, and so on.
3996 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
3997 # There is no requirement that this be linear or support any granularity of
3998 # operations. This should not be used to guess when the operation will be
3999 # complete. This number should monotonically increase as the operation
4000 # progresses.
4001 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
4002 # applicable when performing regional operations.
4003 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4004 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
4005 # this field will contain information on all underlying zonal actions and
4006 # their state.
4007 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
4008 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
4009 # Example key: zones/us-central1-a
4010 &quot;a_key&quot;: {
4011 &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
4012 # populated.
4013 # different programming environments, including REST APIs and RPC APIs. It is
4014 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
4015 # three pieces of data: error code, error message, and error details.
4016 #
4017 # You can find out more about this error model and how to work with it in the
4018 # [API Design Guide](https://cloud.google.com/apis/design/errors).
4019 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
4020 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
4021 # message types for APIs to use.
4022 {
4023 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
4024 },
4025 ],
4026 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
4027 # user-facing error message should be localized and sent in the
4028 # google.rpc.Status.details field, or localized by the client.
4029 },
4030 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
4031 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
4032 },
4033 },
4034 },
4035 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
4036 # This value is inRFC3339
4037 # text format.
4038 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
4039 # following:
4040 # `PENDING`, `RUNNING`, or `DONE`.
4041 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
4042 # operation.
4043 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
4044 # of the target resource.
4045 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
4046 # operations related to creating a snapshot, this points to the disk
4047 # that the snapshot was created from.
4048 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
4049 # `[email protected]` or
4050 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
4051 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
4052 # operation, this field will be populated.
4053 {
4054 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
4055 # Engine returns NO_RESULTS_ON_PAGE if there
4056 # are no results in the response.
4057 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
4058 # value format. For example:
4059 #
4060 # &quot;data&quot;: [
4061 # {
4062 # &quot;key&quot;: &quot;scope&quot;,
4063 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
4064 # }
4065 {
4066 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
4067 # returned. For example, for warnings where there are no results in a list
4068 # request for a particular zone, this key might be scope and
4069 # the key value might be the zone name. Other examples might be a key
4070 # indicating a deprecated resource and a suggested replacement, or a
4071 # warning about invalid network settings (for example, if an instance
4072 # attempts to perform IP forwarding but is not enabled for IP forwarding).
4073 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4074 },
4075 ],
4076 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4077 },
4078 ],
4079 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
4080 # applicable when performing per-zone operations.
4081 }</pre>
4082 </div>
4083
4084 <div class="method">
4085 <code class="details" id="list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
4086 <pre>List all the policies that have been configured for the specified
4087 organization.
4088
4089 Use this API to read Cloud Armor policies. Previously, alpha and beta
4090 versions of this API were used to read firewall policies. This usage is now
4091 disabled for most organizations. Use firewallPolicies.list instead.
4092
4093 Args:
4094 filter: string, A filter expression that filters resources listed in the response. Most
4095 Compute resources support two types of filter expressions:
4096 expressions that support regular expressions and expressions that follow
4097 API improvement proposal AIP-160.
4098 These two types of filter expressions cannot be mixed in one request.
4099
4100 If you want to use AIP-160, your expression must specify the field name, an
4101 operator, and the value that you want to use for filtering. The value
4102 must be a string, a number, or a boolean. The operator
4103 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
4104
4105 For example, if you are filtering Compute Engine instances, you can
4106 exclude instances named `example-instance` by specifying
4107 `name != example-instance`.
4108
4109 The `:*` comparison can be used to test whether a key has been defined.
4110 For example, to find all objects with `owner` label use:
4111 ```
4112 labels.owner:*
4113 ```
4114
4115 You can also filter nested fields. For example, you could specify
4116 `scheduling.automaticRestart = false` to include instances only
4117 if they are not scheduled for automatic restarts. You can use filtering
4118 on nested fields to filter based onresource labels.
4119
4120 To filter on multiple expressions, provide each separate expression within
4121 parentheses. For example:
4122 ```
4123 (scheduling.automaticRestart = true)
4124 (cpuPlatform = &quot;Intel Skylake&quot;)
4125 ```
4126 By default, each expression is an `AND` expression. However, you
4127 can include `AND` and `OR` expressions explicitly.
4128 For example:
4129 ```
4130 (cpuPlatform = &quot;Intel Skylake&quot;) OR
4131 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
4132 (scheduling.automaticRestart = true)
4133 ```
4134
4135 If you want to use a regular expression, use the `eq` (equal) or `ne`
4136 (not equal) operator against a single un-parenthesized expression with or
4137 without quotes or against multiple parenthesized expressions. Examples:
4138
4139 `fieldname eq unquoted literal`
4140 `fieldname eq &#x27;single quoted literal&#x27;`
4141 `fieldname eq &quot;double quoted literal&quot;`
4142 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
4143
4144 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
4145 The literal value must match the entire field.
4146
4147 For example, to filter for instances that do not end with name &quot;instance&quot;,
4148 you would use `name ne .*instance`.
4149
4150 You cannot combine constraints on multiple fields using regular
4151 expressions.
4152 maxResults: integer, The maximum number of results per page that should be returned.
4153 If the number of available results is larger than `maxResults`,
4154 Compute Engine returns a `nextPageToken` that can be used to get
4155 the next page of results in subsequent list requests. Acceptable values are
4156 `0` to `500`, inclusive. (Default: `500`)
4157 orderBy: string, Sorts list results by a certain order. By default, results
4158 are returned in alphanumerical order based on the resource name.
4159
4160 You can also sort results in descending order based on the creation
4161 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
4162 results based on the `creationTimestamp` field in
4163 reverse chronological order (newest result first). Use this to sort
4164 resources like operations so that the newest operation is returned first.
4165
4166 Currently, only sorting by `name` or
4167 `creationTimestamp desc` is supported.
4168 pageToken: string, Specifies a page token to use. Set `pageToken` to the
4169 `nextPageToken` returned by a previous list request to get
4170 the next page of results.
4171 parentId: string, Parent ID for this request.
4172 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
4173 of failure. The default value is false.
4174
4175 For example, when partial success behavior is enabled, aggregatedList for a
4176 single zone scope either returns all resources in the zone or no resources,
4177 with an error code.
4178 x__xgafv: string, V1 error format.
4179 Allowed values
4180 1 - v1 error format
4181 2 - v2 error format
4182
4183 Returns:
4184 An object of the form:
4185
4186 {
4187 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
4188 &quot;items&quot;: [ # A list of SecurityPolicy resources.
4189 { # Represents a Google Cloud Armor security policy resource.
4190 #
4191 # Only external backend services that use load balancers can
4192 # reference a security policy. For more information, see
4193 # Google Cloud Armor security policy overview.
4194 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
4195 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
4196 &quot;confidenceThreshold&quot;: 3.14,
4197 &quot;expirationSec&quot;: 42,
4198 &quot;impactedBaselineThreshold&quot;: 3.14,
4199 &quot;loadThreshold&quot;: 3.14,
4200 },
4201 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
4202 # This field is only supported in Global Security Policies of type
4203 # CLOUD_ARMOR.
4204 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
4205 # This field is only supported in Global Security Policies of type
4206 # CLOUD_ARMOR.
4207 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
4208 # STANDARD - opaque rules. (default)
4209 # PREMIUM - transparent rules.
4210 # This field is only supported in Global Security Policies of type
4211 # CLOUD_ARMOR.
4212 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
4213 # customizable thresholds.
4214 {
4215 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
4216 &quot;autoDeployExpirationSec&quot;: 42,
4217 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
4218 &quot;autoDeployLoadThreshold&quot;: 3.14,
4219 &quot;detectionAbsoluteQps&quot;: 3.14,
4220 &quot;detectionLoadThreshold&quot;: 3.14,
4221 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
4222 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
4223 # The name must be unique within the security policy.
4224 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
4225 # on specified granular traffic units.
4226 { # Configurations to specifc granular traffic units processed by
4227 # Adaptive Protection.
4228 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
4229 # type constitutes a separate traffic unit.
4230 # It can only be set to true if `value` is empty.
4231 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
4232 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
4233 },
4234 ],
4235 },
4236 ],
4237 },
4238 },
4239 &quot;advancedOptionsConfig&quot;: {
4240 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
4241 # json_parsing is set to STANDARD.
4242 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
4243 #
4244 # As per RFC 1341, a Content-Type header value has the following format:
4245 #
4246 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
4247 #
4248 # When configuring a custom Content-Type header value, only the
4249 # type/subtype needs to be specified, and the parameters should be
4250 # excluded.
4251 &quot;A String&quot;,
4252 ],
4253 },
4254 &quot;jsonParsing&quot;: &quot;A String&quot;,
4255 &quot;logLevel&quot;: &quot;A String&quot;,
4256 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
4257 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
4258 # Values are case insensitive.
4259 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
4260 # resolving the callers client IP address.
4261 &quot;A String&quot;,
4262 ],
4263 },
4264 &quot;associations&quot;: [ # A list of associations that belong to this policy.
4265 {
4266 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
4267 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
4268 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
4269 &quot;A String&quot;,
4270 ],
4271 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
4272 &quot;A String&quot;,
4273 ],
4274 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
4275 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
4276 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
4277 },
4278 ],
4279 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
4280 # text format.
4281 &quot;ddosProtectionConfig&quot;: {
4282 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
4283 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
4284 # builds DDoS mitigations that minimize collateral damage. It quantifies
4285 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
4286 # blocked.
4287 #
4288 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
4289 # not be deployed. Using a lower value will prioritize keeping collateral
4290 # damage low, possibly at the cost of its effectiveness in rate limiting
4291 # some or all of the attack. It should typically be unset, so Advanced DDoS
4292 # (and Adaptive Protection) uses the best mitigation it can find. Setting
4293 # the threshold is advised if there are logs for false positive detections
4294 # with high collateral damage, and will cause Advanced DDoS to attempt to
4295 # find a less aggressive rule that satisfies the constraint. If a suitable
4296 # rule cannot be found, the system falls back to either no mitigation for
4297 # smaller attacks or broader network throttles for larger ones.
4298 &quot;ddosProtection&quot;: &quot;A String&quot;,
4299 },
4300 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4301 # create the resource.
4302 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
4303 # unique in the organization in which the security policy is created. This
4304 # should only be used when SecurityPolicyType is FIREWALL.
4305 # The name must be 1-63 characters long, and comply with
4306 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
4307 # characters long and match the regular expression
4308 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
4309 # lowercase letter, and all following characters must be a dash, lowercase
4310 # letter, or digit, except the last character, which cannot be a dash.
4311 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
4312 # the metadata&#x27;s contents and used for optimistic locking. The
4313 # fingerprint is initially generated by Compute Engine and changes after
4314 # every request to modify or update metadata. You must always provide an
4315 # up-to-date fingerprint hash in order to update or change metadata,
4316 # otherwise the request will fail with error412 conditionNotMet.
4317 #
4318 # To see the latest fingerprint, make get() request to the
4319 # security policy.
4320 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
4321 # defined by the server.
4322 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
4323 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
4324 # is essentially a hash of the labels set used for optimistic locking. The
4325 # fingerprint is initially generated by Compute Engine and changes after
4326 # every request to modify or update labels. You must always provide an
4327 # up-to-date fingerprint hash in order to update or change labels.
4328 #
4329 # To see the latest fingerprint, make get() request to the
4330 # security policy.
4331 &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.
4332 # Label values may be empty.
4333 &quot;a_key&quot;: &quot;A String&quot;,
4334 },
4335 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
4336 # The name must be 1-63 characters long, and comply withRFC1035.
4337 # Specifically, the name must be 1-63 characters long and match the regular
4338 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
4339 # character must be a lowercase letter, and all following characters must
4340 # be a dash, lowercase letter, or digit, except the last character, which
4341 # cannot be a dash.
4342 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
4343 &quot;recaptchaOptionsConfig&quot;: {
4344 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
4345 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
4346 # the security policy. The specified site key needs to be created from the
4347 # reCAPTCHA API. The user is responsible for the validity of the specified
4348 # site key. If not specified, a Google-managed site key is used.
4349 # This field is only supported in Global Security Policies of type
4350 # CLOUD_ARMOR.
4351 },
4352 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
4353 # resides. This field is not applicable to global security policies.
4354 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
4355 # policy can not exceed a set number of tuples.
4356 &quot;rules&quot;: [ # A list of rules that belong to this policy.
4357 # There must always be a default rule which is a rule with priority
4358 # 2147483647 and match all condition (for the match condition this means
4359 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
4360 # must be either match &quot;*&quot; or not set). If no rules are provided when
4361 # creating a security policy, a default rule with action &quot;allow&quot; will be
4362 # added.
4363 { # Represents a rule that describes one or more match conditions along with
4364 # the action to be taken when traffic matches this condition (allow or deny).
4365 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
4366 # The following are the valid actions:
4367 #
4368 # - allow: allow access to target.
4369 # - deny(STATUS): deny access to target, returns the
4370 # HTTP response code specified. Valid values for `STATUS`
4371 # are 403, 404, and 502.
4372 # - rate_based_ban: limit client traffic to the configured
4373 # threshold and ban the client if the traffic exceeds the threshold.
4374 # Configure parameters for this action in RateLimitOptions. Requires
4375 # rate_limit_options to be set.
4376 # - redirect: redirect to a different target. This can
4377 # either be an internal reCAPTCHA redirect, or an external URL-based
4378 # redirect via a 302 response. Parameters for this action can be configured
4379 # via redirectOptions. This action is only supported in Global Security
4380 # Policies of type CLOUD_ARMOR.
4381 # - throttle: limit
4382 # client traffic to the configured threshold. Configure parameters for this
4383 # action in rateLimitOptions. Requires rate_limit_options to be set for
4384 # this.
4385 # - fairshare (preview only): when traffic reaches the
4386 # threshold limit, requests from the clients matching this rule begin to be
4387 # rate-limited using the Fair Share algorithm. This action is only allowed
4388 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
4389 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4390 # create the resource.
4391 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
4392 # specified when versioned_expr is set to FIREWALL.
4393 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
4394 # enabled, logs will be exported to the configured export destination in
4395 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
4396 # cannot enable logging on &quot;goto_next&quot; rules.
4397 #
4398 # This field may only be specified when the versioned_expr is set to
4399 # FIREWALL.
4400 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
4401 # This field is only supported in Global Security Policies of type
4402 # CLOUD_ARMOR.
4403 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
4404 # present.
4405 {
4406 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
4407 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
4408 },
4409 ],
4410 },
4411 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
4412 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
4413 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
4414 # Exactly one field must be specified.
4415 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
4416 # This field must be specified if versioned_expr is specified and cannot
4417 # be specified if versioned_expr is not specified.
4418 &quot;destIpRanges&quot;: [ # CIDR IP address range.
4419 #
4420 # This field may only be specified when versioned_expr is set to
4421 # FIREWALL.
4422 &quot;A String&quot;,
4423 ],
4424 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
4425 #
4426 # This field may only be specified when versioned_expr is set to
4427 # FIREWALL.
4428 {
4429 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
4430 # required when creating a firewall rule. This value can either be
4431 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
4432 # protocol number.
4433 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
4434 # only applicable for UDP or TCP protocol. Each entry must be either
4435 # an integer or a range. If not specified, this rule applies to
4436 # connections through any port.
4437 #
4438 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
4439 #
4440 # This field may only be specified when versioned_expr is set to
4441 # FIREWALL.
4442 &quot;A String&quot;,
4443 ],
4444 },
4445 ],
4446 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
4447 # Maximum number of src_ip_ranges allowed is 10.
4448 &quot;A String&quot;,
4449 ],
4450 },
4451 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
4452 # A CEVAL expression is used to specify match criteria such as origin.ip,
4453 # source.region_code and contents in the request header.
4454 # Expressions containing `evaluateThreatIntelligence` require a Cloud
4455 # Armor Enterprise subscription and are not supported in Edge Policies
4456 # nor in Regional Policies. Expressions containing
4457 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
4458 # Enterprise subscription and are only supported in Global Security
4459 # Policies.
4460 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4461 # are documented at https://github.com/google/cel-spec.
4462 #
4463 # Example (Comparison):
4464 #
4465 # title: &quot;Summary size limit&quot;
4466 # description: &quot;Determines if a summary is less than 100 chars&quot;
4467 # expression: &quot;document.summary.size() &lt; 100&quot;
4468 #
4469 # Example (Equality):
4470 #
4471 # title: &quot;Requestor is owner&quot;
4472 # description: &quot;Determines if requestor is the document owner&quot;
4473 # expression: &quot;document.owner == request.auth.claims.email&quot;
4474 #
4475 # Example (Logic):
4476 #
4477 # title: &quot;Public documents&quot;
4478 # description: &quot;Determine whether the document should be publicly visible&quot;
4479 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4480 #
4481 # Example (Data Manipulation):
4482 #
4483 # title: &quot;Notification string&quot;
4484 # description: &quot;Create a notification string with a timestamp.&quot;
4485 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4486 #
4487 # The exact variables and functions that may be referenced within an expression
4488 # are determined by the service that evaluates it. See the service
4489 # documentation for additional information.
4490 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4491 # describes the expression, e.g. when hovered over it in a UI.
4492 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4493 # syntax.
4494 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4495 # reporting, e.g. a file name and a position in the file.
4496 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4497 # its purpose. This can be used e.g. in UIs which allow to enter the
4498 # expression.
4499 },
4500 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
4501 # CEVAL expression (i.e., &#x27;expr&#x27;).
4502 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
4503 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
4504 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4505 # action-tokens. The provided site keys need to be created from
4506 # reCAPTCHA API under the same project where the security policy is
4507 # created.
4508 &quot;A String&quot;,
4509 ],
4510 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4511 # session-tokens. The provided site keys need to be created from
4512 # reCAPTCHA API under the same project where the security policy is
4513 # created.
4514 &quot;A String&quot;,
4515 ],
4516 },
4517 },
4518 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
4519 # If this field is specified, config must also be specified.
4520 # Available preconfigured expressions along with their requirements are:
4521 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
4522 # config.
4523 },
4524 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
4525 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
4526 # &#x27;action&#x27; is enforced.
4527 #
4528 # The match criteria for a rule consists of built-in match fields (like
4529 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
4530 # (&#x27;userDefinedFields&#x27;).
4531 #
4532 # Field values may be extracted directly from the packet or derived from it
4533 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
4534 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
4535 # header is found in the packet and the entire field is in bounds.
4536 #
4537 # Each match field may specify which values can match it, listing one or
4538 # more ranges, prefixes, or exact values that are considered a match for
4539 # the field. A field value must be present in order to match a specified
4540 # match field. If no match values are specified for a match field, then any
4541 # field value is considered to match it, and it&#x27;s not required to be
4542 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
4543 #
4544 # For a packet to match a rule, all specified match fields must match the
4545 # corresponding field values derived from the packet.
4546 #
4547 # Example:
4548 #
4549 # networkMatch:
4550 # srcIpRanges:
4551 # - &quot;192.0.2.0/24&quot;
4552 # - &quot;198.51.100.0/24&quot;
4553 # userDefinedFields:
4554 # - name: &quot;ipv4_fragment_offset&quot;
4555 # values:
4556 # - &quot;1-0x1fff&quot;
4557 #
4558 # The above match condition matches packets with a source IP in
4559 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
4560 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
4561 # against.
4562 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
4563 # format.
4564 &quot;A String&quot;,
4565 ],
4566 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4567 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4568 &quot;A String&quot;,
4569 ],
4570 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
4571 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
4572 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
4573 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
4574 &quot;A String&quot;,
4575 ],
4576 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
4577 42,
4578 ],
4579 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
4580 &quot;A String&quot;,
4581 ],
4582 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4583 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4584 &quot;A String&quot;,
4585 ],
4586 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
4587 # IP address.
4588 &quot;A String&quot;,
4589 ],
4590 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
4591 # matching values for that field.
4592 {
4593 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
4594 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
4595 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
4596 # range (e.g. &quot;0x400-0x7ff&quot;).
4597 &quot;A String&quot;,
4598 ],
4599 },
4600 ],
4601 },
4602 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
4603 # does not evaluate preconfigured WAF rules, i.e., if
4604 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
4605 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
4606 {
4607 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
4608 # preconfigured WAF evaluation.
4609 {
4610 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4611 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4612 },
4613 ],
4614 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
4615 # inspection during preconfigured WAF evaluation.
4616 {
4617 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4618 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4619 },
4620 ],
4621 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
4622 # inspection during preconfigured WAF evaluation.
4623 {
4624 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4625 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4626 },
4627 ],
4628 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
4629 # from inspection during preconfigured WAF evaluation. Note that the
4630 # parameter can be in the query string or in the POST body.
4631 {
4632 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4633 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4634 },
4635 ],
4636 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
4637 # inspection during preconfigured WAF evaluation. When specifying this
4638 # field, the query or fragment part should be excluded.
4639 {
4640 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4641 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4642 },
4643 ],
4644 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
4645 # preconfigured WAF exclusion. If omitted, it refers to all the rule
4646 # IDs under the WAF rule set.
4647 &quot;A String&quot;,
4648 ],
4649 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
4650 },
4651 ],
4652 },
4653 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
4654 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
4655 # must be a positive value between 0 and 2147483647.
4656 # Rules are evaluated from highest to lowest priority where 0 is the
4657 # highest priority and 2147483647 is the lowest priority.
4658 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
4659 # &quot;fairshare&quot;. Cannot be specified for any other actions.
4660 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
4661 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
4662 # the traffic will continue to be banned by the rate limit after the
4663 # rate falls below the threshold.
4664 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
4665 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
4666 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
4667 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
4668 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
4669 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
4670 },
4671 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
4672 # threshold. Valid option is &quot;allow&quot; only.
4673 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4674 # values are:
4675 #
4676 # - ALL: A single rate limit threshold is applied to all
4677 # the requests matching this rule. This is the default value if
4678 # &quot;enforceOnKey&quot; is not configured.
4679 # - IP: The source IP address of
4680 # the request is the key. Each IP has this limit enforced
4681 # separately.
4682 # - HTTP_HEADER: The value of the HTTP
4683 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4684 # value is truncated to the first 128 bytes of the header value. If no
4685 # such header is present in the request, the key type defaults toALL.
4686 # - XFF_IP: The first IP address (i.e. the
4687 # originating client IP address) specified in the list of IPs under
4688 # X-Forwarded-For HTTP header. If no such header is present or the value
4689 # is not a valid IP, the key defaults to the source IP address of
4690 # the request i.e. key type IP.
4691 # - HTTP_COOKIE: The value of the HTTP
4692 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4693 # value is truncated to the first 128 bytes of the cookie value. If no
4694 # such cookie is present in the request, the key type defaults toALL.
4695 # - HTTP_PATH: The URL path of the HTTP request. The key
4696 # value is truncated to the first 128 bytes.
4697 # - SNI: Server name indication in the TLS session of the
4698 # HTTPS request. The key value is truncated to the first 128 bytes. The
4699 # key type defaults to ALL on a HTTP session.
4700 # - REGION_CODE: The country/region from which the request
4701 # originates.
4702 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4703 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4704 # key type defaults to ALL.
4705 # - USER_IP: The IP address of the originating client,
4706 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4707 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
4708 # an IP address cannot be resolved from it, the key type defaults toIP.
4709 #
4710 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4711 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4712 # key type defaults to ALL.
4713 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
4714 # limit threshold is enforced for all the requests matching the rule.
4715 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
4716 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
4717 # ratelimit threshold/action is enforced. You can specify up to 3
4718 # enforce_on_key_configs. If enforce_on_key_configs is specified,
4719 # enforce_on_key must not be specified.
4720 {
4721 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4722 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
4723 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
4724 # taken as the key value.
4725 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4726 # values are:
4727 #
4728 # - ALL: A single rate limit threshold is applied to all
4729 # the requests matching this rule. This is the default value if
4730 # &quot;enforceOnKeyConfigs&quot; is not configured.
4731 # - IP: The source IP address of
4732 # the request is the key. Each IP has this limit enforced
4733 # separately.
4734 # - HTTP_HEADER: The value of the HTTP
4735 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4736 # value is truncated to the first 128 bytes of the header value. If no
4737 # such header is present in the request, the key type defaults toALL.
4738 # - XFF_IP: The first IP address (i.e. the
4739 # originating client IP address) specified in the list of IPs under
4740 # X-Forwarded-For HTTP header. If no such header is present or the
4741 # value is not a valid IP, the key defaults to the source IP address of
4742 # the request i.e. key type IP.
4743 # - HTTP_COOKIE: The value of the HTTP
4744 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4745 # value is truncated to the first 128 bytes of the cookie value. If no
4746 # such cookie is present in the request, the key type defaults toALL.
4747 # - HTTP_PATH: The URL path of the HTTP request. The key
4748 # value is truncated to the first 128 bytes.
4749 # - SNI: Server name indication in the TLS session of
4750 # the HTTPS request. The key value is truncated to the first 128 bytes.
4751 # The key type defaults to ALL on a HTTP session.
4752 # - REGION_CODE: The country/region from which the
4753 # request originates.
4754 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4755 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4756 # key type defaults to ALL.
4757 # - USER_IP: The IP address of the originating client,
4758 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4759 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
4760 # or an IP address cannot be resolved from it, the key type defaults toIP.
4761 #
4762 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4763 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4764 # key type defaults to ALL.
4765 },
4766 ],
4767 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4768 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
4769 # value.
4770 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
4771 # value.
4772 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
4773 # threshold, to either deny with a specified HTTP response code, or
4774 # redirect to a different endpoint.
4775 # Valid options are `deny(STATUS)`, where valid values for
4776 # `STATUS` are 403, 404, 429, and 502, and
4777 # `redirect`, where the redirect parameters come from
4778 # `exceedRedirectOptions` below.
4779 # The `redirect` action is only supported in Global Security Policies of
4780 # type CLOUD_ARMOR.
4781 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
4782 # action. Cannot be specified if the exceed action is not redirect.
4783 # This field is only supported in Global Security Policies of type
4784 # CLOUD_ARMOR.
4785 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
4786 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
4787 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
4788 #
4789 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
4790 # challenge assessment.
4791 # - EXTERNAL_302: redirect to a different URL via a 302
4792 # response.
4793 },
4794 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
4795 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
4796 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
4797 },
4798 },
4799 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
4800 # other actions.
4801 # This field is only supported in Global Security Policies of type
4802 # CLOUD_ARMOR.
4803 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
4804 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
4805 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
4806 #
4807 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
4808 # challenge assessment.
4809 # - EXTERNAL_302: redirect to a different URL via a 302
4810 # response.
4811 },
4812 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
4813 # policy. This can only be set during rule creation, if rule number is not
4814 # specified it will be generated by the server.
4815 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
4816 # policy rule.
4817 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
4818 # allows you to control which network&#x27;s VMs get this rule. If this field
4819 # is left blank, all VMs within the organization will receive the rule.
4820 #
4821 # This field may only be specified when versioned_expr is set to FIREWALL.
4822 &quot;A String&quot;,
4823 ],
4824 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
4825 # applied with this rule.
4826 &quot;A String&quot;,
4827 ],
4828 },
4829 ],
4830 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
4831 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
4832 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
4833 # unique in the organization in which the security policy is created. This
4834 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
4835 # The name must be 1-63 characters long, and comply with
4836 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
4837 # characters long and match the regular expression
4838 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
4839 # lowercase letter, and all following characters must be a dash, lowercase
4840 # letter, or digit, except the last character, which cannot be a dash.
4841 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
4842 #
4843 # - CLOUD_ARMOR: Cloud Armor backend security policies can
4844 # be configured to filter incoming HTTP requests targeting backend services.
4845 # They filter requests before they hit the origin servers.
4846 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
4847 # be configured to filter incoming HTTP requests targeting backend services
4848 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
4849 # They filter requests before the request is served from Google&#x27;s cache.
4850 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
4851 # internal service policies can be configured to filter HTTP requests
4852 # targeting services managed by Traffic Director in a service mesh. They
4853 # filter requests before the request is served from the application.
4854 #
4855 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
4856 # can be configured to filter packets targeting network load balancing
4857 # resources such as backend services, target pools, target instances, and
4858 # instances with external IPs. They filter requests before the request is
4859 # served from the application.
4860 #
4861 #
4862 # This field can be set only at resource creation time.
4863 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
4864 # user-defined field consists of up to 4 bytes extracted from a fixed offset
4865 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
4866 # optional mask to select certain bits. Rules may then specify matching
4867 # values for these fields.
4868 #
4869 # Example:
4870 #
4871 # userDefinedFields:
4872 # - name: &quot;ipv4_fragment_offset&quot;
4873 # base: IPV4
4874 # offset: 6
4875 # size: 2
4876 # mask: &quot;0x1fff&quot;
4877 {
4878 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
4879 #
4880 # - IPV4: Points to the beginning of the IPv4 header.
4881 # - IPV6: Points to the beginning of the IPv6 header.
4882 # - TCP: Points to the beginning of the TCP header, skipping
4883 # over any IPv4 options or IPv6 extension headers. Not present for
4884 # non-first fragments.
4885 # - UDP: Points to the beginning of the UDP header, skipping
4886 # over any IPv4 options or IPv6 extension headers. Not present for
4887 # non-first fragments.
4888 #
4889 #
4890 # required
4891 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
4892 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
4893 # The last byte of the field (in network byte order) corresponds to the
4894 # least significant byte of the mask.
4895 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
4896 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
4897 # &#x27;base&#x27;.
4898 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
4899 },
4900 ],
4901 },
4902 ],
4903 &quot;kind&quot;: &quot;compute#securityPolicyList&quot;, # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyList for listsof securityPolicies
4904 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
4905 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
4906 # the query parameter pageToken in the next list request.
4907 # Subsequent list requests will have their own nextPageToken to
4908 # continue paging through the results.
4909 &quot;warning&quot;: { # [Output Only] Informational warning message.
4910 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
4911 # Engine returns NO_RESULTS_ON_PAGE if there
4912 # are no results in the response.
4913 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
4914 # value format. For example:
4915 #
4916 # &quot;data&quot;: [
4917 # {
4918 # &quot;key&quot;: &quot;scope&quot;,
4919 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
4920 # }
4921 {
4922 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
4923 # returned. For example, for warnings where there are no results in a list
4924 # request for a particular zone, this key might be scope and
4925 # the key value might be the zone name. Other examples might be a key
4926 # indicating a deprecated resource and a suggested replacement, or a
4927 # warning about invalid network settings (for example, if an instance
4928 # attempts to perform IP forwarding but is not enabled for IP forwarding).
4929 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4930 },
4931 ],
4932 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4933 },
4934 }</pre>
4935 </div>
4936
4937 <div class="method">
4938 <code class="details" id="listAssociations">listAssociations(targetResource=None, x__xgafv=None)</code>
4939 <pre>Lists associations of a specified target, i.e., organization or folder.
4940
4941 Use this API to read Cloud Armor policies. Previously, alpha and beta
4942 versions of this API were used to read firewall policies. This usage is
4943 now disabled for most organizations. Use firewallPolicies.listAssociations
4944 instead.
4945
4946 Args:
4947 targetResource: string, The target resource to list associations. It is an organization, or a
4948 folder.
4949 x__xgafv: string, V1 error format.
4950 Allowed values
4951 1 - v1 error format
4952 2 - v2 error format
4953
4954 Returns:
4955 An object of the form:
4956
4957 {
4958 &quot;associations&quot;: [ # A list of associations.
4959 {
4960 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
4961 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
4962 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
4963 &quot;A String&quot;,
4964 ],
4965 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
4966 &quot;A String&quot;,
4967 ],
4968 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
4969 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
4970 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
4971 },
4972 ],
4973 &quot;kind&quot;: &quot;compute#organizationSecurityPoliciesListAssociationsResponse&quot;, # Output only. [Output Only] Type of securityPolicy associations. Alwayscompute#organizationSecurityPoliciesListAssociations for lists
4974 # of securityPolicy associations.
4975 }</pre>
4976 </div>
4977
4978 <div class="method">
4979 <code class="details" id="listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
4980 <pre>Gets the current list of preconfigured Web Application Firewall (WAF)
4981 expressions.
4982
4983 Args:
4984 filter: string, A filter expression that filters resources listed in the response. Most
4985 Compute resources support two types of filter expressions:
4986 expressions that support regular expressions and expressions that follow
4987 API improvement proposal AIP-160.
4988 These two types of filter expressions cannot be mixed in one request.
4989
4990 If you want to use AIP-160, your expression must specify the field name, an
4991 operator, and the value that you want to use for filtering. The value
4992 must be a string, a number, or a boolean. The operator
4993 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
4994
4995 For example, if you are filtering Compute Engine instances, you can
4996 exclude instances named `example-instance` by specifying
4997 `name != example-instance`.
4998
4999 The `:*` comparison can be used to test whether a key has been defined.
5000 For example, to find all objects with `owner` label use:
5001 ```
5002 labels.owner:*
5003 ```
5004
5005 You can also filter nested fields. For example, you could specify
5006 `scheduling.automaticRestart = false` to include instances only
5007 if they are not scheduled for automatic restarts. You can use filtering
5008 on nested fields to filter based onresource labels.
5009
5010 To filter on multiple expressions, provide each separate expression within
5011 parentheses. For example:
5012 ```
5013 (scheduling.automaticRestart = true)
5014 (cpuPlatform = &quot;Intel Skylake&quot;)
5015 ```
5016 By default, each expression is an `AND` expression. However, you
5017 can include `AND` and `OR` expressions explicitly.
5018 For example:
5019 ```
5020 (cpuPlatform = &quot;Intel Skylake&quot;) OR
5021 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
5022 (scheduling.automaticRestart = true)
5023 ```
5024
5025 If you want to use a regular expression, use the `eq` (equal) or `ne`
5026 (not equal) operator against a single un-parenthesized expression with or
5027 without quotes or against multiple parenthesized expressions. Examples:
5028
5029 `fieldname eq unquoted literal`
5030 `fieldname eq &#x27;single quoted literal&#x27;`
5031 `fieldname eq &quot;double quoted literal&quot;`
5032 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
5033
5034 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
5035 The literal value must match the entire field.
5036
5037 For example, to filter for instances that do not end with name &quot;instance&quot;,
5038 you would use `name ne .*instance`.
5039
5040 You cannot combine constraints on multiple fields using regular
5041 expressions.
5042 maxResults: integer, The maximum number of results per page that should be returned.
5043 If the number of available results is larger than `maxResults`,
5044 Compute Engine returns a `nextPageToken` that can be used to get
5045 the next page of results in subsequent list requests. Acceptable values are
5046 `0` to `500`, inclusive. (Default: `500`)
5047 orderBy: string, Sorts list results by a certain order. By default, results
5048 are returned in alphanumerical order based on the resource name.
5049
5050 You can also sort results in descending order based on the creation
5051 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
5052 results based on the `creationTimestamp` field in
5053 reverse chronological order (newest result first). Use this to sort
5054 resources like operations so that the newest operation is returned first.
5055
5056 Currently, only sorting by `name` or
5057 `creationTimestamp desc` is supported.
5058 pageToken: string, Specifies a page token to use. Set `pageToken` to the
5059 `nextPageToken` returned by a previous list request to get
5060 the next page of results.
5061 parentId: string, Parent ID for this request.
5062 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
5063 of failure. The default value is false.
5064
5065 For example, when partial success behavior is enabled, aggregatedList for a
5066 single zone scope either returns all resources in the zone or no resources,
5067 with an error code.
5068 x__xgafv: string, V1 error format.
5069 Allowed values
5070 1 - v1 error format
5071 2 - v2 error format
5072
5073 Returns:
5074 An object of the form:
5075
5076 {
5077 &quot;preconfiguredExpressionSets&quot;: {
5078 &quot;wafRules&quot;: {
5079 &quot;expressionSets&quot;: [ # List of entities that are currently supported for WAF rules.
5080 {
5081 &quot;aliases&quot;: [ # A list of alternate IDs. The format should be:
5082 # - E.g. XSS-stable
5083 # Generic suffix like &quot;stable&quot; is particularly useful if a policy
5084 # likes to avail newer set of expressions without having to change
5085 # the policy.
5086 # A given alias name can&#x27;t be used for more than one entity set.
5087 &quot;A String&quot;,
5088 ],
5089 &quot;expressions&quot;: [ # List of available expressions.
5090 {
5091 &quot;id&quot;: &quot;A String&quot;, # Expression ID should uniquely identify the origin of the expression.
5092 # E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
5093 # version 2.9.1 rule id 973337.
5094 # The ID could be used to determine the individual attack definition
5095 # that has been detected. It could also be used to exclude it from
5096 # the policy in case of false positive.
5097 # required
5098 &quot;sensitivity&quot;: 42, # The sensitivity value associated with the WAF rule ID. This corresponds
5099 # to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
5100 # opt-in only rules.
5101 },
5102 ],
5103 &quot;id&quot;: &quot;A String&quot;, # Google specified expression set ID. The format should be:
5104 # - E.g. XSS-20170329
5105 # required
5106 },
5107 ],
5108 },
5109 },
5110 }</pre>
5111 </div>
5112
5113 <div class="method">
5114 <code class="details" id="list_next">list_next()</code>
5115 <pre>Retrieves the next page of results.
5116
5117 Args:
5118 previous_request: The request for the previous page. (required)
5119 previous_response: The response from the request for the previous page. (required)
5120
5121 Returns:
5122 A request object that you can call &#x27;execute()&#x27; on to request the next
5123 page. Returns None if there are no more items in the collection.
5124 </pre>
5125 </div>
5126
5127 <div class="method">
5128 <code class="details" id="move">move(securityPolicy, parentId=None, requestId=None, x__xgafv=None)</code>
5129 <pre>Moves the specified security policy.
5130
5131 Use this API to modify Cloud Armor policies. Previously, alpha and beta
5132 versions of this API were used to modify firewall policies. This usage is
5133 now disabled for most organizations. Use firewallPolicies.move instead.
5134
5135 Args:
5136 securityPolicy: string, Name of the security policy to update. (required)
5137 parentId: string, The new parent of the security policy.
5138 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
5139 that if you must retry your request, the server will know to ignore the
5140 request if it has already been completed.
5141
5142 For example, consider a situation where you make an initial request and
5143 the request times out. If you make the request again with the same
5144 request ID, the server can check if original operation with the same
5145 request ID was received, and if so, will ignore the second request. This
5146 prevents clients from accidentally creating duplicate commitments.
5147
5148 The request ID must be
5149 a valid UUID with the exception that zero UUID is not supported
5150 (00000000-0000-0000-0000-000000000000).
5151 x__xgafv: string, V1 error format.
5152 Allowed values
5153 1 - v1 error format
5154 2 - v2 error format
5155
5156 Returns:
5157 An object of the form:
5158
5159 { # Represents an Operation resource.
5160 #
5161 # Google Compute Engine has three Operation resources:
5162 #
5163 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
5164 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
5165 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
5166 #
5167 # You can use an operation resource to manage asynchronous API requests.
5168 # For more information, readHandling
5169 # API responses.
5170 #
5171 # Operations can be global, regional or zonal.
5172 #
5173 # - For global operations, use the `globalOperations`
5174 # resource.
5175 # - For regional operations, use the
5176 # `regionOperations` resource.
5177 # - For zonal operations, use
5178 # the `zoneOperations` resource.
5179 #
5180 #
5181 #
5182 # For more information, read
5183 # Global, Regional, and Zonal Resources.
5184 #
5185 # Note that completed Operation resources have a limited
5186 # retention period.
5187 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
5188 # Not present otherwise.
5189 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5190 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
5191 # set when the operation is created.
5192 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
5193 # text format.
5194 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
5195 # this field will be populated.
5196 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
5197 # operation.
5198 {
5199 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5200 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
5201 # details. There is a set of defined message types to use for providing
5202 # details.The syntax depends on the error code. For example,
5203 # QuotaExceededInfo will have details when the error code is
5204 # QUOTA_EXCEEDED.
5205 {
5206 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
5207 #
5208 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
5209 # is not enabled:
5210 #
5211 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
5212 # &quot;domain&quot;: &quot;googleapis.com&quot;
5213 # &quot;metadata&quot;: {
5214 # &quot;resource&quot;: &quot;projects/123&quot;,
5215 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
5216 # }
5217 # }
5218 #
5219 # This response indicates that the pubsub.googleapis.com API is not enabled.
5220 #
5221 # Example of an error that is returned when attempting to create a Spanner
5222 # instance in a region that is out of stock:
5223 #
5224 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
5225 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
5226 # &quot;metadata&quot;: {
5227 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
5228 # }
5229 # }
5230 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
5231 # is typically the registered service name of the tool or product that
5232 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
5233 # generated by some common infrastructure, the error domain must be a
5234 # globally unique value that identifies the infrastructure. For Google API
5235 # infrastructure, the error domain is &quot;googleapis.com&quot;.
5236 &quot;metadatas&quot;: { # Additional structured details about this error.
5237 #
5238 # Keys must match a regular expression of `a-z+` but should
5239 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
5240 # length. When identifying the current value of an exceeded limit, the units
5241 # should be contained in the key, not the value. For example, rather than
5242 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
5243 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
5244 # instances that can be created in a single (batch) request.
5245 &quot;a_key&quot;: &quot;A String&quot;,
5246 },
5247 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
5248 # proximate cause of the error. Error reasons are unique within a particular
5249 # domain of errors. This should be at most 63 characters and match a
5250 # regular expression of `A-Z+[A-Z0-9]`, which represents
5251 # UPPER_SNAKE_CASE.
5252 },
5253 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
5254 #
5255 # For example, if a quota check failed with an error indicating the calling
5256 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
5257 # directly to the right place in the developer console to flip the bit.
5258 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
5259 { # Describes a URL link.
5260 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
5261 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
5262 },
5263 ],
5264 },
5265 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
5266 # which can be attached to an RPC error.
5267 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
5268 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
5269 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
5270 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
5271 },
5272 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
5273 &quot;dimensions&quot;: { # The map holding related quota dimensions.
5274 &quot;a_key&quot;: &quot;A String&quot;,
5275 },
5276 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
5277 # type or metric.
5278 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
5279 # or metric.
5280 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
5281 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
5282 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
5283 },
5284 },
5285 ],
5286 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
5287 # This property is optional.
5288 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
5289 },
5290 ],
5291 },
5292 &quot;getVersionOperationMetadata&quot;: {
5293 &quot;inlineSbomInfo&quot;: {
5294 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
5295 # appropriate identifiers.
5296 &quot;a_key&quot;: &quot;A String&quot;,
5297 },
5298 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
5299 # identifiers.
5300 &quot;a_key&quot;: &quot;A String&quot;,
5301 },
5302 },
5303 },
5304 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
5305 # message that was returned, such as `NOT FOUND`.
5306 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
5307 # status code that was returned. For example, a `404` means the
5308 # resource was not found.
5309 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
5310 # defined by the server.
5311 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
5312 # This value is inRFC3339
5313 # text format.
5314 &quot;instancesBulkInsertOperationMetadata&quot;: {
5315 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
5316 # Example key: zones/us-central1-a
5317 &quot;a_key&quot;: {
5318 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
5319 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
5320 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
5321 # error.
5322 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
5323 # if the flow is rolling forward or rolling back.
5324 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
5325 },
5326 },
5327 },
5328 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
5329 # Operation resources.
5330 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5331 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
5332 # group of operations results from a `bulkInsert` API request.
5333 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
5334 # `update`, or `delete`, and so on.
5335 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
5336 # There is no requirement that this be linear or support any granularity of
5337 # operations. This should not be used to guess when the operation will be
5338 # complete. This number should monotonically increase as the operation
5339 # progresses.
5340 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
5341 # applicable when performing regional operations.
5342 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5343 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
5344 # this field will contain information on all underlying zonal actions and
5345 # their state.
5346 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
5347 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
5348 # Example key: zones/us-central1-a
5349 &quot;a_key&quot;: {
5350 &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
5351 # populated.
5352 # different programming environments, including REST APIs and RPC APIs. It is
5353 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
5354 # three pieces of data: error code, error message, and error details.
5355 #
5356 # You can find out more about this error model and how to work with it in the
5357 # [API Design Guide](https://cloud.google.com/apis/design/errors).
5358 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
5359 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
5360 # message types for APIs to use.
5361 {
5362 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
5363 },
5364 ],
5365 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
5366 # user-facing error message should be localized and sent in the
5367 # google.rpc.Status.details field, or localized by the client.
5368 },
5369 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
5370 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
5371 },
5372 },
5373 },
5374 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
5375 # This value is inRFC3339
5376 # text format.
5377 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
5378 # following:
5379 # `PENDING`, `RUNNING`, or `DONE`.
5380 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
5381 # operation.
5382 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
5383 # of the target resource.
5384 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
5385 # operations related to creating a snapshot, this points to the disk
5386 # that the snapshot was created from.
5387 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
5388 # `[email protected]` or
5389 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
5390 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
5391 # operation, this field will be populated.
5392 {
5393 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
5394 # Engine returns NO_RESULTS_ON_PAGE if there
5395 # are no results in the response.
5396 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
5397 # value format. For example:
5398 #
5399 # &quot;data&quot;: [
5400 # {
5401 # &quot;key&quot;: &quot;scope&quot;,
5402 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
5403 # }
5404 {
5405 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
5406 # returned. For example, for warnings where there are no results in a list
5407 # request for a particular zone, this key might be scope and
5408 # the key value might be the zone name. Other examples might be a key
5409 # indicating a deprecated resource and a suggested replacement, or a
5410 # warning about invalid network settings (for example, if an instance
5411 # attempts to perform IP forwarding but is not enabled for IP forwarding).
5412 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5413 },
5414 ],
5415 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5416 },
5417 ],
5418 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
5419 # applicable when performing per-zone operations.
5420 }</pre>
5421 </div>
5422
5423 <div class="method">
5424 <code class="details" id="patch">patch(securityPolicy, body=None, requestId=None, updateMask=None, x__xgafv=None)</code>
5425 <pre>Patches the specified policy with the data included in the request.
5426
5427 Use this API to modify Cloud Armor policies. Previously, alpha and beta
5428 versions of this API were used to modify firewall policies. This usage is
5429 now disabled for most organizations. Use firewallPolicies.patch instead.
5430
5431 Args:
5432 securityPolicy: string, Name of the security policy to update. (required)
5433 body: object, The request body.
5434 The object takes the form of:
5435
5436 { # Represents a Google Cloud Armor security policy resource.
5437 #
5438 # Only external backend services that use load balancers can
5439 # reference a security policy. For more information, see
5440 # Google Cloud Armor security policy overview.
5441 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
5442 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
5443 &quot;confidenceThreshold&quot;: 3.14,
5444 &quot;expirationSec&quot;: 42,
5445 &quot;impactedBaselineThreshold&quot;: 3.14,
5446 &quot;loadThreshold&quot;: 3.14,
5447 },
5448 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
5449 # This field is only supported in Global Security Policies of type
5450 # CLOUD_ARMOR.
5451 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
5452 # This field is only supported in Global Security Policies of type
5453 # CLOUD_ARMOR.
5454 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
5455 # STANDARD - opaque rules. (default)
5456 # PREMIUM - transparent rules.
5457 # This field is only supported in Global Security Policies of type
5458 # CLOUD_ARMOR.
5459 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
5460 # customizable thresholds.
5461 {
5462 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
5463 &quot;autoDeployExpirationSec&quot;: 42,
5464 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
5465 &quot;autoDeployLoadThreshold&quot;: 3.14,
5466 &quot;detectionAbsoluteQps&quot;: 3.14,
5467 &quot;detectionLoadThreshold&quot;: 3.14,
5468 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
5469 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
5470 # The name must be unique within the security policy.
5471 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
5472 # on specified granular traffic units.
5473 { # Configurations to specifc granular traffic units processed by
5474 # Adaptive Protection.
5475 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
5476 # type constitutes a separate traffic unit.
5477 # It can only be set to true if `value` is empty.
5478 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
5479 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
5480 },
5481 ],
5482 },
5483 ],
5484 },
5485 },
5486 &quot;advancedOptionsConfig&quot;: {
5487 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
5488 # json_parsing is set to STANDARD.
5489 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
5490 #
5491 # As per RFC 1341, a Content-Type header value has the following format:
5492 #
5493 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
5494 #
5495 # When configuring a custom Content-Type header value, only the
5496 # type/subtype needs to be specified, and the parameters should be
5497 # excluded.
5498 &quot;A String&quot;,
5499 ],
5500 },
5501 &quot;jsonParsing&quot;: &quot;A String&quot;,
5502 &quot;logLevel&quot;: &quot;A String&quot;,
5503 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
5504 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
5505 # Values are case insensitive.
5506 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
5507 # resolving the callers client IP address.
5508 &quot;A String&quot;,
5509 ],
5510 },
5511 &quot;associations&quot;: [ # A list of associations that belong to this policy.
5512 {
5513 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
5514 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
5515 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
5516 &quot;A String&quot;,
5517 ],
5518 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
5519 &quot;A String&quot;,
5520 ],
5521 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
5522 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
5523 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
5524 },
5525 ],
5526 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
5527 # text format.
5528 &quot;ddosProtectionConfig&quot;: {
5529 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
5530 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
5531 # builds DDoS mitigations that minimize collateral damage. It quantifies
5532 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
5533 # blocked.
5534 #
5535 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
5536 # not be deployed. Using a lower value will prioritize keeping collateral
5537 # damage low, possibly at the cost of its effectiveness in rate limiting
5538 # some or all of the attack. It should typically be unset, so Advanced DDoS
5539 # (and Adaptive Protection) uses the best mitigation it can find. Setting
5540 # the threshold is advised if there are logs for false positive detections
5541 # with high collateral damage, and will cause Advanced DDoS to attempt to
5542 # find a less aggressive rule that satisfies the constraint. If a suitable
5543 # rule cannot be found, the system falls back to either no mitigation for
5544 # smaller attacks or broader network throttles for larger ones.
5545 &quot;ddosProtection&quot;: &quot;A String&quot;,
5546 },
5547 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5548 # create the resource.
5549 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5550 # unique in the organization in which the security policy is created. This
5551 # should only be used when SecurityPolicyType is FIREWALL.
5552 # The name must be 1-63 characters long, and comply with
5553 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5554 # characters long and match the regular expression
5555 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5556 # lowercase letter, and all following characters must be a dash, lowercase
5557 # letter, or digit, except the last character, which cannot be a dash.
5558 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
5559 # the metadata&#x27;s contents and used for optimistic locking. The
5560 # fingerprint is initially generated by Compute Engine and changes after
5561 # every request to modify or update metadata. You must always provide an
5562 # up-to-date fingerprint hash in order to update or change metadata,
5563 # otherwise the request will fail with error412 conditionNotMet.
5564 #
5565 # To see the latest fingerprint, make get() request to the
5566 # security policy.
5567 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
5568 # defined by the server.
5569 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
5570 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
5571 # is essentially a hash of the labels set used for optimistic locking. The
5572 # fingerprint is initially generated by Compute Engine and changes after
5573 # every request to modify or update labels. You must always provide an
5574 # up-to-date fingerprint hash in order to update or change labels.
5575 #
5576 # To see the latest fingerprint, make get() request to the
5577 # security policy.
5578 &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035.
5579 # Label values may be empty.
5580 &quot;a_key&quot;: &quot;A String&quot;,
5581 },
5582 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
5583 # The name must be 1-63 characters long, and comply withRFC1035.
5584 # Specifically, the name must be 1-63 characters long and match the regular
5585 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
5586 # character must be a lowercase letter, and all following characters must
5587 # be a dash, lowercase letter, or digit, except the last character, which
5588 # cannot be a dash.
5589 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
5590 &quot;recaptchaOptionsConfig&quot;: {
5591 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
5592 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
5593 # the security policy. The specified site key needs to be created from the
5594 # reCAPTCHA API. The user is responsible for the validity of the specified
5595 # site key. If not specified, a Google-managed site key is used.
5596 # This field is only supported in Global Security Policies of type
5597 # CLOUD_ARMOR.
5598 },
5599 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
5600 # resides. This field is not applicable to global security policies.
5601 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
5602 # policy can not exceed a set number of tuples.
5603 &quot;rules&quot;: [ # A list of rules that belong to this policy.
5604 # There must always be a default rule which is a rule with priority
5605 # 2147483647 and match all condition (for the match condition this means
5606 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
5607 # must be either match &quot;*&quot; or not set). If no rules are provided when
5608 # creating a security policy, a default rule with action &quot;allow&quot; will be
5609 # added.
5610 { # Represents a rule that describes one or more match conditions along with
5611 # the action to be taken when traffic matches this condition (allow or deny).
5612 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
5613 # The following are the valid actions:
5614 #
5615 # - allow: allow access to target.
5616 # - deny(STATUS): deny access to target, returns the
5617 # HTTP response code specified. Valid values for `STATUS`
5618 # are 403, 404, and 502.
5619 # - rate_based_ban: limit client traffic to the configured
5620 # threshold and ban the client if the traffic exceeds the threshold.
5621 # Configure parameters for this action in RateLimitOptions. Requires
5622 # rate_limit_options to be set.
5623 # - redirect: redirect to a different target. This can
5624 # either be an internal reCAPTCHA redirect, or an external URL-based
5625 # redirect via a 302 response. Parameters for this action can be configured
5626 # via redirectOptions. This action is only supported in Global Security
5627 # Policies of type CLOUD_ARMOR.
5628 # - throttle: limit
5629 # client traffic to the configured threshold. Configure parameters for this
5630 # action in rateLimitOptions. Requires rate_limit_options to be set for
5631 # this.
5632 # - fairshare (preview only): when traffic reaches the
5633 # threshold limit, requests from the clients matching this rule begin to be
5634 # rate-limited using the Fair Share algorithm. This action is only allowed
5635 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
5636 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5637 # create the resource.
5638 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
5639 # specified when versioned_expr is set to FIREWALL.
5640 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
5641 # enabled, logs will be exported to the configured export destination in
5642 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
5643 # cannot enable logging on &quot;goto_next&quot; rules.
5644 #
5645 # This field may only be specified when the versioned_expr is set to
5646 # FIREWALL.
5647 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
5648 # This field is only supported in Global Security Policies of type
5649 # CLOUD_ARMOR.
5650 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
5651 # present.
5652 {
5653 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
5654 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
5655 },
5656 ],
5657 },
5658 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
5659 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
5660 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
5661 # Exactly one field must be specified.
5662 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
5663 # This field must be specified if versioned_expr is specified and cannot
5664 # be specified if versioned_expr is not specified.
5665 &quot;destIpRanges&quot;: [ # CIDR IP address range.
5666 #
5667 # This field may only be specified when versioned_expr is set to
5668 # FIREWALL.
5669 &quot;A String&quot;,
5670 ],
5671 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
5672 #
5673 # This field may only be specified when versioned_expr is set to
5674 # FIREWALL.
5675 {
5676 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
5677 # required when creating a firewall rule. This value can either be
5678 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
5679 # protocol number.
5680 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
5681 # only applicable for UDP or TCP protocol. Each entry must be either
5682 # an integer or a range. If not specified, this rule applies to
5683 # connections through any port.
5684 #
5685 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
5686 #
5687 # This field may only be specified when versioned_expr is set to
5688 # FIREWALL.
5689 &quot;A String&quot;,
5690 ],
5691 },
5692 ],
5693 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
5694 # Maximum number of src_ip_ranges allowed is 10.
5695 &quot;A String&quot;,
5696 ],
5697 },
5698 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
5699 # A CEVAL expression is used to specify match criteria such as origin.ip,
5700 # source.region_code and contents in the request header.
5701 # Expressions containing `evaluateThreatIntelligence` require a Cloud
5702 # Armor Enterprise subscription and are not supported in Edge Policies
5703 # nor in Regional Policies. Expressions containing
5704 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
5705 # Enterprise subscription and are only supported in Global Security
5706 # Policies.
5707 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
5708 # are documented at https://github.com/google/cel-spec.
5709 #
5710 # Example (Comparison):
5711 #
5712 # title: &quot;Summary size limit&quot;
5713 # description: &quot;Determines if a summary is less than 100 chars&quot;
5714 # expression: &quot;document.summary.size() &lt; 100&quot;
5715 #
5716 # Example (Equality):
5717 #
5718 # title: &quot;Requestor is owner&quot;
5719 # description: &quot;Determines if requestor is the document owner&quot;
5720 # expression: &quot;document.owner == request.auth.claims.email&quot;
5721 #
5722 # Example (Logic):
5723 #
5724 # title: &quot;Public documents&quot;
5725 # description: &quot;Determine whether the document should be publicly visible&quot;
5726 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
5727 #
5728 # Example (Data Manipulation):
5729 #
5730 # title: &quot;Notification string&quot;
5731 # description: &quot;Create a notification string with a timestamp.&quot;
5732 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
5733 #
5734 # The exact variables and functions that may be referenced within an expression
5735 # are determined by the service that evaluates it. See the service
5736 # documentation for additional information.
5737 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
5738 # describes the expression, e.g. when hovered over it in a UI.
5739 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
5740 # syntax.
5741 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
5742 # reporting, e.g. a file name and a position in the file.
5743 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
5744 # its purpose. This can be used e.g. in UIs which allow to enter the
5745 # expression.
5746 },
5747 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
5748 # CEVAL expression (i.e., &#x27;expr&#x27;).
5749 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
5750 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
5751 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5752 # action-tokens. The provided site keys need to be created from
5753 # reCAPTCHA API under the same project where the security policy is
5754 # created.
5755 &quot;A String&quot;,
5756 ],
5757 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5758 # session-tokens. The provided site keys need to be created from
5759 # reCAPTCHA API under the same project where the security policy is
5760 # created.
5761 &quot;A String&quot;,
5762 ],
5763 },
5764 },
5765 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
5766 # If this field is specified, config must also be specified.
5767 # Available preconfigured expressions along with their requirements are:
5768 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
5769 # config.
5770 },
5771 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
5772 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
5773 # &#x27;action&#x27; is enforced.
5774 #
5775 # The match criteria for a rule consists of built-in match fields (like
5776 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
5777 # (&#x27;userDefinedFields&#x27;).
5778 #
5779 # Field values may be extracted directly from the packet or derived from it
5780 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
5781 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
5782 # header is found in the packet and the entire field is in bounds.
5783 #
5784 # Each match field may specify which values can match it, listing one or
5785 # more ranges, prefixes, or exact values that are considered a match for
5786 # the field. A field value must be present in order to match a specified
5787 # match field. If no match values are specified for a match field, then any
5788 # field value is considered to match it, and it&#x27;s not required to be
5789 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
5790 #
5791 # For a packet to match a rule, all specified match fields must match the
5792 # corresponding field values derived from the packet.
5793 #
5794 # Example:
5795 #
5796 # networkMatch:
5797 # srcIpRanges:
5798 # - &quot;192.0.2.0/24&quot;
5799 # - &quot;198.51.100.0/24&quot;
5800 # userDefinedFields:
5801 # - name: &quot;ipv4_fragment_offset&quot;
5802 # values:
5803 # - &quot;1-0x1fff&quot;
5804 #
5805 # The above match condition matches packets with a source IP in
5806 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
5807 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
5808 # against.
5809 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
5810 # format.
5811 &quot;A String&quot;,
5812 ],
5813 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5814 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5815 &quot;A String&quot;,
5816 ],
5817 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
5818 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
5819 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
5820 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
5821 &quot;A String&quot;,
5822 ],
5823 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
5824 42,
5825 ],
5826 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
5827 &quot;A String&quot;,
5828 ],
5829 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5830 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5831 &quot;A String&quot;,
5832 ],
5833 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
5834 # IP address.
5835 &quot;A String&quot;,
5836 ],
5837 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
5838 # matching values for that field.
5839 {
5840 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
5841 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
5842 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
5843 # range (e.g. &quot;0x400-0x7ff&quot;).
5844 &quot;A String&quot;,
5845 ],
5846 },
5847 ],
5848 },
5849 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
5850 # does not evaluate preconfigured WAF rules, i.e., if
5851 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
5852 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
5853 {
5854 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
5855 # preconfigured WAF evaluation.
5856 {
5857 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5858 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5859 },
5860 ],
5861 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
5862 # inspection during preconfigured WAF evaluation.
5863 {
5864 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5865 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5866 },
5867 ],
5868 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
5869 # inspection during preconfigured WAF evaluation.
5870 {
5871 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5872 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5873 },
5874 ],
5875 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
5876 # from inspection during preconfigured WAF evaluation. Note that the
5877 # parameter can be in the query string or in the POST body.
5878 {
5879 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5880 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5881 },
5882 ],
5883 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
5884 # inspection during preconfigured WAF evaluation. When specifying this
5885 # field, the query or fragment part should be excluded.
5886 {
5887 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5888 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5889 },
5890 ],
5891 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
5892 # preconfigured WAF exclusion. If omitted, it refers to all the rule
5893 # IDs under the WAF rule set.
5894 &quot;A String&quot;,
5895 ],
5896 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
5897 },
5898 ],
5899 },
5900 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
5901 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
5902 # must be a positive value between 0 and 2147483647.
5903 # Rules are evaluated from highest to lowest priority where 0 is the
5904 # highest priority and 2147483647 is the lowest priority.
5905 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
5906 # &quot;fairshare&quot;. Cannot be specified for any other actions.
5907 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
5908 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
5909 # the traffic will continue to be banned by the rate limit after the
5910 # rate falls below the threshold.
5911 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
5912 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
5913 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
5914 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
5915 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
5916 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
5917 },
5918 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
5919 # threshold. Valid option is &quot;allow&quot; only.
5920 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
5921 # values are:
5922 #
5923 # - ALL: A single rate limit threshold is applied to all
5924 # the requests matching this rule. This is the default value if
5925 # &quot;enforceOnKey&quot; is not configured.
5926 # - IP: The source IP address of
5927 # the request is the key. Each IP has this limit enforced
5928 # separately.
5929 # - HTTP_HEADER: The value of the HTTP
5930 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
5931 # value is truncated to the first 128 bytes of the header value. If no
5932 # such header is present in the request, the key type defaults toALL.
5933 # - XFF_IP: The first IP address (i.e. the
5934 # originating client IP address) specified in the list of IPs under
5935 # X-Forwarded-For HTTP header. If no such header is present or the value
5936 # is not a valid IP, the key defaults to the source IP address of
5937 # the request i.e. key type IP.
5938 # - HTTP_COOKIE: The value of the HTTP
5939 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
5940 # value is truncated to the first 128 bytes of the cookie value. If no
5941 # such cookie is present in the request, the key type defaults toALL.
5942 # - HTTP_PATH: The URL path of the HTTP request. The key
5943 # value is truncated to the first 128 bytes.
5944 # - SNI: Server name indication in the TLS session of the
5945 # HTTPS request. The key value is truncated to the first 128 bytes. The
5946 # key type defaults to ALL on a HTTP session.
5947 # - REGION_CODE: The country/region from which the request
5948 # originates.
5949 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
5950 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5951 # key type defaults to ALL.
5952 # - USER_IP: The IP address of the originating client,
5953 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
5954 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
5955 # an IP address cannot be resolved from it, the key type defaults toIP.
5956 #
5957 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
5958 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5959 # key type defaults to ALL.
5960 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
5961 # limit threshold is enforced for all the requests matching the rule.
5962 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
5963 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
5964 # ratelimit threshold/action is enforced. You can specify up to 3
5965 # enforce_on_key_configs. If enforce_on_key_configs is specified,
5966 # enforce_on_key must not be specified.
5967 {
5968 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
5969 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
5970 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
5971 # taken as the key value.
5972 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
5973 # values are:
5974 #
5975 # - ALL: A single rate limit threshold is applied to all
5976 # the requests matching this rule. This is the default value if
5977 # &quot;enforceOnKeyConfigs&quot; is not configured.
5978 # - IP: The source IP address of
5979 # the request is the key. Each IP has this limit enforced
5980 # separately.
5981 # - HTTP_HEADER: The value of the HTTP
5982 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
5983 # value is truncated to the first 128 bytes of the header value. If no
5984 # such header is present in the request, the key type defaults toALL.
5985 # - XFF_IP: The first IP address (i.e. the
5986 # originating client IP address) specified in the list of IPs under
5987 # X-Forwarded-For HTTP header. If no such header is present or the
5988 # value is not a valid IP, the key defaults to the source IP address of
5989 # the request i.e. key type IP.
5990 # - HTTP_COOKIE: The value of the HTTP
5991 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
5992 # value is truncated to the first 128 bytes of the cookie value. If no
5993 # such cookie is present in the request, the key type defaults toALL.
5994 # - HTTP_PATH: The URL path of the HTTP request. The key
5995 # value is truncated to the first 128 bytes.
5996 # - SNI: Server name indication in the TLS session of
5997 # the HTTPS request. The key value is truncated to the first 128 bytes.
5998 # The key type defaults to ALL on a HTTP session.
5999 # - REGION_CODE: The country/region from which the
6000 # request originates.
6001 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6002 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6003 # key type defaults to ALL.
6004 # - USER_IP: The IP address of the originating client,
6005 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6006 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
6007 # or an IP address cannot be resolved from it, the key type defaults toIP.
6008 #
6009 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6010 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6011 # key type defaults to ALL.
6012 },
6013 ],
6014 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6015 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
6016 # value.
6017 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
6018 # value.
6019 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
6020 # threshold, to either deny with a specified HTTP response code, or
6021 # redirect to a different endpoint.
6022 # Valid options are `deny(STATUS)`, where valid values for
6023 # `STATUS` are 403, 404, 429, and 502, and
6024 # `redirect`, where the redirect parameters come from
6025 # `exceedRedirectOptions` below.
6026 # The `redirect` action is only supported in Global Security Policies of
6027 # type CLOUD_ARMOR.
6028 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
6029 # action. Cannot be specified if the exceed action is not redirect.
6030 # This field is only supported in Global Security Policies of type
6031 # CLOUD_ARMOR.
6032 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6033 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6034 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6035 #
6036 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6037 # challenge assessment.
6038 # - EXTERNAL_302: redirect to a different URL via a 302
6039 # response.
6040 },
6041 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
6042 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6043 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6044 },
6045 },
6046 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
6047 # other actions.
6048 # This field is only supported in Global Security Policies of type
6049 # CLOUD_ARMOR.
6050 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6051 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6052 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6053 #
6054 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6055 # challenge assessment.
6056 # - EXTERNAL_302: redirect to a different URL via a 302
6057 # response.
6058 },
6059 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
6060 # policy. This can only be set during rule creation, if rule number is not
6061 # specified it will be generated by the server.
6062 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
6063 # policy rule.
6064 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
6065 # allows you to control which network&#x27;s VMs get this rule. If this field
6066 # is left blank, all VMs within the organization will receive the rule.
6067 #
6068 # This field may only be specified when versioned_expr is set to FIREWALL.
6069 &quot;A String&quot;,
6070 ],
6071 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
6072 # applied with this rule.
6073 &quot;A String&quot;,
6074 ],
6075 },
6076 ],
6077 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
6078 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
6079 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
6080 # unique in the organization in which the security policy is created. This
6081 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
6082 # The name must be 1-63 characters long, and comply with
6083 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
6084 # characters long and match the regular expression
6085 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
6086 # lowercase letter, and all following characters must be a dash, lowercase
6087 # letter, or digit, except the last character, which cannot be a dash.
6088 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
6089 #
6090 # - CLOUD_ARMOR: Cloud Armor backend security policies can
6091 # be configured to filter incoming HTTP requests targeting backend services.
6092 # They filter requests before they hit the origin servers.
6093 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
6094 # be configured to filter incoming HTTP requests targeting backend services
6095 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
6096 # They filter requests before the request is served from Google&#x27;s cache.
6097 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
6098 # internal service policies can be configured to filter HTTP requests
6099 # targeting services managed by Traffic Director in a service mesh. They
6100 # filter requests before the request is served from the application.
6101 #
6102 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
6103 # can be configured to filter packets targeting network load balancing
6104 # resources such as backend services, target pools, target instances, and
6105 # instances with external IPs. They filter requests before the request is
6106 # served from the application.
6107 #
6108 #
6109 # This field can be set only at resource creation time.
6110 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
6111 # user-defined field consists of up to 4 bytes extracted from a fixed offset
6112 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
6113 # optional mask to select certain bits. Rules may then specify matching
6114 # values for these fields.
6115 #
6116 # Example:
6117 #
6118 # userDefinedFields:
6119 # - name: &quot;ipv4_fragment_offset&quot;
6120 # base: IPV4
6121 # offset: 6
6122 # size: 2
6123 # mask: &quot;0x1fff&quot;
6124 {
6125 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
6126 #
6127 # - IPV4: Points to the beginning of the IPv4 header.
6128 # - IPV6: Points to the beginning of the IPv6 header.
6129 # - TCP: Points to the beginning of the TCP header, skipping
6130 # over any IPv4 options or IPv6 extension headers. Not present for
6131 # non-first fragments.
6132 # - UDP: Points to the beginning of the UDP header, skipping
6133 # over any IPv4 options or IPv6 extension headers. Not present for
6134 # non-first fragments.
6135 #
6136 #
6137 # required
6138 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
6139 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
6140 # The last byte of the field (in network byte order) corresponds to the
6141 # least significant byte of the mask.
6142 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
6143 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
6144 # &#x27;base&#x27;.
6145 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
6146 },
6147 ],
6148 }
6149
6150 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
6151 that if you must retry your request, the server will know to ignore the
6152 request if it has already been completed.
6153
6154 For example, consider a situation where you make an initial request and
6155 the request times out. If you make the request again with the same
6156 request ID, the server can check if original operation with the same
6157 request ID was received, and if so, will ignore the second request. This
6158 prevents clients from accidentally creating duplicate commitments.
6159
6160 The request ID must be
6161 a valid UUID with the exception that zero UUID is not supported
6162 (00000000-0000-0000-0000-000000000000).
6163 updateMask: string, Indicates fields to be cleared as part of this request.
6164 x__xgafv: string, V1 error format.
6165 Allowed values
6166 1 - v1 error format
6167 2 - v2 error format
6168
6169 Returns:
6170 An object of the form:
6171
6172 { # Represents an Operation resource.
6173 #
6174 # Google Compute Engine has three Operation resources:
6175 #
6176 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
6177 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
6178 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
6179 #
6180 # You can use an operation resource to manage asynchronous API requests.
6181 # For more information, readHandling
6182 # API responses.
6183 #
6184 # Operations can be global, regional or zonal.
6185 #
6186 # - For global operations, use the `globalOperations`
6187 # resource.
6188 # - For regional operations, use the
6189 # `regionOperations` resource.
6190 # - For zonal operations, use
6191 # the `zoneOperations` resource.
6192 #
6193 #
6194 #
6195 # For more information, read
6196 # Global, Regional, and Zonal Resources.
6197 #
6198 # Note that completed Operation resources have a limited
6199 # retention period.
6200 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
6201 # Not present otherwise.
6202 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6203 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
6204 # set when the operation is created.
6205 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
6206 # text format.
6207 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
6208 # this field will be populated.
6209 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
6210 # operation.
6211 {
6212 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6213 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
6214 # details. There is a set of defined message types to use for providing
6215 # details.The syntax depends on the error code. For example,
6216 # QuotaExceededInfo will have details when the error code is
6217 # QUOTA_EXCEEDED.
6218 {
6219 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
6220 #
6221 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
6222 # is not enabled:
6223 #
6224 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
6225 # &quot;domain&quot;: &quot;googleapis.com&quot;
6226 # &quot;metadata&quot;: {
6227 # &quot;resource&quot;: &quot;projects/123&quot;,
6228 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
6229 # }
6230 # }
6231 #
6232 # This response indicates that the pubsub.googleapis.com API is not enabled.
6233 #
6234 # Example of an error that is returned when attempting to create a Spanner
6235 # instance in a region that is out of stock:
6236 #
6237 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
6238 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
6239 # &quot;metadata&quot;: {
6240 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
6241 # }
6242 # }
6243 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
6244 # is typically the registered service name of the tool or product that
6245 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
6246 # generated by some common infrastructure, the error domain must be a
6247 # globally unique value that identifies the infrastructure. For Google API
6248 # infrastructure, the error domain is &quot;googleapis.com&quot;.
6249 &quot;metadatas&quot;: { # Additional structured details about this error.
6250 #
6251 # Keys must match a regular expression of `a-z+` but should
6252 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
6253 # length. When identifying the current value of an exceeded limit, the units
6254 # should be contained in the key, not the value. For example, rather than
6255 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
6256 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
6257 # instances that can be created in a single (batch) request.
6258 &quot;a_key&quot;: &quot;A String&quot;,
6259 },
6260 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
6261 # proximate cause of the error. Error reasons are unique within a particular
6262 # domain of errors. This should be at most 63 characters and match a
6263 # regular expression of `A-Z+[A-Z0-9]`, which represents
6264 # UPPER_SNAKE_CASE.
6265 },
6266 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
6267 #
6268 # For example, if a quota check failed with an error indicating the calling
6269 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
6270 # directly to the right place in the developer console to flip the bit.
6271 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
6272 { # Describes a URL link.
6273 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
6274 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
6275 },
6276 ],
6277 },
6278 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
6279 # which can be attached to an RPC error.
6280 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
6281 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
6282 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
6283 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
6284 },
6285 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
6286 &quot;dimensions&quot;: { # The map holding related quota dimensions.
6287 &quot;a_key&quot;: &quot;A String&quot;,
6288 },
6289 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
6290 # type or metric.
6291 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
6292 # or metric.
6293 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
6294 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
6295 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
6296 },
6297 },
6298 ],
6299 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
6300 # This property is optional.
6301 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
6302 },
6303 ],
6304 },
6305 &quot;getVersionOperationMetadata&quot;: {
6306 &quot;inlineSbomInfo&quot;: {
6307 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
6308 # appropriate identifiers.
6309 &quot;a_key&quot;: &quot;A String&quot;,
6310 },
6311 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
6312 # identifiers.
6313 &quot;a_key&quot;: &quot;A String&quot;,
6314 },
6315 },
6316 },
6317 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
6318 # message that was returned, such as `NOT FOUND`.
6319 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
6320 # status code that was returned. For example, a `404` means the
6321 # resource was not found.
6322 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
6323 # defined by the server.
6324 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
6325 # This value is inRFC3339
6326 # text format.
6327 &quot;instancesBulkInsertOperationMetadata&quot;: {
6328 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
6329 # Example key: zones/us-central1-a
6330 &quot;a_key&quot;: {
6331 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
6332 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
6333 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
6334 # error.
6335 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
6336 # if the flow is rolling forward or rolling back.
6337 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
6338 },
6339 },
6340 },
6341 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
6342 # Operation resources.
6343 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6344 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
6345 # group of operations results from a `bulkInsert` API request.
6346 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
6347 # `update`, or `delete`, and so on.
6348 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
6349 # There is no requirement that this be linear or support any granularity of
6350 # operations. This should not be used to guess when the operation will be
6351 # complete. This number should monotonically increase as the operation
6352 # progresses.
6353 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
6354 # applicable when performing regional operations.
6355 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6356 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
6357 # this field will contain information on all underlying zonal actions and
6358 # their state.
6359 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
6360 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
6361 # Example key: zones/us-central1-a
6362 &quot;a_key&quot;: {
6363 &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
6364 # populated.
6365 # different programming environments, including REST APIs and RPC APIs. It is
6366 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
6367 # three pieces of data: error code, error message, and error details.
6368 #
6369 # You can find out more about this error model and how to work with it in the
6370 # [API Design Guide](https://cloud.google.com/apis/design/errors).
6371 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6372 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
6373 # message types for APIs to use.
6374 {
6375 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6376 },
6377 ],
6378 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
6379 # user-facing error message should be localized and sent in the
6380 # google.rpc.Status.details field, or localized by the client.
6381 },
6382 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
6383 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
6384 },
6385 },
6386 },
6387 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
6388 # This value is inRFC3339
6389 # text format.
6390 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
6391 # following:
6392 # `PENDING`, `RUNNING`, or `DONE`.
6393 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
6394 # operation.
6395 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
6396 # of the target resource.
6397 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
6398 # operations related to creating a snapshot, this points to the disk
6399 # that the snapshot was created from.
6400 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
6401 # `[email protected]` or
6402 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
6403 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
6404 # operation, this field will be populated.
6405 {
6406 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
6407 # Engine returns NO_RESULTS_ON_PAGE if there
6408 # are no results in the response.
6409 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
6410 # value format. For example:
6411 #
6412 # &quot;data&quot;: [
6413 # {
6414 # &quot;key&quot;: &quot;scope&quot;,
6415 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
6416 # }
6417 {
6418 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
6419 # returned. For example, for warnings where there are no results in a list
6420 # request for a particular zone, this key might be scope and
6421 # the key value might be the zone name. Other examples might be a key
6422 # indicating a deprecated resource and a suggested replacement, or a
6423 # warning about invalid network settings (for example, if an instance
6424 # attempts to perform IP forwarding but is not enabled for IP forwarding).
6425 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6426 },
6427 ],
6428 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6429 },
6430 ],
6431 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
6432 # applicable when performing per-zone operations.
6433 }</pre>
6434 </div>
6435
6436 <div class="method">
6437 <code class="details" id="patchRule">patchRule(securityPolicy, body=None, priority=None, requestId=None, updateMask=None, x__xgafv=None)</code>
6438 <pre>Patches a rule at the specified priority.
6439
6440 Use this API to modify Cloud Armor policies. Previously, alpha and beta
6441 versions of this API were used to modify firewall policies. This usage is
6442 now disabled for most organizations. Use firewallPolicies.patchRule
6443 instead.
6444
6445 Args:
6446 securityPolicy: string, Name of the security policy to update. (required)
6447 body: object, The request body.
6448 The object takes the form of:
6449
6450 { # Represents a rule that describes one or more match conditions along with
6451 # the action to be taken when traffic matches this condition (allow or deny).
6452 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
6453 # The following are the valid actions:
6454 #
6455 # - allow: allow access to target.
6456 # - deny(STATUS): deny access to target, returns the
6457 # HTTP response code specified. Valid values for `STATUS`
6458 # are 403, 404, and 502.
6459 # - rate_based_ban: limit client traffic to the configured
6460 # threshold and ban the client if the traffic exceeds the threshold.
6461 # Configure parameters for this action in RateLimitOptions. Requires
6462 # rate_limit_options to be set.
6463 # - redirect: redirect to a different target. This can
6464 # either be an internal reCAPTCHA redirect, or an external URL-based
6465 # redirect via a 302 response. Parameters for this action can be configured
6466 # via redirectOptions. This action is only supported in Global Security
6467 # Policies of type CLOUD_ARMOR.
6468 # - throttle: limit
6469 # client traffic to the configured threshold. Configure parameters for this
6470 # action in rateLimitOptions. Requires rate_limit_options to be set for
6471 # this.
6472 # - fairshare (preview only): when traffic reaches the
6473 # threshold limit, requests from the clients matching this rule begin to be
6474 # rate-limited using the Fair Share algorithm. This action is only allowed
6475 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
6476 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
6477 # create the resource.
6478 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
6479 # specified when versioned_expr is set to FIREWALL.
6480 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
6481 # enabled, logs will be exported to the configured export destination in
6482 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
6483 # cannot enable logging on &quot;goto_next&quot; rules.
6484 #
6485 # This field may only be specified when the versioned_expr is set to
6486 # FIREWALL.
6487 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
6488 # This field is only supported in Global Security Policies of type
6489 # CLOUD_ARMOR.
6490 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
6491 # present.
6492 {
6493 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
6494 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
6495 },
6496 ],
6497 },
6498 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
6499 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
6500 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
6501 # Exactly one field must be specified.
6502 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
6503 # This field must be specified if versioned_expr is specified and cannot
6504 # be specified if versioned_expr is not specified.
6505 &quot;destIpRanges&quot;: [ # CIDR IP address range.
6506 #
6507 # This field may only be specified when versioned_expr is set to
6508 # FIREWALL.
6509 &quot;A String&quot;,
6510 ],
6511 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
6512 #
6513 # This field may only be specified when versioned_expr is set to
6514 # FIREWALL.
6515 {
6516 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
6517 # required when creating a firewall rule. This value can either be
6518 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
6519 # protocol number.
6520 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
6521 # only applicable for UDP or TCP protocol. Each entry must be either
6522 # an integer or a range. If not specified, this rule applies to
6523 # connections through any port.
6524 #
6525 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
6526 #
6527 # This field may only be specified when versioned_expr is set to
6528 # FIREWALL.
6529 &quot;A String&quot;,
6530 ],
6531 },
6532 ],
6533 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
6534 # Maximum number of src_ip_ranges allowed is 10.
6535 &quot;A String&quot;,
6536 ],
6537 },
6538 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
6539 # A CEVAL expression is used to specify match criteria such as origin.ip,
6540 # source.region_code and contents in the request header.
6541 # Expressions containing `evaluateThreatIntelligence` require a Cloud
6542 # Armor Enterprise subscription and are not supported in Edge Policies
6543 # nor in Regional Policies. Expressions containing
6544 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
6545 # Enterprise subscription and are only supported in Global Security
6546 # Policies.
6547 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
6548 # are documented at https://github.com/google/cel-spec.
6549 #
6550 # Example (Comparison):
6551 #
6552 # title: &quot;Summary size limit&quot;
6553 # description: &quot;Determines if a summary is less than 100 chars&quot;
6554 # expression: &quot;document.summary.size() &lt; 100&quot;
6555 #
6556 # Example (Equality):
6557 #
6558 # title: &quot;Requestor is owner&quot;
6559 # description: &quot;Determines if requestor is the document owner&quot;
6560 # expression: &quot;document.owner == request.auth.claims.email&quot;
6561 #
6562 # Example (Logic):
6563 #
6564 # title: &quot;Public documents&quot;
6565 # description: &quot;Determine whether the document should be publicly visible&quot;
6566 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
6567 #
6568 # Example (Data Manipulation):
6569 #
6570 # title: &quot;Notification string&quot;
6571 # description: &quot;Create a notification string with a timestamp.&quot;
6572 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
6573 #
6574 # The exact variables and functions that may be referenced within an expression
6575 # are determined by the service that evaluates it. See the service
6576 # documentation for additional information.
6577 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
6578 # describes the expression, e.g. when hovered over it in a UI.
6579 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
6580 # syntax.
6581 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
6582 # reporting, e.g. a file name and a position in the file.
6583 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
6584 # its purpose. This can be used e.g. in UIs which allow to enter the
6585 # expression.
6586 },
6587 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
6588 # CEVAL expression (i.e., &#x27;expr&#x27;).
6589 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
6590 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
6591 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6592 # action-tokens. The provided site keys need to be created from
6593 # reCAPTCHA API under the same project where the security policy is
6594 # created.
6595 &quot;A String&quot;,
6596 ],
6597 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6598 # session-tokens. The provided site keys need to be created from
6599 # reCAPTCHA API under the same project where the security policy is
6600 # created.
6601 &quot;A String&quot;,
6602 ],
6603 },
6604 },
6605 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
6606 # If this field is specified, config must also be specified.
6607 # Available preconfigured expressions along with their requirements are:
6608 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
6609 # config.
6610 },
6611 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
6612 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
6613 # &#x27;action&#x27; is enforced.
6614 #
6615 # The match criteria for a rule consists of built-in match fields (like
6616 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
6617 # (&#x27;userDefinedFields&#x27;).
6618 #
6619 # Field values may be extracted directly from the packet or derived from it
6620 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
6621 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
6622 # header is found in the packet and the entire field is in bounds.
6623 #
6624 # Each match field may specify which values can match it, listing one or
6625 # more ranges, prefixes, or exact values that are considered a match for
6626 # the field. A field value must be present in order to match a specified
6627 # match field. If no match values are specified for a match field, then any
6628 # field value is considered to match it, and it&#x27;s not required to be
6629 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
6630 #
6631 # For a packet to match a rule, all specified match fields must match the
6632 # corresponding field values derived from the packet.
6633 #
6634 # Example:
6635 #
6636 # networkMatch:
6637 # srcIpRanges:
6638 # - &quot;192.0.2.0/24&quot;
6639 # - &quot;198.51.100.0/24&quot;
6640 # userDefinedFields:
6641 # - name: &quot;ipv4_fragment_offset&quot;
6642 # values:
6643 # - &quot;1-0x1fff&quot;
6644 #
6645 # The above match condition matches packets with a source IP in
6646 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
6647 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
6648 # against.
6649 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
6650 # format.
6651 &quot;A String&quot;,
6652 ],
6653 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6654 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6655 &quot;A String&quot;,
6656 ],
6657 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
6658 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
6659 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
6660 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
6661 &quot;A String&quot;,
6662 ],
6663 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
6664 42,
6665 ],
6666 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
6667 &quot;A String&quot;,
6668 ],
6669 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6670 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6671 &quot;A String&quot;,
6672 ],
6673 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
6674 # IP address.
6675 &quot;A String&quot;,
6676 ],
6677 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
6678 # matching values for that field.
6679 {
6680 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
6681 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
6682 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
6683 # range (e.g. &quot;0x400-0x7ff&quot;).
6684 &quot;A String&quot;,
6685 ],
6686 },
6687 ],
6688 },
6689 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
6690 # does not evaluate preconfigured WAF rules, i.e., if
6691 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
6692 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
6693 {
6694 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
6695 # preconfigured WAF evaluation.
6696 {
6697 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6698 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6699 },
6700 ],
6701 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
6702 # inspection during preconfigured WAF evaluation.
6703 {
6704 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6705 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6706 },
6707 ],
6708 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
6709 # inspection during preconfigured WAF evaluation.
6710 {
6711 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6712 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6713 },
6714 ],
6715 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
6716 # from inspection during preconfigured WAF evaluation. Note that the
6717 # parameter can be in the query string or in the POST body.
6718 {
6719 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6720 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6721 },
6722 ],
6723 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
6724 # inspection during preconfigured WAF evaluation. When specifying this
6725 # field, the query or fragment part should be excluded.
6726 {
6727 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6728 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6729 },
6730 ],
6731 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
6732 # preconfigured WAF exclusion. If omitted, it refers to all the rule
6733 # IDs under the WAF rule set.
6734 &quot;A String&quot;,
6735 ],
6736 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
6737 },
6738 ],
6739 },
6740 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
6741 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
6742 # must be a positive value between 0 and 2147483647.
6743 # Rules are evaluated from highest to lowest priority where 0 is the
6744 # highest priority and 2147483647 is the lowest priority.
6745 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
6746 # &quot;fairshare&quot;. Cannot be specified for any other actions.
6747 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
6748 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
6749 # the traffic will continue to be banned by the rate limit after the
6750 # rate falls below the threshold.
6751 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
6752 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
6753 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
6754 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
6755 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6756 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6757 },
6758 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
6759 # threshold. Valid option is &quot;allow&quot; only.
6760 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6761 # values are:
6762 #
6763 # - ALL: A single rate limit threshold is applied to all
6764 # the requests matching this rule. This is the default value if
6765 # &quot;enforceOnKey&quot; is not configured.
6766 # - IP: The source IP address of
6767 # the request is the key. Each IP has this limit enforced
6768 # separately.
6769 # - HTTP_HEADER: The value of the HTTP
6770 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6771 # value is truncated to the first 128 bytes of the header value. If no
6772 # such header is present in the request, the key type defaults toALL.
6773 # - XFF_IP: The first IP address (i.e. the
6774 # originating client IP address) specified in the list of IPs under
6775 # X-Forwarded-For HTTP header. If no such header is present or the value
6776 # is not a valid IP, the key defaults to the source IP address of
6777 # the request i.e. key type IP.
6778 # - HTTP_COOKIE: The value of the HTTP
6779 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6780 # value is truncated to the first 128 bytes of the cookie value. If no
6781 # such cookie is present in the request, the key type defaults toALL.
6782 # - HTTP_PATH: The URL path of the HTTP request. The key
6783 # value is truncated to the first 128 bytes.
6784 # - SNI: Server name indication in the TLS session of the
6785 # HTTPS request. The key value is truncated to the first 128 bytes. The
6786 # key type defaults to ALL on a HTTP session.
6787 # - REGION_CODE: The country/region from which the request
6788 # originates.
6789 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6790 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6791 # key type defaults to ALL.
6792 # - USER_IP: The IP address of the originating client,
6793 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6794 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
6795 # an IP address cannot be resolved from it, the key type defaults toIP.
6796 #
6797 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6798 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6799 # key type defaults to ALL.
6800 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
6801 # limit threshold is enforced for all the requests matching the rule.
6802 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
6803 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
6804 # ratelimit threshold/action is enforced. You can specify up to 3
6805 # enforce_on_key_configs. If enforce_on_key_configs is specified,
6806 # enforce_on_key must not be specified.
6807 {
6808 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6809 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
6810 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
6811 # taken as the key value.
6812 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6813 # values are:
6814 #
6815 # - ALL: A single rate limit threshold is applied to all
6816 # the requests matching this rule. This is the default value if
6817 # &quot;enforceOnKeyConfigs&quot; is not configured.
6818 # - IP: The source IP address of
6819 # the request is the key. Each IP has this limit enforced
6820 # separately.
6821 # - HTTP_HEADER: The value of the HTTP
6822 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6823 # value is truncated to the first 128 bytes of the header value. If no
6824 # such header is present in the request, the key type defaults toALL.
6825 # - XFF_IP: The first IP address (i.e. the
6826 # originating client IP address) specified in the list of IPs under
6827 # X-Forwarded-For HTTP header. If no such header is present or the
6828 # value is not a valid IP, the key defaults to the source IP address of
6829 # the request i.e. key type IP.
6830 # - HTTP_COOKIE: The value of the HTTP
6831 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6832 # value is truncated to the first 128 bytes of the cookie value. If no
6833 # such cookie is present in the request, the key type defaults toALL.
6834 # - HTTP_PATH: The URL path of the HTTP request. The key
6835 # value is truncated to the first 128 bytes.
6836 # - SNI: Server name indication in the TLS session of
6837 # the HTTPS request. The key value is truncated to the first 128 bytes.
6838 # The key type defaults to ALL on a HTTP session.
6839 # - REGION_CODE: The country/region from which the
6840 # request originates.
6841 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6842 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6843 # key type defaults to ALL.
6844 # - USER_IP: The IP address of the originating client,
6845 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6846 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
6847 # or an IP address cannot be resolved from it, the key type defaults toIP.
6848 #
6849 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6850 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6851 # key type defaults to ALL.
6852 },
6853 ],
6854 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6855 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
6856 # value.
6857 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
6858 # value.
6859 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
6860 # threshold, to either deny with a specified HTTP response code, or
6861 # redirect to a different endpoint.
6862 # Valid options are `deny(STATUS)`, where valid values for
6863 # `STATUS` are 403, 404, 429, and 502, and
6864 # `redirect`, where the redirect parameters come from
6865 # `exceedRedirectOptions` below.
6866 # The `redirect` action is only supported in Global Security Policies of
6867 # type CLOUD_ARMOR.
6868 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
6869 # action. Cannot be specified if the exceed action is not redirect.
6870 # This field is only supported in Global Security Policies of type
6871 # CLOUD_ARMOR.
6872 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6873 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6874 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6875 #
6876 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6877 # challenge assessment.
6878 # - EXTERNAL_302: redirect to a different URL via a 302
6879 # response.
6880 },
6881 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
6882 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6883 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6884 },
6885 },
6886 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
6887 # other actions.
6888 # This field is only supported in Global Security Policies of type
6889 # CLOUD_ARMOR.
6890 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6891 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6892 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6893 #
6894 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6895 # challenge assessment.
6896 # - EXTERNAL_302: redirect to a different URL via a 302
6897 # response.
6898 },
6899 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
6900 # policy. This can only be set during rule creation, if rule number is not
6901 # specified it will be generated by the server.
6902 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
6903 # policy rule.
6904 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
6905 # allows you to control which network&#x27;s VMs get this rule. If this field
6906 # is left blank, all VMs within the organization will receive the rule.
6907 #
6908 # This field may only be specified when versioned_expr is set to FIREWALL.
6909 &quot;A String&quot;,
6910 ],
6911 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
6912 # applied with this rule.
6913 &quot;A String&quot;,
6914 ],
6915 }
6916
6917 priority: integer, The priority of the rule to patch.
6918 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
6919 that if you must retry your request, the server will know to ignore the
6920 request if it has already been completed.
6921
6922 For example, consider a situation where you make an initial request and
6923 the request times out. If you make the request again with the same
6924 request ID, the server can check if original operation with the same
6925 request ID was received, and if so, will ignore the second request. This
6926 prevents clients from accidentally creating duplicate commitments.
6927
6928 The request ID must be
6929 a valid UUID with the exception that zero UUID is not supported
6930 (00000000-0000-0000-0000-000000000000).
6931 updateMask: string, Indicates fields to be cleared as part of this request.
6932 x__xgafv: string, V1 error format.
6933 Allowed values
6934 1 - v1 error format
6935 2 - v2 error format
6936
6937 Returns:
6938 An object of the form:
6939
6940 { # Represents an Operation resource.
6941 #
6942 # Google Compute Engine has three Operation resources:
6943 #
6944 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
6945 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
6946 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
6947 #
6948 # You can use an operation resource to manage asynchronous API requests.
6949 # For more information, readHandling
6950 # API responses.
6951 #
6952 # Operations can be global, regional or zonal.
6953 #
6954 # - For global operations, use the `globalOperations`
6955 # resource.
6956 # - For regional operations, use the
6957 # `regionOperations` resource.
6958 # - For zonal operations, use
6959 # the `zoneOperations` resource.
6960 #
6961 #
6962 #
6963 # For more information, read
6964 # Global, Regional, and Zonal Resources.
6965 #
6966 # Note that completed Operation resources have a limited
6967 # retention period.
6968 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
6969 # Not present otherwise.
6970 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6971 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
6972 # set when the operation is created.
6973 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
6974 # text format.
6975 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
6976 # this field will be populated.
6977 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
6978 # operation.
6979 {
6980 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6981 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
6982 # details. There is a set of defined message types to use for providing
6983 # details.The syntax depends on the error code. For example,
6984 # QuotaExceededInfo will have details when the error code is
6985 # QUOTA_EXCEEDED.
6986 {
6987 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
6988 #
6989 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
6990 # is not enabled:
6991 #
6992 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
6993 # &quot;domain&quot;: &quot;googleapis.com&quot;
6994 # &quot;metadata&quot;: {
6995 # &quot;resource&quot;: &quot;projects/123&quot;,
6996 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
6997 # }
6998 # }
6999 #
7000 # This response indicates that the pubsub.googleapis.com API is not enabled.
7001 #
7002 # Example of an error that is returned when attempting to create a Spanner
7003 # instance in a region that is out of stock:
7004 #
7005 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7006 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7007 # &quot;metadata&quot;: {
7008 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7009 # }
7010 # }
7011 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7012 # is typically the registered service name of the tool or product that
7013 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7014 # generated by some common infrastructure, the error domain must be a
7015 # globally unique value that identifies the infrastructure. For Google API
7016 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7017 &quot;metadatas&quot;: { # Additional structured details about this error.
7018 #
7019 # Keys must match a regular expression of `a-z+` but should
7020 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7021 # length. When identifying the current value of an exceeded limit, the units
7022 # should be contained in the key, not the value. For example, rather than
7023 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7024 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7025 # instances that can be created in a single (batch) request.
7026 &quot;a_key&quot;: &quot;A String&quot;,
7027 },
7028 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7029 # proximate cause of the error. Error reasons are unique within a particular
7030 # domain of errors. This should be at most 63 characters and match a
7031 # regular expression of `A-Z+[A-Z0-9]`, which represents
7032 # UPPER_SNAKE_CASE.
7033 },
7034 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7035 #
7036 # For example, if a quota check failed with an error indicating the calling
7037 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7038 # directly to the right place in the developer console to flip the bit.
7039 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7040 { # Describes a URL link.
7041 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7042 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7043 },
7044 ],
7045 },
7046 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7047 # which can be attached to an RPC error.
7048 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7049 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7050 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7051 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7052 },
7053 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7054 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7055 &quot;a_key&quot;: &quot;A String&quot;,
7056 },
7057 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7058 # type or metric.
7059 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7060 # or metric.
7061 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7062 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7063 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7064 },
7065 },
7066 ],
7067 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7068 # This property is optional.
7069 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7070 },
7071 ],
7072 },
7073 &quot;getVersionOperationMetadata&quot;: {
7074 &quot;inlineSbomInfo&quot;: {
7075 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7076 # appropriate identifiers.
7077 &quot;a_key&quot;: &quot;A String&quot;,
7078 },
7079 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7080 # identifiers.
7081 &quot;a_key&quot;: &quot;A String&quot;,
7082 },
7083 },
7084 },
7085 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7086 # message that was returned, such as `NOT FOUND`.
7087 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7088 # status code that was returned. For example, a `404` means the
7089 # resource was not found.
7090 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7091 # defined by the server.
7092 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7093 # This value is inRFC3339
7094 # text format.
7095 &quot;instancesBulkInsertOperationMetadata&quot;: {
7096 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7097 # Example key: zones/us-central1-a
7098 &quot;a_key&quot;: {
7099 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7100 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7101 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7102 # error.
7103 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7104 # if the flow is rolling forward or rolling back.
7105 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7106 },
7107 },
7108 },
7109 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7110 # Operation resources.
7111 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7112 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7113 # group of operations results from a `bulkInsert` API request.
7114 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7115 # `update`, or `delete`, and so on.
7116 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7117 # There is no requirement that this be linear or support any granularity of
7118 # operations. This should not be used to guess when the operation will be
7119 # complete. This number should monotonically increase as the operation
7120 # progresses.
7121 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7122 # applicable when performing regional operations.
7123 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7124 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7125 # this field will contain information on all underlying zonal actions and
7126 # their state.
7127 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7128 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7129 # Example key: zones/us-central1-a
7130 &quot;a_key&quot;: {
7131 &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
7132 # populated.
7133 # different programming environments, including REST APIs and RPC APIs. It is
7134 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7135 # three pieces of data: error code, error message, and error details.
7136 #
7137 # You can find out more about this error model and how to work with it in the
7138 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7139 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7140 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7141 # message types for APIs to use.
7142 {
7143 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7144 },
7145 ],
7146 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7147 # user-facing error message should be localized and sent in the
7148 # google.rpc.Status.details field, or localized by the client.
7149 },
7150 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7151 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7152 },
7153 },
7154 },
7155 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7156 # This value is inRFC3339
7157 # text format.
7158 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7159 # following:
7160 # `PENDING`, `RUNNING`, or `DONE`.
7161 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7162 # operation.
7163 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7164 # of the target resource.
7165 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7166 # operations related to creating a snapshot, this points to the disk
7167 # that the snapshot was created from.
7168 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7169 # `[email protected]` or
7170 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7171 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7172 # operation, this field will be populated.
7173 {
7174 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7175 # Engine returns NO_RESULTS_ON_PAGE if there
7176 # are no results in the response.
7177 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7178 # value format. For example:
7179 #
7180 # &quot;data&quot;: [
7181 # {
7182 # &quot;key&quot;: &quot;scope&quot;,
7183 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7184 # }
7185 {
7186 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7187 # returned. For example, for warnings where there are no results in a list
7188 # request for a particular zone, this key might be scope and
7189 # the key value might be the zone name. Other examples might be a key
7190 # indicating a deprecated resource and a suggested replacement, or a
7191 # warning about invalid network settings (for example, if an instance
7192 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7193 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7194 },
7195 ],
7196 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7197 },
7198 ],
7199 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7200 # applicable when performing per-zone operations.
7201 }</pre>
7202 </div>
7203
7204 <div class="method">
7205 <code class="details" id="removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None, x__xgafv=None)</code>
7206 <pre>Removes an association for the specified security policy.
7207
7208 Use this API to modify Cloud Armor policies. Previously, alpha and beta
7209 versions of this API were used to modify firewall policies. This usage is
7210 now disabled for most organizations. Use firewallPolicies.removeAssociation
7211 instead.
7212
7213 Args:
7214 securityPolicy: string, Name of the security policy to update. (required)
7215 name: string, Name for the attachment that will be removed.
7216 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
7217 that if you must retry your request, the server will know to ignore the
7218 request if it has already been completed.
7219
7220 For example, consider a situation where you make an initial request and
7221 the request times out. If you make the request again with the same
7222 request ID, the server can check if original operation with the same
7223 request ID was received, and if so, will ignore the second request. This
7224 prevents clients from accidentally creating duplicate commitments.
7225
7226 The request ID must be
7227 a valid UUID with the exception that zero UUID is not supported
7228 (00000000-0000-0000-0000-000000000000).
7229 x__xgafv: string, V1 error format.
7230 Allowed values
7231 1 - v1 error format
7232 2 - v2 error format
7233
7234 Returns:
7235 An object of the form:
7236
7237 { # Represents an Operation resource.
7238 #
7239 # Google Compute Engine has three Operation resources:
7240 #
7241 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
7242 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
7243 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
7244 #
7245 # You can use an operation resource to manage asynchronous API requests.
7246 # For more information, readHandling
7247 # API responses.
7248 #
7249 # Operations can be global, regional or zonal.
7250 #
7251 # - For global operations, use the `globalOperations`
7252 # resource.
7253 # - For regional operations, use the
7254 # `regionOperations` resource.
7255 # - For zonal operations, use
7256 # the `zoneOperations` resource.
7257 #
7258 #
7259 #
7260 # For more information, read
7261 # Global, Regional, and Zonal Resources.
7262 #
7263 # Note that completed Operation resources have a limited
7264 # retention period.
7265 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7266 # Not present otherwise.
7267 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7268 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7269 # set when the operation is created.
7270 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7271 # text format.
7272 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7273 # this field will be populated.
7274 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7275 # operation.
7276 {
7277 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7278 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7279 # details. There is a set of defined message types to use for providing
7280 # details.The syntax depends on the error code. For example,
7281 # QuotaExceededInfo will have details when the error code is
7282 # QUOTA_EXCEEDED.
7283 {
7284 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7285 #
7286 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7287 # is not enabled:
7288 #
7289 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7290 # &quot;domain&quot;: &quot;googleapis.com&quot;
7291 # &quot;metadata&quot;: {
7292 # &quot;resource&quot;: &quot;projects/123&quot;,
7293 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7294 # }
7295 # }
7296 #
7297 # This response indicates that the pubsub.googleapis.com API is not enabled.
7298 #
7299 # Example of an error that is returned when attempting to create a Spanner
7300 # instance in a region that is out of stock:
7301 #
7302 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7303 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7304 # &quot;metadata&quot;: {
7305 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7306 # }
7307 # }
7308 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7309 # is typically the registered service name of the tool or product that
7310 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7311 # generated by some common infrastructure, the error domain must be a
7312 # globally unique value that identifies the infrastructure. For Google API
7313 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7314 &quot;metadatas&quot;: { # Additional structured details about this error.
7315 #
7316 # Keys must match a regular expression of `a-z+` but should
7317 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7318 # length. When identifying the current value of an exceeded limit, the units
7319 # should be contained in the key, not the value. For example, rather than
7320 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7321 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7322 # instances that can be created in a single (batch) request.
7323 &quot;a_key&quot;: &quot;A String&quot;,
7324 },
7325 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7326 # proximate cause of the error. Error reasons are unique within a particular
7327 # domain of errors. This should be at most 63 characters and match a
7328 # regular expression of `A-Z+[A-Z0-9]`, which represents
7329 # UPPER_SNAKE_CASE.
7330 },
7331 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7332 #
7333 # For example, if a quota check failed with an error indicating the calling
7334 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7335 # directly to the right place in the developer console to flip the bit.
7336 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7337 { # Describes a URL link.
7338 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7339 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7340 },
7341 ],
7342 },
7343 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7344 # which can be attached to an RPC error.
7345 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7346 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7347 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7348 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7349 },
7350 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7351 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7352 &quot;a_key&quot;: &quot;A String&quot;,
7353 },
7354 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7355 # type or metric.
7356 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7357 # or metric.
7358 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7359 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7360 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7361 },
7362 },
7363 ],
7364 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7365 # This property is optional.
7366 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7367 },
7368 ],
7369 },
7370 &quot;getVersionOperationMetadata&quot;: {
7371 &quot;inlineSbomInfo&quot;: {
7372 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7373 # appropriate identifiers.
7374 &quot;a_key&quot;: &quot;A String&quot;,
7375 },
7376 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7377 # identifiers.
7378 &quot;a_key&quot;: &quot;A String&quot;,
7379 },
7380 },
7381 },
7382 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7383 # message that was returned, such as `NOT FOUND`.
7384 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7385 # status code that was returned. For example, a `404` means the
7386 # resource was not found.
7387 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7388 # defined by the server.
7389 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7390 # This value is inRFC3339
7391 # text format.
7392 &quot;instancesBulkInsertOperationMetadata&quot;: {
7393 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7394 # Example key: zones/us-central1-a
7395 &quot;a_key&quot;: {
7396 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7397 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7398 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7399 # error.
7400 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7401 # if the flow is rolling forward or rolling back.
7402 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7403 },
7404 },
7405 },
7406 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7407 # Operation resources.
7408 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7409 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7410 # group of operations results from a `bulkInsert` API request.
7411 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7412 # `update`, or `delete`, and so on.
7413 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7414 # There is no requirement that this be linear or support any granularity of
7415 # operations. This should not be used to guess when the operation will be
7416 # complete. This number should monotonically increase as the operation
7417 # progresses.
7418 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7419 # applicable when performing regional operations.
7420 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7421 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7422 # this field will contain information on all underlying zonal actions and
7423 # their state.
7424 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7425 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7426 # Example key: zones/us-central1-a
7427 &quot;a_key&quot;: {
7428 &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
7429 # populated.
7430 # different programming environments, including REST APIs and RPC APIs. It is
7431 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7432 # three pieces of data: error code, error message, and error details.
7433 #
7434 # You can find out more about this error model and how to work with it in the
7435 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7436 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7437 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7438 # message types for APIs to use.
7439 {
7440 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7441 },
7442 ],
7443 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7444 # user-facing error message should be localized and sent in the
7445 # google.rpc.Status.details field, or localized by the client.
7446 },
7447 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7448 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7449 },
7450 },
7451 },
7452 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7453 # This value is inRFC3339
7454 # text format.
7455 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7456 # following:
7457 # `PENDING`, `RUNNING`, or `DONE`.
7458 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7459 # operation.
7460 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7461 # of the target resource.
7462 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7463 # operations related to creating a snapshot, this points to the disk
7464 # that the snapshot was created from.
7465 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7466 # `[email protected]` or
7467 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7468 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7469 # operation, this field will be populated.
7470 {
7471 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7472 # Engine returns NO_RESULTS_ON_PAGE if there
7473 # are no results in the response.
7474 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7475 # value format. For example:
7476 #
7477 # &quot;data&quot;: [
7478 # {
7479 # &quot;key&quot;: &quot;scope&quot;,
7480 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7481 # }
7482 {
7483 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7484 # returned. For example, for warnings where there are no results in a list
7485 # request for a particular zone, this key might be scope and
7486 # the key value might be the zone name. Other examples might be a key
7487 # indicating a deprecated resource and a suggested replacement, or a
7488 # warning about invalid network settings (for example, if an instance
7489 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7490 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7491 },
7492 ],
7493 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7494 },
7495 ],
7496 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7497 # applicable when performing per-zone operations.
7498 }</pre>
7499 </div>
7500
7501 <div class="method">
7502 <code class="details" id="removeRule">removeRule(securityPolicy, priority=None, requestId=None, x__xgafv=None)</code>
7503 <pre>Deletes a rule at the specified priority.
7504
7505 Use this API to modify Cloud Armor policies. Previously, alpha and beta
7506 versions of this API were used to modify firewall policies. This usage is
7507 now disabled for most organizations. Use firewallPolicies.removeRule
7508 instead.
7509
7510 Args:
7511 securityPolicy: string, Name of the security policy to update. (required)
7512 priority: integer, The priority of the rule to remove from the security policy.
7513 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
7514 that if you must retry your request, the server will know to ignore the
7515 request if it has already been completed.
7516
7517 For example, consider a situation where you make an initial request and
7518 the request times out. If you make the request again with the same
7519 request ID, the server can check if original operation with the same
7520 request ID was received, and if so, will ignore the second request. This
7521 prevents clients from accidentally creating duplicate commitments.
7522
7523 The request ID must be
7524 a valid UUID with the exception that zero UUID is not supported
7525 (00000000-0000-0000-0000-000000000000).
7526 x__xgafv: string, V1 error format.
7527 Allowed values
7528 1 - v1 error format
7529 2 - v2 error format
7530
7531 Returns:
7532 An object of the form:
7533
7534 { # Represents an Operation resource.
7535 #
7536 # Google Compute Engine has three Operation resources:
7537 #
7538 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
7539 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
7540 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
7541 #
7542 # You can use an operation resource to manage asynchronous API requests.
7543 # For more information, readHandling
7544 # API responses.
7545 #
7546 # Operations can be global, regional or zonal.
7547 #
7548 # - For global operations, use the `globalOperations`
7549 # resource.
7550 # - For regional operations, use the
7551 # `regionOperations` resource.
7552 # - For zonal operations, use
7553 # the `zoneOperations` resource.
7554 #
7555 #
7556 #
7557 # For more information, read
7558 # Global, Regional, and Zonal Resources.
7559 #
7560 # Note that completed Operation resources have a limited
7561 # retention period.
7562 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7563 # Not present otherwise.
7564 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7565 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7566 # set when the operation is created.
7567 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7568 # text format.
7569 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7570 # this field will be populated.
7571 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7572 # operation.
7573 {
7574 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7575 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7576 # details. There is a set of defined message types to use for providing
7577 # details.The syntax depends on the error code. For example,
7578 # QuotaExceededInfo will have details when the error code is
7579 # QUOTA_EXCEEDED.
7580 {
7581 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7582 #
7583 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7584 # is not enabled:
7585 #
7586 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7587 # &quot;domain&quot;: &quot;googleapis.com&quot;
7588 # &quot;metadata&quot;: {
7589 # &quot;resource&quot;: &quot;projects/123&quot;,
7590 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7591 # }
7592 # }
7593 #
7594 # This response indicates that the pubsub.googleapis.com API is not enabled.
7595 #
7596 # Example of an error that is returned when attempting to create a Spanner
7597 # instance in a region that is out of stock:
7598 #
7599 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7600 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7601 # &quot;metadata&quot;: {
7602 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7603 # }
7604 # }
7605 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7606 # is typically the registered service name of the tool or product that
7607 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7608 # generated by some common infrastructure, the error domain must be a
7609 # globally unique value that identifies the infrastructure. For Google API
7610 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7611 &quot;metadatas&quot;: { # Additional structured details about this error.
7612 #
7613 # Keys must match a regular expression of `a-z+` but should
7614 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7615 # length. When identifying the current value of an exceeded limit, the units
7616 # should be contained in the key, not the value. For example, rather than
7617 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7618 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7619 # instances that can be created in a single (batch) request.
7620 &quot;a_key&quot;: &quot;A String&quot;,
7621 },
7622 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7623 # proximate cause of the error. Error reasons are unique within a particular
7624 # domain of errors. This should be at most 63 characters and match a
7625 # regular expression of `A-Z+[A-Z0-9]`, which represents
7626 # UPPER_SNAKE_CASE.
7627 },
7628 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7629 #
7630 # For example, if a quota check failed with an error indicating the calling
7631 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7632 # directly to the right place in the developer console to flip the bit.
7633 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7634 { # Describes a URL link.
7635 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7636 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7637 },
7638 ],
7639 },
7640 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7641 # which can be attached to an RPC error.
7642 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7643 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7644 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7645 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7646 },
7647 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7648 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7649 &quot;a_key&quot;: &quot;A String&quot;,
7650 },
7651 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7652 # type or metric.
7653 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7654 # or metric.
7655 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7656 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7657 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7658 },
7659 },
7660 ],
7661 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7662 # This property is optional.
7663 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7664 },
7665 ],
7666 },
7667 &quot;getVersionOperationMetadata&quot;: {
7668 &quot;inlineSbomInfo&quot;: {
7669 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7670 # appropriate identifiers.
7671 &quot;a_key&quot;: &quot;A String&quot;,
7672 },
7673 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7674 # identifiers.
7675 &quot;a_key&quot;: &quot;A String&quot;,
7676 },
7677 },
7678 },
7679 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7680 # message that was returned, such as `NOT FOUND`.
7681 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7682 # status code that was returned. For example, a `404` means the
7683 # resource was not found.
7684 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7685 # defined by the server.
7686 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7687 # This value is inRFC3339
7688 # text format.
7689 &quot;instancesBulkInsertOperationMetadata&quot;: {
7690 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7691 # Example key: zones/us-central1-a
7692 &quot;a_key&quot;: {
7693 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7694 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7695 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7696 # error.
7697 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7698 # if the flow is rolling forward or rolling back.
7699 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7700 },
7701 },
7702 },
7703 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7704 # Operation resources.
7705 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7706 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7707 # group of operations results from a `bulkInsert` API request.
7708 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7709 # `update`, or `delete`, and so on.
7710 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7711 # There is no requirement that this be linear or support any granularity of
7712 # operations. This should not be used to guess when the operation will be
7713 # complete. This number should monotonically increase as the operation
7714 # progresses.
7715 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7716 # applicable when performing regional operations.
7717 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7718 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7719 # this field will contain information on all underlying zonal actions and
7720 # their state.
7721 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7722 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7723 # Example key: zones/us-central1-a
7724 &quot;a_key&quot;: {
7725 &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
7726 # populated.
7727 # different programming environments, including REST APIs and RPC APIs. It is
7728 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7729 # three pieces of data: error code, error message, and error details.
7730 #
7731 # You can find out more about this error model and how to work with it in the
7732 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7733 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7734 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7735 # message types for APIs to use.
7736 {
7737 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7738 },
7739 ],
7740 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7741 # user-facing error message should be localized and sent in the
7742 # google.rpc.Status.details field, or localized by the client.
7743 },
7744 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7745 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7746 },
7747 },
7748 },
7749 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7750 # This value is inRFC3339
7751 # text format.
7752 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7753 # following:
7754 # `PENDING`, `RUNNING`, or `DONE`.
7755 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7756 # operation.
7757 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7758 # of the target resource.
7759 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7760 # operations related to creating a snapshot, this points to the disk
7761 # that the snapshot was created from.
7762 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7763 # `[email protected]` or
7764 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7765 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7766 # operation, this field will be populated.
7767 {
7768 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7769 # Engine returns NO_RESULTS_ON_PAGE if there
7770 # are no results in the response.
7771 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7772 # value format. For example:
7773 #
7774 # &quot;data&quot;: [
7775 # {
7776 # &quot;key&quot;: &quot;scope&quot;,
7777 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7778 # }
7779 {
7780 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7781 # returned. For example, for warnings where there are no results in a list
7782 # request for a particular zone, this key might be scope and
7783 # the key value might be the zone name. Other examples might be a key
7784 # indicating a deprecated resource and a suggested replacement, or a
7785 # warning about invalid network settings (for example, if an instance
7786 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7787 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7788 },
7789 ],
7790 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7791 },
7792 ],
7793 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7794 # applicable when performing per-zone operations.
7795 }</pre>
7796 </div>
7797
7798 </body></html>