Debian Codegraph @

docs/dyn/compute_v1.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_v1.html">Compute Engine API</a> . <a href="compute_v1.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, 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, 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/v1/globalOperations)
193 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
194 # * [Zonal](/compute/docs/reference/rest/v1/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;headerAction&quot;: { # Optional, additional actions that are performed on headers.
494 # This field is only supported in Global Security Policies of type
495 # CLOUD_ARMOR.
496 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
497 # present.
498 {
499 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
500 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
501 },
502 ],
503 },
504 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
505 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
506 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
507 # Exactly one field must be specified.
508 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
509 # This field must be specified if versioned_expr is specified and cannot
510 # be specified if versioned_expr is not specified.
511 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
512 # Maximum number of src_ip_ranges allowed is 10.
513 &quot;A String&quot;,
514 ],
515 },
516 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
517 # A CEVAL expression is used to specify match criteria such as origin.ip,
518 # source.region_code and contents in the request header.
519 # Expressions containing `evaluateThreatIntelligence` require a Cloud
520 # Armor Enterprise subscription and are not supported in Edge Policies
521 # nor in Regional Policies. Expressions containing
522 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
523 # Enterprise subscription and are only supported in Global Security
524 # Policies.
525 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
526 # are documented at https://github.com/google/cel-spec.
527 #
528 # Example (Comparison):
529 #
530 # title: &quot;Summary size limit&quot;
531 # description: &quot;Determines if a summary is less than 100 chars&quot;
532 # expression: &quot;document.summary.size() &lt; 100&quot;
533 #
534 # Example (Equality):
535 #
536 # title: &quot;Requestor is owner&quot;
537 # description: &quot;Determines if requestor is the document owner&quot;
538 # expression: &quot;document.owner == request.auth.claims.email&quot;
539 #
540 # Example (Logic):
541 #
542 # title: &quot;Public documents&quot;
543 # description: &quot;Determine whether the document should be publicly visible&quot;
544 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
545 #
546 # Example (Data Manipulation):
547 #
548 # title: &quot;Notification string&quot;
549 # description: &quot;Create a notification string with a timestamp.&quot;
550 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
551 #
552 # The exact variables and functions that may be referenced within an expression
553 # are determined by the service that evaluates it. See the service
554 # documentation for additional information.
555 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
556 # describes the expression, e.g. when hovered over it in a UI.
557 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
558 # syntax.
559 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
560 # reporting, e.g. a file name and a position in the file.
561 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
562 # its purpose. This can be used e.g. in UIs which allow to enter the
563 # expression.
564 },
565 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
566 # CEVAL expression (i.e., &#x27;expr&#x27;).
567 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
568 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
569 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
570 # action-tokens. The provided site keys need to be created from
571 # reCAPTCHA API under the same project where the security policy is
572 # created.
573 &quot;A String&quot;,
574 ],
575 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
576 # session-tokens. The provided site keys need to be created from
577 # reCAPTCHA API under the same project where the security policy is
578 # created.
579 &quot;A String&quot;,
580 ],
581 },
582 },
583 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
584 # If this field is specified, config must also be specified.
585 # Available preconfigured expressions along with their requirements are:
586 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
587 # config.
588 },
589 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
590 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
591 # &#x27;action&#x27; is enforced.
592 #
593 # The match criteria for a rule consists of built-in match fields (like
594 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
595 # (&#x27;userDefinedFields&#x27;).
596 #
597 # Field values may be extracted directly from the packet or derived from it
598 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
599 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
600 # header is found in the packet and the entire field is in bounds.
601 #
602 # Each match field may specify which values can match it, listing one or
603 # more ranges, prefixes, or exact values that are considered a match for
604 # the field. A field value must be present in order to match a specified
605 # match field. If no match values are specified for a match field, then any
606 # field value is considered to match it, and it&#x27;s not required to be
607 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
608 #
609 # For a packet to match a rule, all specified match fields must match the
610 # corresponding field values derived from the packet.
611 #
612 # Example:
613 #
614 # networkMatch:
615 # srcIpRanges:
616 # - &quot;192.0.2.0/24&quot;
617 # - &quot;198.51.100.0/24&quot;
618 # userDefinedFields:
619 # - name: &quot;ipv4_fragment_offset&quot;
620 # values:
621 # - &quot;1-0x1fff&quot;
622 #
623 # The above match condition matches packets with a source IP in
624 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
625 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
626 # against.
627 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
628 # format.
629 &quot;A String&quot;,
630 ],
631 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
632 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
633 &quot;A String&quot;,
634 ],
635 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
636 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
637 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
638 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
639 &quot;A String&quot;,
640 ],
641 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
642 42,
643 ],
644 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
645 &quot;A String&quot;,
646 ],
647 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
648 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
649 &quot;A String&quot;,
650 ],
651 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
652 # IP address.
653 &quot;A String&quot;,
654 ],
655 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
656 # matching values for that field.
657 {
658 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
659 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
660 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
661 # range (e.g. &quot;0x400-0x7ff&quot;).
662 &quot;A String&quot;,
663 ],
664 },
665 ],
666 },
667 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
668 # does not evaluate preconfigured WAF rules, i.e., if
669 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
670 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
671 {
672 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
673 # inspection during preconfigured WAF evaluation.
674 {
675 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
676 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
677 },
678 ],
679 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
680 # inspection during preconfigured WAF evaluation.
681 {
682 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
683 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
684 },
685 ],
686 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
687 # from inspection during preconfigured WAF evaluation. Note that the
688 # parameter can be in the query string or in the POST body.
689 {
690 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
691 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
692 },
693 ],
694 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
695 # inspection during preconfigured WAF evaluation. When specifying this
696 # field, the query or fragment part should be excluded.
697 {
698 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
699 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
700 },
701 ],
702 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
703 # preconfigured WAF exclusion. If omitted, it refers to all the rule
704 # IDs under the WAF rule set.
705 &quot;A String&quot;,
706 ],
707 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
708 },
709 ],
710 },
711 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
712 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
713 # must be a positive value between 0 and 2147483647.
714 # Rules are evaluated from highest to lowest priority where 0 is the
715 # highest priority and 2147483647 is the lowest priority.
716 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
717 # &quot;fairshare&quot;. Cannot be specified for any other actions.
718 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
719 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
720 # the traffic will continue to be banned by the rate limit after the
721 # rate falls below the threshold.
722 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
723 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
724 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
725 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
726 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
727 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
728 },
729 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
730 # threshold. Valid option is &quot;allow&quot; only.
731 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
732 # values are:
733 #
734 # - ALL: A single rate limit threshold is applied to all
735 # the requests matching this rule. This is the default value if
736 # &quot;enforceOnKey&quot; is not configured.
737 # - IP: The source IP address of
738 # the request is the key. Each IP has this limit enforced
739 # separately.
740 # - HTTP_HEADER: The value of the HTTP
741 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
742 # value is truncated to the first 128 bytes of the header value. If no
743 # such header is present in the request, the key type defaults toALL.
744 # - XFF_IP: The first IP address (i.e. the
745 # originating client IP address) specified in the list of IPs under
746 # X-Forwarded-For HTTP header. If no such header is present or the value
747 # is not a valid IP, the key defaults to the source IP address of
748 # the request i.e. key type IP.
749 # - HTTP_COOKIE: The value of the HTTP
750 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
751 # value is truncated to the first 128 bytes of the cookie value. If no
752 # such cookie is present in the request, the key type defaults toALL.
753 # - HTTP_PATH: The URL path of the HTTP request. The key
754 # value is truncated to the first 128 bytes.
755 # - SNI: Server name indication in the TLS session of the
756 # HTTPS request. The key value is truncated to the first 128 bytes. The
757 # key type defaults to ALL on a HTTP session.
758 # - REGION_CODE: The country/region from which the request
759 # originates.
760 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
761 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
762 # key type defaults to ALL.
763 # - USER_IP: The IP address of the originating client,
764 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
765 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
766 # an IP address cannot be resolved from it, the key type defaults toIP.
767 #
768 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
769 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
770 # key type defaults to ALL.
771 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
772 # limit threshold is enforced for all the requests matching the rule.
773 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
774 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
775 # ratelimit threshold/action is enforced. You can specify up to 3
776 # enforce_on_key_configs. If enforce_on_key_configs is specified,
777 # enforce_on_key must not be specified.
778 {
779 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
780 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
781 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
782 # taken as the key value.
783 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
784 # values are:
785 #
786 # - ALL: A single rate limit threshold is applied to all
787 # the requests matching this rule. This is the default value if
788 # &quot;enforceOnKeyConfigs&quot; is not configured.
789 # - IP: The source IP address of
790 # the request is the key. Each IP has this limit enforced
791 # separately.
792 # - HTTP_HEADER: The value of the HTTP
793 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
794 # value is truncated to the first 128 bytes of the header value. If no
795 # such header is present in the request, the key type defaults toALL.
796 # - XFF_IP: The first IP address (i.e. the
797 # originating client IP address) specified in the list of IPs under
798 # X-Forwarded-For HTTP header. If no such header is present or the
799 # value is not a valid IP, the key defaults to the source IP address of
800 # the request i.e. key type IP.
801 # - HTTP_COOKIE: The value of the HTTP
802 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
803 # value is truncated to the first 128 bytes of the cookie value. If no
804 # such cookie is present in the request, the key type defaults toALL.
805 # - HTTP_PATH: The URL path of the HTTP request. The key
806 # value is truncated to the first 128 bytes.
807 # - SNI: Server name indication in the TLS session of
808 # the HTTPS request. The key value is truncated to the first 128 bytes.
809 # The key type defaults to ALL on a HTTP session.
810 # - REGION_CODE: The country/region from which the
811 # request originates.
812 # - TLS_JA3_FINGERPRINT: JA3 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 # - USER_IP: The IP address of the originating client,
816 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
817 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
818 # or an IP address cannot be resolved from it, the key type defaults toIP.
819 #
820 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
821 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
822 # key type defaults to ALL.
823 },
824 ],
825 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
826 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
827 # value.
828 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
829 # value.
830 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
831 # threshold, to either deny with a specified HTTP response code, or
832 # redirect to a different endpoint.
833 # Valid options are `deny(STATUS)`, where valid values for
834 # `STATUS` are 403, 404, 429, and 502, and
835 # `redirect`, where the redirect parameters come from
836 # `exceedRedirectOptions` below.
837 # The `redirect` action is only supported in Global Security Policies of
838 # type CLOUD_ARMOR.
839 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
840 # action. Cannot be specified if the exceed action is not redirect.
841 # This field is only supported in Global Security Policies of type
842 # CLOUD_ARMOR.
843 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
844 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
845 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
846 #
847 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
848 # challenge assessment.
849 # - EXTERNAL_302: redirect to a different URL via a 302
850 # response.
851 },
852 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
853 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
854 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
855 },
856 },
857 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
858 # other actions.
859 # This field is only supported in Global Security Policies of type
860 # CLOUD_ARMOR.
861 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
862 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
863 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
864 #
865 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
866 # challenge assessment.
867 # - EXTERNAL_302: redirect to a different URL via a 302
868 # response.
869 },
870 }
871
872 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
873 that if you must retry your request, the server will know to ignore the
874 request if it has already been completed.
875
876 For example, consider a situation where you make an initial request and
877 the request times out. If you make the request again with the same
878 request ID, the server can check if original operation with the same
879 request ID was received, and if so, will ignore the second request. This
880 prevents clients from accidentally creating duplicate commitments.
881
882 The request ID must be
883 a valid UUID with the exception that zero UUID is not supported
884 (00000000-0000-0000-0000-000000000000).
885 x__xgafv: string, V1 error format.
886 Allowed values
887 1 - v1 error format
888 2 - v2 error format
889
890 Returns:
891 An object of the form:
892
893 { # Represents an Operation resource.
894 #
895 # Google Compute Engine has three Operation resources:
896 #
897 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
898 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
899 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
900 #
901 # You can use an operation resource to manage asynchronous API requests.
902 # For more information, readHandling
903 # API responses.
904 #
905 # Operations can be global, regional or zonal.
906 #
907 # - For global operations, use the `globalOperations`
908 # resource.
909 # - For regional operations, use the
910 # `regionOperations` resource.
911 # - For zonal operations, use
912 # the `zoneOperations` resource.
913 #
914 #
915 #
916 # For more information, read
917 # Global, Regional, and Zonal Resources.
918 #
919 # Note that completed Operation resources have a limited
920 # retention period.
921 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
922 # Not present otherwise.
923 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
924 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
925 # set when the operation is created.
926 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
927 # text format.
928 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
929 # this field will be populated.
930 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
931 # operation.
932 {
933 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
934 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
935 # details. There is a set of defined message types to use for providing
936 # details.The syntax depends on the error code. For example,
937 # QuotaExceededInfo will have details when the error code is
938 # QUOTA_EXCEEDED.
939 {
940 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
941 #
942 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
943 # is not enabled:
944 #
945 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
946 # &quot;domain&quot;: &quot;googleapis.com&quot;
947 # &quot;metadata&quot;: {
948 # &quot;resource&quot;: &quot;projects/123&quot;,
949 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
950 # }
951 # }
952 #
953 # This response indicates that the pubsub.googleapis.com API is not enabled.
954 #
955 # Example of an error that is returned when attempting to create a Spanner
956 # instance in a region that is out of stock:
957 #
958 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
959 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
960 # &quot;metadata&quot;: {
961 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
962 # }
963 # }
964 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
965 # is typically the registered service name of the tool or product that
966 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
967 # generated by some common infrastructure, the error domain must be a
968 # globally unique value that identifies the infrastructure. For Google API
969 # infrastructure, the error domain is &quot;googleapis.com&quot;.
970 &quot;metadatas&quot;: { # Additional structured details about this error.
971 #
972 # Keys must match a regular expression of `a-z+` but should
973 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
974 # length. When identifying the current value of an exceeded limit, the units
975 # should be contained in the key, not the value. For example, rather than
976 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
977 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
978 # instances that can be created in a single (batch) request.
979 &quot;a_key&quot;: &quot;A String&quot;,
980 },
981 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
982 # proximate cause of the error. Error reasons are unique within a particular
983 # domain of errors. This should be at most 63 characters and match a
984 # regular expression of `A-Z+[A-Z0-9]`, which represents
985 # UPPER_SNAKE_CASE.
986 },
987 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
988 #
989 # For example, if a quota check failed with an error indicating the calling
990 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
991 # directly to the right place in the developer console to flip the bit.
992 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
993 { # Describes a URL link.
994 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
995 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
996 },
997 ],
998 },
999 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1000 # which can be attached to an RPC error.
1001 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1002 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1003 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1004 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1005 },
1006 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1007 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1008 &quot;a_key&quot;: &quot;A String&quot;,
1009 },
1010 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1011 # type or metric.
1012 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1013 # or metric.
1014 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1015 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1016 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1017 },
1018 },
1019 ],
1020 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1021 # This property is optional.
1022 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1023 },
1024 ],
1025 },
1026 &quot;getVersionOperationMetadata&quot;: {
1027 &quot;inlineSbomInfo&quot;: {
1028 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1029 # appropriate identifiers.
1030 &quot;a_key&quot;: &quot;A String&quot;,
1031 },
1032 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1033 # identifiers.
1034 &quot;a_key&quot;: &quot;A String&quot;,
1035 },
1036 },
1037 },
1038 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1039 # message that was returned, such as `NOT FOUND`.
1040 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1041 # status code that was returned. For example, a `404` means the
1042 # resource was not found.
1043 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1044 # defined by the server.
1045 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1046 # This value is inRFC3339
1047 # text format.
1048 &quot;instancesBulkInsertOperationMetadata&quot;: {
1049 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1050 # Example key: zones/us-central1-a
1051 &quot;a_key&quot;: {
1052 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1053 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1054 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1055 # error.
1056 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1057 # if the flow is rolling forward or rolling back.
1058 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1059 },
1060 },
1061 },
1062 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1063 # Operation resources.
1064 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1065 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1066 # group of operations results from a `bulkInsert` API request.
1067 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1068 # `update`, or `delete`, and so on.
1069 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1070 # There is no requirement that this be linear or support any granularity of
1071 # operations. This should not be used to guess when the operation will be
1072 # complete. This number should monotonically increase as the operation
1073 # progresses.
1074 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1075 # applicable when performing regional operations.
1076 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1077 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1078 # this field will contain information on all underlying zonal actions and
1079 # their state.
1080 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1081 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1082 # Example key: zones/us-central1-a
1083 &quot;a_key&quot;: {
1084 &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
1085 # populated.
1086 # different programming environments, including REST APIs and RPC APIs. It is
1087 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1088 # three pieces of data: error code, error message, and error details.
1089 #
1090 # You can find out more about this error model and how to work with it in the
1091 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1092 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1093 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1094 # message types for APIs to use.
1095 {
1096 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1097 },
1098 ],
1099 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1100 # user-facing error message should be localized and sent in the
1101 # google.rpc.Status.details field, or localized by the client.
1102 },
1103 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1104 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1105 },
1106 },
1107 },
1108 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1109 # This value is inRFC3339
1110 # text format.
1111 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1112 # following:
1113 # `PENDING`, `RUNNING`, or `DONE`.
1114 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1115 # operation.
1116 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1117 # of the target resource.
1118 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1119 # operations related to creating a snapshot, this points to the disk
1120 # that the snapshot was created from.
1121 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1122 # `[email protected]` or
1123 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1124 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1125 # operation, this field will be populated.
1126 {
1127 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1128 # Engine returns NO_RESULTS_ON_PAGE if there
1129 # are no results in the response.
1130 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1131 # value format. For example:
1132 #
1133 # &quot;data&quot;: [
1134 # {
1135 # &quot;key&quot;: &quot;scope&quot;,
1136 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1137 # }
1138 {
1139 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1140 # returned. For example, for warnings where there are no results in a list
1141 # request for a particular zone, this key might be scope and
1142 # the key value might be the zone name. Other examples might be a key
1143 # indicating a deprecated resource and a suggested replacement, or a
1144 # warning about invalid network settings (for example, if an instance
1145 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1146 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1147 },
1148 ],
1149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1150 },
1151 ],
1152 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1153 # applicable when performing per-zone operations.
1154 }</pre>
1155 </div>
1156
1157 <div class="method">
1158 <code class="details" id="close">close()</code>
1159 <pre>Close httplib2 connections.</pre>
1160 </div>
1161
1162 <div class="method">
1163 <code class="details" id="copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</code>
1164 <pre>Copies rules to the specified security policy.
1165
1166 Use this API to modify Cloud Armor policies. Previously, alpha and beta
1167 versions of this API were used to modify firewall policies. This usage is
1168 now disabled for most organizations. Use firewallPolicies.cloneRules
1169 instead.
1170
1171 Args:
1172 securityPolicy: string, Name of the security policy to update. (required)
1173 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1174 that if you must retry your request, the server will know to ignore the
1175 request if it has already been completed.
1176
1177 For example, consider a situation where you make an initial request and
1178 the request times out. If you make the request again with the same
1179 request ID, the server can check if original operation with the same
1180 request ID was received, and if so, will ignore the second request. This
1181 prevents clients from accidentally creating duplicate commitments.
1182
1183 The request ID must be
1184 a valid UUID with the exception that zero UUID is not supported
1185 (00000000-0000-0000-0000-000000000000).
1186 sourceSecurityPolicy: string, The security policy from which to copy rules.
1187 x__xgafv: string, V1 error format.
1188 Allowed values
1189 1 - v1 error format
1190 2 - v2 error format
1191
1192 Returns:
1193 An object of the form:
1194
1195 { # Represents an Operation resource.
1196 #
1197 # Google Compute Engine has three Operation resources:
1198 #
1199 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
1200 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
1201 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
1202 #
1203 # You can use an operation resource to manage asynchronous API requests.
1204 # For more information, readHandling
1205 # API responses.
1206 #
1207 # Operations can be global, regional or zonal.
1208 #
1209 # - For global operations, use the `globalOperations`
1210 # resource.
1211 # - For regional operations, use the
1212 # `regionOperations` resource.
1213 # - For zonal operations, use
1214 # the `zoneOperations` resource.
1215 #
1216 #
1217 #
1218 # For more information, read
1219 # Global, Regional, and Zonal Resources.
1220 #
1221 # Note that completed Operation resources have a limited
1222 # retention period.
1223 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1224 # Not present otherwise.
1225 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1226 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1227 # set when the operation is created.
1228 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1229 # text format.
1230 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1231 # this field will be populated.
1232 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1233 # operation.
1234 {
1235 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1236 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1237 # details. There is a set of defined message types to use for providing
1238 # details.The syntax depends on the error code. For example,
1239 # QuotaExceededInfo will have details when the error code is
1240 # QUOTA_EXCEEDED.
1241 {
1242 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1243 #
1244 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1245 # is not enabled:
1246 #
1247 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1248 # &quot;domain&quot;: &quot;googleapis.com&quot;
1249 # &quot;metadata&quot;: {
1250 # &quot;resource&quot;: &quot;projects/123&quot;,
1251 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1252 # }
1253 # }
1254 #
1255 # This response indicates that the pubsub.googleapis.com API is not enabled.
1256 #
1257 # Example of an error that is returned when attempting to create a Spanner
1258 # instance in a region that is out of stock:
1259 #
1260 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1261 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1262 # &quot;metadata&quot;: {
1263 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1264 # }
1265 # }
1266 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1267 # is typically the registered service name of the tool or product that
1268 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1269 # generated by some common infrastructure, the error domain must be a
1270 # globally unique value that identifies the infrastructure. For Google API
1271 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1272 &quot;metadatas&quot;: { # Additional structured details about this error.
1273 #
1274 # Keys must match a regular expression of `a-z+` but should
1275 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1276 # length. When identifying the current value of an exceeded limit, the units
1277 # should be contained in the key, not the value. For example, rather than
1278 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1279 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1280 # instances that can be created in a single (batch) request.
1281 &quot;a_key&quot;: &quot;A String&quot;,
1282 },
1283 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1284 # proximate cause of the error. Error reasons are unique within a particular
1285 # domain of errors. This should be at most 63 characters and match a
1286 # regular expression of `A-Z+[A-Z0-9]`, which represents
1287 # UPPER_SNAKE_CASE.
1288 },
1289 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1290 #
1291 # For example, if a quota check failed with an error indicating the calling
1292 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1293 # directly to the right place in the developer console to flip the bit.
1294 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1295 { # Describes a URL link.
1296 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1297 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1298 },
1299 ],
1300 },
1301 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1302 # which can be attached to an RPC error.
1303 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1304 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1305 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1306 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1307 },
1308 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1309 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1310 &quot;a_key&quot;: &quot;A String&quot;,
1311 },
1312 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1313 # type or metric.
1314 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1315 # or metric.
1316 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1317 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1318 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1319 },
1320 },
1321 ],
1322 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1323 # This property is optional.
1324 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1325 },
1326 ],
1327 },
1328 &quot;getVersionOperationMetadata&quot;: {
1329 &quot;inlineSbomInfo&quot;: {
1330 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1331 # appropriate identifiers.
1332 &quot;a_key&quot;: &quot;A String&quot;,
1333 },
1334 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1335 # identifiers.
1336 &quot;a_key&quot;: &quot;A String&quot;,
1337 },
1338 },
1339 },
1340 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1341 # message that was returned, such as `NOT FOUND`.
1342 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1343 # status code that was returned. For example, a `404` means the
1344 # resource was not found.
1345 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1346 # defined by the server.
1347 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1348 # This value is inRFC3339
1349 # text format.
1350 &quot;instancesBulkInsertOperationMetadata&quot;: {
1351 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1352 # Example key: zones/us-central1-a
1353 &quot;a_key&quot;: {
1354 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1355 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1356 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1357 # error.
1358 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1359 # if the flow is rolling forward or rolling back.
1360 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1361 },
1362 },
1363 },
1364 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1365 # Operation resources.
1366 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1367 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1368 # group of operations results from a `bulkInsert` API request.
1369 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1370 # `update`, or `delete`, and so on.
1371 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1372 # There is no requirement that this be linear or support any granularity of
1373 # operations. This should not be used to guess when the operation will be
1374 # complete. This number should monotonically increase as the operation
1375 # progresses.
1376 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1377 # applicable when performing regional operations.
1378 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1379 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1380 # this field will contain information on all underlying zonal actions and
1381 # their state.
1382 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1383 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1384 # Example key: zones/us-central1-a
1385 &quot;a_key&quot;: {
1386 &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
1387 # populated.
1388 # different programming environments, including REST APIs and RPC APIs. It is
1389 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1390 # three pieces of data: error code, error message, and error details.
1391 #
1392 # You can find out more about this error model and how to work with it in the
1393 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1394 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1395 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1396 # message types for APIs to use.
1397 {
1398 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1399 },
1400 ],
1401 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1402 # user-facing error message should be localized and sent in the
1403 # google.rpc.Status.details field, or localized by the client.
1404 },
1405 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1406 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1407 },
1408 },
1409 },
1410 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1411 # This value is inRFC3339
1412 # text format.
1413 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1414 # following:
1415 # `PENDING`, `RUNNING`, or `DONE`.
1416 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1417 # operation.
1418 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1419 # of the target resource.
1420 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1421 # operations related to creating a snapshot, this points to the disk
1422 # that the snapshot was created from.
1423 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1424 # `[email protected]` or
1425 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1426 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1427 # operation, this field will be populated.
1428 {
1429 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1430 # Engine returns NO_RESULTS_ON_PAGE if there
1431 # are no results in the response.
1432 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1433 # value format. For example:
1434 #
1435 # &quot;data&quot;: [
1436 # {
1437 # &quot;key&quot;: &quot;scope&quot;,
1438 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1439 # }
1440 {
1441 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1442 # returned. For example, for warnings where there are no results in a list
1443 # request for a particular zone, this key might be scope and
1444 # the key value might be the zone name. Other examples might be a key
1445 # indicating a deprecated resource and a suggested replacement, or a
1446 # warning about invalid network settings (for example, if an instance
1447 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1448 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1449 },
1450 ],
1451 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1452 },
1453 ],
1454 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1455 # applicable when performing per-zone operations.
1456 }</pre>
1457 </div>
1458
1459 <div class="method">
1460 <code class="details" id="delete">delete(securityPolicy, requestId=None, x__xgafv=None)</code>
1461 <pre>Deletes the specified policy.
1462
1463 Use this API to remove Cloud Armor policies. Previously, alpha and beta
1464 versions of this API were used to remove firewall policies. This usage is
1465 now disabled for most organizations. Use firewallPolicies.delete instead.
1466
1467 Args:
1468 securityPolicy: string, Name of the security policy to delete. (required)
1469 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1470 that if you must retry your request, the server will know to ignore the
1471 request if it has already been completed.
1472
1473 For example, consider a situation where you make an initial request and
1474 the request times out. If you make the request again with the same
1475 request ID, the server can check if original operation with the same
1476 request ID was received, and if so, will ignore the second request. This
1477 prevents clients from accidentally creating duplicate commitments.
1478
1479 The request ID must be
1480 a valid UUID with the exception that zero UUID is not supported
1481 (00000000-0000-0000-0000-000000000000).
1482 x__xgafv: string, V1 error format.
1483 Allowed values
1484 1 - v1 error format
1485 2 - v2 error format
1486
1487 Returns:
1488 An object of the form:
1489
1490 { # Represents an Operation resource.
1491 #
1492 # Google Compute Engine has three Operation resources:
1493 #
1494 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
1495 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
1496 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
1497 #
1498 # You can use an operation resource to manage asynchronous API requests.
1499 # For more information, readHandling
1500 # API responses.
1501 #
1502 # Operations can be global, regional or zonal.
1503 #
1504 # - For global operations, use the `globalOperations`
1505 # resource.
1506 # - For regional operations, use the
1507 # `regionOperations` resource.
1508 # - For zonal operations, use
1509 # the `zoneOperations` resource.
1510 #
1511 #
1512 #
1513 # For more information, read
1514 # Global, Regional, and Zonal Resources.
1515 #
1516 # Note that completed Operation resources have a limited
1517 # retention period.
1518 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1519 # Not present otherwise.
1520 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1521 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1522 # set when the operation is created.
1523 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1524 # text format.
1525 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1526 # this field will be populated.
1527 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1528 # operation.
1529 {
1530 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1531 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1532 # details. There is a set of defined message types to use for providing
1533 # details.The syntax depends on the error code. For example,
1534 # QuotaExceededInfo will have details when the error code is
1535 # QUOTA_EXCEEDED.
1536 {
1537 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1538 #
1539 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1540 # is not enabled:
1541 #
1542 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1543 # &quot;domain&quot;: &quot;googleapis.com&quot;
1544 # &quot;metadata&quot;: {
1545 # &quot;resource&quot;: &quot;projects/123&quot;,
1546 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1547 # }
1548 # }
1549 #
1550 # This response indicates that the pubsub.googleapis.com API is not enabled.
1551 #
1552 # Example of an error that is returned when attempting to create a Spanner
1553 # instance in a region that is out of stock:
1554 #
1555 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1556 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1557 # &quot;metadata&quot;: {
1558 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1559 # }
1560 # }
1561 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1562 # is typically the registered service name of the tool or product that
1563 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1564 # generated by some common infrastructure, the error domain must be a
1565 # globally unique value that identifies the infrastructure. For Google API
1566 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1567 &quot;metadatas&quot;: { # Additional structured details about this error.
1568 #
1569 # Keys must match a regular expression of `a-z+` but should
1570 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1571 # length. When identifying the current value of an exceeded limit, the units
1572 # should be contained in the key, not the value. For example, rather than
1573 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1574 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1575 # instances that can be created in a single (batch) request.
1576 &quot;a_key&quot;: &quot;A String&quot;,
1577 },
1578 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1579 # proximate cause of the error. Error reasons are unique within a particular
1580 # domain of errors. This should be at most 63 characters and match a
1581 # regular expression of `A-Z+[A-Z0-9]`, which represents
1582 # UPPER_SNAKE_CASE.
1583 },
1584 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1585 #
1586 # For example, if a quota check failed with an error indicating the calling
1587 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1588 # directly to the right place in the developer console to flip the bit.
1589 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1590 { # Describes a URL link.
1591 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1592 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1593 },
1594 ],
1595 },
1596 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1597 # which can be attached to an RPC error.
1598 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1599 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1600 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1601 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1602 },
1603 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1604 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1605 &quot;a_key&quot;: &quot;A String&quot;,
1606 },
1607 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1608 # type or metric.
1609 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1610 # or metric.
1611 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1612 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1613 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1614 },
1615 },
1616 ],
1617 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1618 # This property is optional.
1619 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1620 },
1621 ],
1622 },
1623 &quot;getVersionOperationMetadata&quot;: {
1624 &quot;inlineSbomInfo&quot;: {
1625 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1626 # appropriate identifiers.
1627 &quot;a_key&quot;: &quot;A String&quot;,
1628 },
1629 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1630 # identifiers.
1631 &quot;a_key&quot;: &quot;A String&quot;,
1632 },
1633 },
1634 },
1635 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1636 # message that was returned, such as `NOT FOUND`.
1637 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1638 # status code that was returned. For example, a `404` means the
1639 # resource was not found.
1640 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1641 # defined by the server.
1642 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1643 # This value is inRFC3339
1644 # text format.
1645 &quot;instancesBulkInsertOperationMetadata&quot;: {
1646 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1647 # Example key: zones/us-central1-a
1648 &quot;a_key&quot;: {
1649 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1650 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1651 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1652 # error.
1653 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1654 # if the flow is rolling forward or rolling back.
1655 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1656 },
1657 },
1658 },
1659 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1660 # Operation resources.
1661 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1662 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1663 # group of operations results from a `bulkInsert` API request.
1664 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1665 # `update`, or `delete`, and so on.
1666 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1667 # There is no requirement that this be linear or support any granularity of
1668 # operations. This should not be used to guess when the operation will be
1669 # complete. This number should monotonically increase as the operation
1670 # progresses.
1671 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1672 # applicable when performing regional operations.
1673 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1674 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1675 # this field will contain information on all underlying zonal actions and
1676 # their state.
1677 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1678 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1679 # Example key: zones/us-central1-a
1680 &quot;a_key&quot;: {
1681 &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
1682 # populated.
1683 # different programming environments, including REST APIs and RPC APIs. It is
1684 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1685 # three pieces of data: error code, error message, and error details.
1686 #
1687 # You can find out more about this error model and how to work with it in the
1688 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1689 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1690 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1691 # message types for APIs to use.
1692 {
1693 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1694 },
1695 ],
1696 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1697 # user-facing error message should be localized and sent in the
1698 # google.rpc.Status.details field, or localized by the client.
1699 },
1700 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1701 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1702 },
1703 },
1704 },
1705 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1706 # This value is inRFC3339
1707 # text format.
1708 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1709 # following:
1710 # `PENDING`, `RUNNING`, or `DONE`.
1711 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1712 # operation.
1713 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1714 # of the target resource.
1715 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1716 # operations related to creating a snapshot, this points to the disk
1717 # that the snapshot was created from.
1718 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1719 # `[email protected]` or
1720 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1721 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1722 # operation, this field will be populated.
1723 {
1724 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1725 # Engine returns NO_RESULTS_ON_PAGE if there
1726 # are no results in the response.
1727 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1728 # value format. For example:
1729 #
1730 # &quot;data&quot;: [
1731 # {
1732 # &quot;key&quot;: &quot;scope&quot;,
1733 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1734 # }
1735 {
1736 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1737 # returned. For example, for warnings where there are no results in a list
1738 # request for a particular zone, this key might be scope and
1739 # the key value might be the zone name. Other examples might be a key
1740 # indicating a deprecated resource and a suggested replacement, or a
1741 # warning about invalid network settings (for example, if an instance
1742 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1743 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1744 },
1745 ],
1746 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1747 },
1748 ],
1749 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1750 # applicable when performing per-zone operations.
1751 }</pre>
1752 </div>
1753
1754 <div class="method">
1755 <code class="details" id="get">get(securityPolicy, x__xgafv=None)</code>
1756 <pre>List all of the ordered rules present in a single specified policy.
1757
1758 Use this API to read Cloud Armor policies. Previously, alpha and beta
1759 versions of this API were used to read firewall policies. This usage is now
1760 disabled for most organizations. Use firewallPolicies.get instead.
1761
1762 Args:
1763 securityPolicy: string, Name of the security policy to get. (required)
1764 x__xgafv: string, V1 error format.
1765 Allowed values
1766 1 - v1 error format
1767 2 - v2 error format
1768
1769 Returns:
1770 An object of the form:
1771
1772 { # Represents a Google Cloud Armor security policy resource.
1773 #
1774 # Only external backend services that use load balancers can
1775 # reference a security policy. For more information, see
1776 # Google Cloud Armor security policy overview.
1777 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
1778 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
1779 # This field is only supported in Global Security Policies of type
1780 # CLOUD_ARMOR.
1781 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
1782 # This field is only supported in Global Security Policies of type
1783 # CLOUD_ARMOR.
1784 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
1785 # STANDARD - opaque rules. (default)
1786 # PREMIUM - transparent rules.
1787 # This field is only supported in Global Security Policies of type
1788 # CLOUD_ARMOR.
1789 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
1790 # customizable thresholds.
1791 {
1792 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
1793 &quot;autoDeployExpirationSec&quot;: 42,
1794 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
1795 &quot;autoDeployLoadThreshold&quot;: 3.14,
1796 &quot;detectionAbsoluteQps&quot;: 3.14,
1797 &quot;detectionLoadThreshold&quot;: 3.14,
1798 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
1799 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
1800 # The name must be unique within the security policy.
1801 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
1802 # on specified granular traffic units.
1803 { # Configurations to specifc granular traffic units processed by
1804 # Adaptive Protection.
1805 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
1806 # type constitutes a separate traffic unit.
1807 # It can only be set to true if `value` is empty.
1808 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
1809 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
1810 },
1811 ],
1812 },
1813 ],
1814 },
1815 },
1816 &quot;advancedOptionsConfig&quot;: {
1817 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
1818 # json_parsing is set to STANDARD.
1819 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
1820 #
1821 # As per RFC 1341, a Content-Type header value has the following format:
1822 #
1823 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
1824 #
1825 # When configuring a custom Content-Type header value, only the
1826 # type/subtype needs to be specified, and the parameters should be
1827 # excluded.
1828 &quot;A String&quot;,
1829 ],
1830 },
1831 &quot;jsonParsing&quot;: &quot;A String&quot;,
1832 &quot;logLevel&quot;: &quot;A String&quot;,
1833 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
1834 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
1835 # Values are case insensitive.
1836 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
1837 # resolving the callers client IP address.
1838 &quot;A String&quot;,
1839 ],
1840 },
1841 &quot;associations&quot;: [ # A list of associations that belong to this policy.
1842 {
1843 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1844 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
1845 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
1846 &quot;A String&quot;,
1847 ],
1848 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
1849 &quot;A String&quot;,
1850 ],
1851 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1852 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
1853 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
1854 },
1855 ],
1856 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1857 # text format.
1858 &quot;ddosProtectionConfig&quot;: {
1859 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
1860 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
1861 # builds DDoS mitigations that minimize collateral damage. It quantifies
1862 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
1863 # blocked.
1864 #
1865 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
1866 # not be deployed. Using a lower value will prioritize keeping collateral
1867 # damage low, possibly at the cost of its effectiveness in rate limiting
1868 # some or all of the attack. It should typically be unset, so Advanced DDoS
1869 # (and Adaptive Protection) uses the best mitigation it can find. Setting
1870 # the threshold is advised if there are logs for false positive detections
1871 # with high collateral damage, and will cause Advanced DDoS to attempt to
1872 # find a less aggressive rule that satisfies the constraint. If a suitable
1873 # rule cannot be found, the system falls back to either no mitigation for
1874 # smaller attacks or broader network throttles for larger ones.
1875 &quot;ddosProtection&quot;: &quot;A String&quot;,
1876 },
1877 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1878 # create the resource.
1879 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
1880 # the metadata&#x27;s contents and used for optimistic locking. The
1881 # fingerprint is initially generated by Compute Engine and changes after
1882 # every request to modify or update metadata. You must always provide an
1883 # up-to-date fingerprint hash in order to update or change metadata,
1884 # otherwise the request will fail with error412 conditionNotMet.
1885 #
1886 # To see the latest fingerprint, make get() request to the
1887 # security policy.
1888 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1889 # defined by the server.
1890 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
1891 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
1892 # is essentially a hash of the labels set used for optimistic locking. The
1893 # fingerprint is initially generated by Compute Engine and changes after
1894 # every request to modify or update labels. You must always provide an
1895 # up-to-date fingerprint hash in order to update or change labels.
1896 #
1897 # To see the latest fingerprint, make get() request to the
1898 # security policy.
1899 &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.
1900 # Label values may be empty.
1901 &quot;a_key&quot;: &quot;A String&quot;,
1902 },
1903 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
1904 # The name must be 1-63 characters long, and comply withRFC1035.
1905 # Specifically, the name must be 1-63 characters long and match the regular
1906 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
1907 # character must be a lowercase letter, and all following characters must
1908 # be a dash, lowercase letter, or digit, except the last character, which
1909 # cannot be a dash.
1910 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
1911 &quot;recaptchaOptionsConfig&quot;: {
1912 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
1913 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
1914 # the security policy. The specified site key needs to be created from the
1915 # reCAPTCHA API. The user is responsible for the validity of the specified
1916 # site key. If not specified, a Google-managed site key is used.
1917 # This field is only supported in Global Security Policies of type
1918 # CLOUD_ARMOR.
1919 },
1920 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
1921 # resides. This field is not applicable to global security policies.
1922 &quot;rules&quot;: [ # A list of rules that belong to this policy.
1923 # There must always be a default rule which is a rule with priority
1924 # 2147483647 and match all condition (for the match condition this means
1925 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
1926 # must be either match &quot;*&quot; or not set). If no rules are provided when
1927 # creating a security policy, a default rule with action &quot;allow&quot; will be
1928 # added.
1929 { # Represents a rule that describes one or more match conditions along with
1930 # the action to be taken when traffic matches this condition (allow or deny).
1931 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
1932 # The following are the valid actions:
1933 #
1934 # - allow: allow access to target.
1935 # - deny(STATUS): deny access to target, returns the
1936 # HTTP response code specified. Valid values for `STATUS`
1937 # are 403, 404, and 502.
1938 # - rate_based_ban: limit client traffic to the configured
1939 # threshold and ban the client if the traffic exceeds the threshold.
1940 # Configure parameters for this action in RateLimitOptions. Requires
1941 # rate_limit_options to be set.
1942 # - redirect: redirect to a different target. This can
1943 # either be an internal reCAPTCHA redirect, or an external URL-based
1944 # redirect via a 302 response. Parameters for this action can be configured
1945 # via redirectOptions. This action is only supported in Global Security
1946 # Policies of type CLOUD_ARMOR.
1947 # - throttle: limit
1948 # client traffic to the configured threshold. Configure parameters for this
1949 # action in rateLimitOptions. Requires rate_limit_options to be set for
1950 # this.
1951 # - fairshare (preview only): when traffic reaches the
1952 # threshold limit, requests from the clients matching this rule begin to be
1953 # rate-limited using the Fair Share algorithm. This action is only allowed
1954 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
1955 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1956 # create the resource.
1957 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
1958 # This field is only supported in Global Security Policies of type
1959 # CLOUD_ARMOR.
1960 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
1961 # present.
1962 {
1963 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
1964 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
1965 },
1966 ],
1967 },
1968 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
1969 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
1970 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1971 # Exactly one field must be specified.
1972 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
1973 # This field must be specified if versioned_expr is specified and cannot
1974 # be specified if versioned_expr is not specified.
1975 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
1976 # Maximum number of src_ip_ranges allowed is 10.
1977 &quot;A String&quot;,
1978 ],
1979 },
1980 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
1981 # A CEVAL expression is used to specify match criteria such as origin.ip,
1982 # source.region_code and contents in the request header.
1983 # Expressions containing `evaluateThreatIntelligence` require a Cloud
1984 # Armor Enterprise subscription and are not supported in Edge Policies
1985 # nor in Regional Policies. Expressions containing
1986 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
1987 # Enterprise subscription and are only supported in Global Security
1988 # Policies.
1989 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1990 # are documented at https://github.com/google/cel-spec.
1991 #
1992 # Example (Comparison):
1993 #
1994 # title: &quot;Summary size limit&quot;
1995 # description: &quot;Determines if a summary is less than 100 chars&quot;
1996 # expression: &quot;document.summary.size() &lt; 100&quot;
1997 #
1998 # Example (Equality):
1999 #
2000 # title: &quot;Requestor is owner&quot;
2001 # description: &quot;Determines if requestor is the document owner&quot;
2002 # expression: &quot;document.owner == request.auth.claims.email&quot;
2003 #
2004 # Example (Logic):
2005 #
2006 # title: &quot;Public documents&quot;
2007 # description: &quot;Determine whether the document should be publicly visible&quot;
2008 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2009 #
2010 # Example (Data Manipulation):
2011 #
2012 # title: &quot;Notification string&quot;
2013 # description: &quot;Create a notification string with a timestamp.&quot;
2014 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2015 #
2016 # The exact variables and functions that may be referenced within an expression
2017 # are determined by the service that evaluates it. See the service
2018 # documentation for additional information.
2019 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2020 # describes the expression, e.g. when hovered over it in a UI.
2021 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2022 # syntax.
2023 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2024 # reporting, e.g. a file name and a position in the file.
2025 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2026 # its purpose. This can be used e.g. in UIs which allow to enter the
2027 # expression.
2028 },
2029 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2030 # CEVAL expression (i.e., &#x27;expr&#x27;).
2031 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2032 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2033 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2034 # action-tokens. The provided site keys need to be created from
2035 # reCAPTCHA API under the same project where the security policy is
2036 # created.
2037 &quot;A String&quot;,
2038 ],
2039 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2040 # session-tokens. The provided site keys need to be created from
2041 # reCAPTCHA API under the same project where the security policy is
2042 # created.
2043 &quot;A String&quot;,
2044 ],
2045 },
2046 },
2047 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2048 # If this field is specified, config must also be specified.
2049 # Available preconfigured expressions along with their requirements are:
2050 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2051 # config.
2052 },
2053 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2054 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2055 # &#x27;action&#x27; is enforced.
2056 #
2057 # The match criteria for a rule consists of built-in match fields (like
2058 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2059 # (&#x27;userDefinedFields&#x27;).
2060 #
2061 # Field values may be extracted directly from the packet or derived from it
2062 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
2063 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
2064 # header is found in the packet and the entire field is in bounds.
2065 #
2066 # Each match field may specify which values can match it, listing one or
2067 # more ranges, prefixes, or exact values that are considered a match for
2068 # the field. A field value must be present in order to match a specified
2069 # match field. If no match values are specified for a match field, then any
2070 # field value is considered to match it, and it&#x27;s not required to be
2071 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
2072 #
2073 # For a packet to match a rule, all specified match fields must match the
2074 # corresponding field values derived from the packet.
2075 #
2076 # Example:
2077 #
2078 # networkMatch:
2079 # srcIpRanges:
2080 # - &quot;192.0.2.0/24&quot;
2081 # - &quot;198.51.100.0/24&quot;
2082 # userDefinedFields:
2083 # - name: &quot;ipv4_fragment_offset&quot;
2084 # values:
2085 # - &quot;1-0x1fff&quot;
2086 #
2087 # The above match condition matches packets with a source IP in
2088 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
2089 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
2090 # against.
2091 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
2092 # format.
2093 &quot;A String&quot;,
2094 ],
2095 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2096 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2097 &quot;A String&quot;,
2098 ],
2099 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
2100 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
2101 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
2102 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
2103 &quot;A String&quot;,
2104 ],
2105 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
2106 42,
2107 ],
2108 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
2109 &quot;A String&quot;,
2110 ],
2111 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2112 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2113 &quot;A String&quot;,
2114 ],
2115 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
2116 # IP address.
2117 &quot;A String&quot;,
2118 ],
2119 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
2120 # matching values for that field.
2121 {
2122 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
2123 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
2124 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
2125 # range (e.g. &quot;0x400-0x7ff&quot;).
2126 &quot;A String&quot;,
2127 ],
2128 },
2129 ],
2130 },
2131 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
2132 # does not evaluate preconfigured WAF rules, i.e., if
2133 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
2134 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
2135 {
2136 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
2137 # inspection during preconfigured WAF evaluation.
2138 {
2139 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2140 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2141 },
2142 ],
2143 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
2144 # inspection during preconfigured WAF evaluation.
2145 {
2146 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2147 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2148 },
2149 ],
2150 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
2151 # from inspection during preconfigured WAF evaluation. Note that the
2152 # parameter can be in the query string or in the POST body.
2153 {
2154 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2155 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2156 },
2157 ],
2158 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
2159 # inspection during preconfigured WAF evaluation. When specifying this
2160 # field, the query or fragment part should be excluded.
2161 {
2162 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2163 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2164 },
2165 ],
2166 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
2167 # preconfigured WAF exclusion. If omitted, it refers to all the rule
2168 # IDs under the WAF rule set.
2169 &quot;A String&quot;,
2170 ],
2171 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
2172 },
2173 ],
2174 },
2175 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2176 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
2177 # must be a positive value between 0 and 2147483647.
2178 # Rules are evaluated from highest to lowest priority where 0 is the
2179 # highest priority and 2147483647 is the lowest priority.
2180 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
2181 # &quot;fairshare&quot;. Cannot be specified for any other actions.
2182 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
2183 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
2184 # the traffic will continue to be banned by the rate limit after the
2185 # rate falls below the threshold.
2186 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
2187 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
2188 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
2189 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2190 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2191 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2192 },
2193 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
2194 # threshold. Valid option is &quot;allow&quot; only.
2195 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2196 # values are:
2197 #
2198 # - ALL: A single rate limit threshold is applied to all
2199 # the requests matching this rule. This is the default value if
2200 # &quot;enforceOnKey&quot; is not configured.
2201 # - IP: The source IP address of
2202 # the request is the key. Each IP has this limit enforced
2203 # separately.
2204 # - HTTP_HEADER: The value of the HTTP
2205 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2206 # value is truncated to the first 128 bytes of the header value. If no
2207 # such header is present in the request, the key type defaults toALL.
2208 # - XFF_IP: The first IP address (i.e. the
2209 # originating client IP address) specified in the list of IPs under
2210 # X-Forwarded-For HTTP header. If no such header is present or the value
2211 # is not a valid IP, the key defaults to the source IP address of
2212 # the request i.e. key type IP.
2213 # - HTTP_COOKIE: The value of the HTTP
2214 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2215 # value is truncated to the first 128 bytes of the cookie value. If no
2216 # such cookie is present in the request, the key type defaults toALL.
2217 # - HTTP_PATH: The URL path of the HTTP request. The key
2218 # value is truncated to the first 128 bytes.
2219 # - SNI: Server name indication in the TLS session of the
2220 # HTTPS request. The key value is truncated to the first 128 bytes. The
2221 # key type defaults to ALL on a HTTP session.
2222 # - REGION_CODE: The country/region from which the request
2223 # originates.
2224 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2225 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2226 # key type defaults to ALL.
2227 # - USER_IP: The IP address of the originating client,
2228 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2229 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
2230 # an IP address cannot be resolved from it, the key type defaults toIP.
2231 #
2232 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2233 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2234 # key type defaults to ALL.
2235 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
2236 # limit threshold is enforced for all the requests matching the rule.
2237 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
2238 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
2239 # ratelimit threshold/action is enforced. You can specify up to 3
2240 # enforce_on_key_configs. If enforce_on_key_configs is specified,
2241 # enforce_on_key must not be specified.
2242 {
2243 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2244 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
2245 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
2246 # taken as the key value.
2247 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2248 # values are:
2249 #
2250 # - ALL: A single rate limit threshold is applied to all
2251 # the requests matching this rule. This is the default value if
2252 # &quot;enforceOnKeyConfigs&quot; is not configured.
2253 # - IP: The source IP address of
2254 # the request is the key. Each IP has this limit enforced
2255 # separately.
2256 # - HTTP_HEADER: The value of the HTTP
2257 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2258 # value is truncated to the first 128 bytes of the header value. If no
2259 # such header is present in the request, the key type defaults toALL.
2260 # - XFF_IP: The first IP address (i.e. the
2261 # originating client IP address) specified in the list of IPs under
2262 # X-Forwarded-For HTTP header. If no such header is present or the
2263 # value is not a valid IP, the key defaults to the source IP address of
2264 # the request i.e. key type IP.
2265 # - HTTP_COOKIE: The value of the HTTP
2266 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2267 # value is truncated to the first 128 bytes of the cookie value. If no
2268 # such cookie is present in the request, the key type defaults toALL.
2269 # - HTTP_PATH: The URL path of the HTTP request. The key
2270 # value is truncated to the first 128 bytes.
2271 # - SNI: Server name indication in the TLS session of
2272 # the HTTPS request. The key value is truncated to the first 128 bytes.
2273 # The key type defaults to ALL on a HTTP session.
2274 # - REGION_CODE: The country/region from which the
2275 # request originates.
2276 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2277 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2278 # key type defaults to ALL.
2279 # - USER_IP: The IP address of the originating client,
2280 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2281 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
2282 # or an IP address cannot be resolved from it, the key type defaults toIP.
2283 #
2284 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2285 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2286 # key type defaults to ALL.
2287 },
2288 ],
2289 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2290 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
2291 # value.
2292 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
2293 # value.
2294 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
2295 # threshold, to either deny with a specified HTTP response code, or
2296 # redirect to a different endpoint.
2297 # Valid options are `deny(STATUS)`, where valid values for
2298 # `STATUS` are 403, 404, 429, and 502, and
2299 # `redirect`, where the redirect parameters come from
2300 # `exceedRedirectOptions` below.
2301 # The `redirect` action is only supported in Global Security Policies of
2302 # type CLOUD_ARMOR.
2303 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
2304 # action. Cannot be specified if the exceed action is not redirect.
2305 # This field is only supported in Global Security Policies of type
2306 # CLOUD_ARMOR.
2307 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2308 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2309 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2310 #
2311 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2312 # challenge assessment.
2313 # - EXTERNAL_302: redirect to a different URL via a 302
2314 # response.
2315 },
2316 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
2317 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2318 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2319 },
2320 },
2321 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
2322 # other actions.
2323 # This field is only supported in Global Security Policies of type
2324 # CLOUD_ARMOR.
2325 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2326 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2327 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2328 #
2329 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2330 # challenge assessment.
2331 # - EXTERNAL_302: redirect to a different URL via a 302
2332 # response.
2333 },
2334 },
2335 ],
2336 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
2337 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
2338 # unique in the organization in which the security policy is created. This
2339 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
2340 # The name must be 1-63 characters long, and comply with
2341 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
2342 # characters long and match the regular expression
2343 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
2344 # lowercase letter, and all following characters must be a dash, lowercase
2345 # letter, or digit, except the last character, which cannot be a dash.
2346 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
2347 #
2348 # - CLOUD_ARMOR: Cloud Armor backend security policies can
2349 # be configured to filter incoming HTTP requests targeting backend services.
2350 # They filter requests before they hit the origin servers.
2351 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
2352 # be configured to filter incoming HTTP requests targeting backend services
2353 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
2354 # They filter requests before the request is served from Google&#x27;s cache.
2355 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
2356 # internal service policies can be configured to filter HTTP requests
2357 # targeting services managed by Traffic Director in a service mesh. They
2358 # filter requests before the request is served from the application.
2359 #
2360 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
2361 # can be configured to filter packets targeting network load balancing
2362 # resources such as backend services, target pools, target instances, and
2363 # instances with external IPs. They filter requests before the request is
2364 # served from the application.
2365 #
2366 #
2367 # This field can be set only at resource creation time.
2368 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
2369 # user-defined field consists of up to 4 bytes extracted from a fixed offset
2370 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
2371 # optional mask to select certain bits. Rules may then specify matching
2372 # values for these fields.
2373 #
2374 # Example:
2375 #
2376 # userDefinedFields:
2377 # - name: &quot;ipv4_fragment_offset&quot;
2378 # base: IPV4
2379 # offset: 6
2380 # size: 2
2381 # mask: &quot;0x1fff&quot;
2382 {
2383 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
2384 #
2385 # - IPV4: Points to the beginning of the IPv4 header.
2386 # - IPV6: Points to the beginning of the IPv6 header.
2387 # - TCP: Points to the beginning of the TCP header, skipping
2388 # over any IPv4 options or IPv6 extension headers. Not present for
2389 # non-first fragments.
2390 # - UDP: Points to the beginning of the UDP header, skipping
2391 # over any IPv4 options or IPv6 extension headers. Not present for
2392 # non-first fragments.
2393 #
2394 #
2395 # required
2396 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
2397 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
2398 # The last byte of the field (in network byte order) corresponds to the
2399 # least significant byte of the mask.
2400 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
2401 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
2402 # &#x27;base&#x27;.
2403 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
2404 },
2405 ],
2406 }</pre>
2407 </div>
2408
2409 <div class="method">
2410 <code class="details" id="getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</code>
2411 <pre>Gets an association with the specified name.
2412
2413 Use this API to read Cloud Armor policies. Previously, alpha and beta
2414 versions of this API were used to read firewall policies. This usage is
2415 now disabled for most organizations. Use firewallPolicies.getAssociation
2416 instead.
2417
2418 Args:
2419 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
2420 name: string, The name of the association to get from the security policy.
2421 x__xgafv: string, V1 error format.
2422 Allowed values
2423 1 - v1 error format
2424 2 - v2 error format
2425
2426 Returns:
2427 An object of the form:
2428
2429 {
2430 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
2431 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
2432 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
2433 &quot;A String&quot;,
2434 ],
2435 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
2436 &quot;A String&quot;,
2437 ],
2438 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
2439 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
2440 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
2441 }</pre>
2442 </div>
2443
2444 <div class="method">
2445 <code class="details" id="getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</code>
2446 <pre>Gets a rule at the specified priority.
2447
2448 Use this API to read Cloud Armor policies. Previously, alpha and beta
2449 versions of this API were used to read firewall policies. This usage is now
2450 disabled for most organizations. Use firewallPolicies.getRule instead.
2451
2452 Args:
2453 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
2454 priority: integer, The priority of the rule to get from the security policy.
2455 x__xgafv: string, V1 error format.
2456 Allowed values
2457 1 - v1 error format
2458 2 - v2 error format
2459
2460 Returns:
2461 An object of the form:
2462
2463 { # Represents a rule that describes one or more match conditions along with
2464 # the action to be taken when traffic matches this condition (allow or deny).
2465 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2466 # The following are the valid actions:
2467 #
2468 # - allow: allow access to target.
2469 # - deny(STATUS): deny access to target, returns the
2470 # HTTP response code specified. Valid values for `STATUS`
2471 # are 403, 404, and 502.
2472 # - rate_based_ban: limit client traffic to the configured
2473 # threshold and ban the client if the traffic exceeds the threshold.
2474 # Configure parameters for this action in RateLimitOptions. Requires
2475 # rate_limit_options to be set.
2476 # - redirect: redirect to a different target. This can
2477 # either be an internal reCAPTCHA redirect, or an external URL-based
2478 # redirect via a 302 response. Parameters for this action can be configured
2479 # via redirectOptions. This action is only supported in Global Security
2480 # Policies of type CLOUD_ARMOR.
2481 # - throttle: limit
2482 # client traffic to the configured threshold. Configure parameters for this
2483 # action in rateLimitOptions. Requires rate_limit_options to be set for
2484 # this.
2485 # - fairshare (preview only): when traffic reaches the
2486 # threshold limit, requests from the clients matching this rule begin to be
2487 # rate-limited using the Fair Share algorithm. This action is only allowed
2488 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2489 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2490 # create the resource.
2491 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2492 # This field is only supported in Global Security Policies of type
2493 # CLOUD_ARMOR.
2494 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2495 # present.
2496 {
2497 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2498 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2499 },
2500 ],
2501 },
2502 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2503 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2504 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2505 # Exactly one field must be specified.
2506 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2507 # This field must be specified if versioned_expr is specified and cannot
2508 # be specified if versioned_expr is not specified.
2509 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2510 # Maximum number of src_ip_ranges allowed is 10.
2511 &quot;A String&quot;,
2512 ],
2513 },
2514 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
2515 # A CEVAL expression is used to specify match criteria such as origin.ip,
2516 # source.region_code and contents in the request header.
2517 # Expressions containing `evaluateThreatIntelligence` require a Cloud
2518 # Armor Enterprise subscription and are not supported in Edge Policies
2519 # nor in Regional Policies. Expressions containing
2520 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
2521 # Enterprise subscription and are only supported in Global Security
2522 # Policies.
2523 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2524 # are documented at https://github.com/google/cel-spec.
2525 #
2526 # Example (Comparison):
2527 #
2528 # title: &quot;Summary size limit&quot;
2529 # description: &quot;Determines if a summary is less than 100 chars&quot;
2530 # expression: &quot;document.summary.size() &lt; 100&quot;
2531 #
2532 # Example (Equality):
2533 #
2534 # title: &quot;Requestor is owner&quot;
2535 # description: &quot;Determines if requestor is the document owner&quot;
2536 # expression: &quot;document.owner == request.auth.claims.email&quot;
2537 #
2538 # Example (Logic):
2539 #
2540 # title: &quot;Public documents&quot;
2541 # description: &quot;Determine whether the document should be publicly visible&quot;
2542 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2543 #
2544 # Example (Data Manipulation):
2545 #
2546 # title: &quot;Notification string&quot;
2547 # description: &quot;Create a notification string with a timestamp.&quot;
2548 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2549 #
2550 # The exact variables and functions that may be referenced within an expression
2551 # are determined by the service that evaluates it. See the service
2552 # documentation for additional information.
2553 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2554 # describes the expression, e.g. when hovered over it in a UI.
2555 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2556 # syntax.
2557 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2558 # reporting, e.g. a file name and a position in the file.
2559 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2560 # its purpose. This can be used e.g. in UIs which allow to enter the
2561 # expression.
2562 },
2563 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2564 # CEVAL expression (i.e., &#x27;expr&#x27;).
2565 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2566 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2567 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2568 # action-tokens. The provided site keys need to be created from
2569 # reCAPTCHA API under the same project where the security policy is
2570 # created.
2571 &quot;A String&quot;,
2572 ],
2573 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2574 # session-tokens. The provided site keys need to be created from
2575 # reCAPTCHA API under the same project where the security policy is
2576 # created.
2577 &quot;A String&quot;,
2578 ],
2579 },
2580 },
2581 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2582 # If this field is specified, config must also be specified.
2583 # Available preconfigured expressions along with their requirements are:
2584 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2585 # config.
2586 },
2587 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2588 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2589 # &#x27;action&#x27; is enforced.
2590 #
2591 # The match criteria for a rule consists of built-in match fields (like
2592 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2593 # (&#x27;userDefinedFields&#x27;).
2594 #
2595 # Field values may be extracted directly from the packet or derived from it
2596 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
2597 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
2598 # header is found in the packet and the entire field is in bounds.
2599 #
2600 # Each match field may specify which values can match it, listing one or
2601 # more ranges, prefixes, or exact values that are considered a match for
2602 # the field. A field value must be present in order to match a specified
2603 # match field. If no match values are specified for a match field, then any
2604 # field value is considered to match it, and it&#x27;s not required to be
2605 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
2606 #
2607 # For a packet to match a rule, all specified match fields must match the
2608 # corresponding field values derived from the packet.
2609 #
2610 # Example:
2611 #
2612 # networkMatch:
2613 # srcIpRanges:
2614 # - &quot;192.0.2.0/24&quot;
2615 # - &quot;198.51.100.0/24&quot;
2616 # userDefinedFields:
2617 # - name: &quot;ipv4_fragment_offset&quot;
2618 # values:
2619 # - &quot;1-0x1fff&quot;
2620 #
2621 # The above match condition matches packets with a source IP in
2622 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
2623 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
2624 # against.
2625 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
2626 # format.
2627 &quot;A String&quot;,
2628 ],
2629 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2630 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2631 &quot;A String&quot;,
2632 ],
2633 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
2634 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
2635 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
2636 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
2637 &quot;A String&quot;,
2638 ],
2639 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
2640 42,
2641 ],
2642 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
2643 &quot;A String&quot;,
2644 ],
2645 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2646 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2647 &quot;A String&quot;,
2648 ],
2649 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
2650 # IP address.
2651 &quot;A String&quot;,
2652 ],
2653 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
2654 # matching values for that field.
2655 {
2656 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
2657 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
2658 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
2659 # range (e.g. &quot;0x400-0x7ff&quot;).
2660 &quot;A String&quot;,
2661 ],
2662 },
2663 ],
2664 },
2665 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
2666 # does not evaluate preconfigured WAF rules, i.e., if
2667 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
2668 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
2669 {
2670 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
2671 # inspection during preconfigured WAF evaluation.
2672 {
2673 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2674 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2675 },
2676 ],
2677 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
2678 # inspection during preconfigured WAF evaluation.
2679 {
2680 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2681 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2682 },
2683 ],
2684 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
2685 # from inspection during preconfigured WAF evaluation. Note that the
2686 # parameter can be in the query string or in the POST body.
2687 {
2688 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2689 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2690 },
2691 ],
2692 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
2693 # inspection during preconfigured WAF evaluation. When specifying this
2694 # field, the query or fragment part should be excluded.
2695 {
2696 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2697 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2698 },
2699 ],
2700 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
2701 # preconfigured WAF exclusion. If omitted, it refers to all the rule
2702 # IDs under the WAF rule set.
2703 &quot;A String&quot;,
2704 ],
2705 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
2706 },
2707 ],
2708 },
2709 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2710 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
2711 # must be a positive value between 0 and 2147483647.
2712 # Rules are evaluated from highest to lowest priority where 0 is the
2713 # highest priority and 2147483647 is the lowest priority.
2714 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
2715 # &quot;fairshare&quot;. Cannot be specified for any other actions.
2716 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
2717 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
2718 # the traffic will continue to be banned by the rate limit after the
2719 # rate falls below the threshold.
2720 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
2721 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
2722 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
2723 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2724 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2725 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2726 },
2727 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
2728 # threshold. Valid option is &quot;allow&quot; only.
2729 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2730 # values are:
2731 #
2732 # - ALL: A single rate limit threshold is applied to all
2733 # the requests matching this rule. This is the default value if
2734 # &quot;enforceOnKey&quot; is not configured.
2735 # - IP: The source IP address of
2736 # the request is the key. Each IP has this limit enforced
2737 # separately.
2738 # - HTTP_HEADER: The value of the HTTP
2739 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2740 # value is truncated to the first 128 bytes of the header value. If no
2741 # such header is present in the request, the key type defaults toALL.
2742 # - XFF_IP: The first IP address (i.e. the
2743 # originating client IP address) specified in the list of IPs under
2744 # X-Forwarded-For HTTP header. If no such header is present or the value
2745 # is not a valid IP, the key defaults to the source IP address of
2746 # the request i.e. key type IP.
2747 # - HTTP_COOKIE: The value of the HTTP
2748 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2749 # value is truncated to the first 128 bytes of the cookie value. If no
2750 # such cookie is present in the request, the key type defaults toALL.
2751 # - HTTP_PATH: The URL path of the HTTP request. The key
2752 # value is truncated to the first 128 bytes.
2753 # - SNI: Server name indication in the TLS session of the
2754 # HTTPS request. The key value is truncated to the first 128 bytes. The
2755 # key type defaults to ALL on a HTTP session.
2756 # - REGION_CODE: The country/region from which the request
2757 # originates.
2758 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2759 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2760 # key type defaults to ALL.
2761 # - USER_IP: The IP address of the originating client,
2762 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2763 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
2764 # an IP address cannot be resolved from it, the key type defaults toIP.
2765 #
2766 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2767 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2768 # key type defaults to ALL.
2769 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
2770 # limit threshold is enforced for all the requests matching the rule.
2771 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
2772 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
2773 # ratelimit threshold/action is enforced. You can specify up to 3
2774 # enforce_on_key_configs. If enforce_on_key_configs is specified,
2775 # enforce_on_key must not be specified.
2776 {
2777 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2778 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
2779 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
2780 # taken as the key value.
2781 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2782 # values are:
2783 #
2784 # - ALL: A single rate limit threshold is applied to all
2785 # the requests matching this rule. This is the default value if
2786 # &quot;enforceOnKeyConfigs&quot; is not configured.
2787 # - IP: The source IP address of
2788 # the request is the key. Each IP has this limit enforced
2789 # separately.
2790 # - HTTP_HEADER: The value of the HTTP
2791 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2792 # value is truncated to the first 128 bytes of the header value. If no
2793 # such header is present in the request, the key type defaults toALL.
2794 # - XFF_IP: The first IP address (i.e. the
2795 # originating client IP address) specified in the list of IPs under
2796 # X-Forwarded-For HTTP header. If no such header is present or the
2797 # value is not a valid IP, the key defaults to the source IP address of
2798 # the request i.e. key type IP.
2799 # - HTTP_COOKIE: The value of the HTTP
2800 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2801 # value is truncated to the first 128 bytes of the cookie value. If no
2802 # such cookie is present in the request, the key type defaults toALL.
2803 # - HTTP_PATH: The URL path of the HTTP request. The key
2804 # value is truncated to the first 128 bytes.
2805 # - SNI: Server name indication in the TLS session of
2806 # the HTTPS request. The key value is truncated to the first 128 bytes.
2807 # The key type defaults to ALL on a HTTP session.
2808 # - REGION_CODE: The country/region from which the
2809 # request originates.
2810 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2811 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2812 # key type defaults to ALL.
2813 # - USER_IP: The IP address of the originating client,
2814 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2815 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
2816 # or an IP address cannot be resolved from it, the key type defaults toIP.
2817 #
2818 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2819 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2820 # key type defaults to ALL.
2821 },
2822 ],
2823 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2824 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
2825 # value.
2826 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
2827 # value.
2828 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
2829 # threshold, to either deny with a specified HTTP response code, or
2830 # redirect to a different endpoint.
2831 # Valid options are `deny(STATUS)`, where valid values for
2832 # `STATUS` are 403, 404, 429, and 502, and
2833 # `redirect`, where the redirect parameters come from
2834 # `exceedRedirectOptions` below.
2835 # The `redirect` action is only supported in Global Security Policies of
2836 # type CLOUD_ARMOR.
2837 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
2838 # action. Cannot be specified if the exceed action is not redirect.
2839 # This field is only supported in Global Security Policies of type
2840 # CLOUD_ARMOR.
2841 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2842 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2843 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2844 #
2845 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2846 # challenge assessment.
2847 # - EXTERNAL_302: redirect to a different URL via a 302
2848 # response.
2849 },
2850 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
2851 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2852 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2853 },
2854 },
2855 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
2856 # other actions.
2857 # This field is only supported in Global Security Policies of type
2858 # CLOUD_ARMOR.
2859 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2860 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2861 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2862 #
2863 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2864 # challenge assessment.
2865 # - EXTERNAL_302: redirect to a different URL via a 302
2866 # response.
2867 },
2868 }</pre>
2869 </div>
2870
2871 <div class="method">
2872 <code class="details" id="insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</code>
2873 <pre>Creates a new policy in the specified organization using the data included
2874 in the request.
2875
2876 Use this API to add Cloud Armor policies. Previously, alpha and beta
2877 versions of this API were used to add firewall policies. This usage is now
2878 disabled for most organizations. Use firewallPolicies.insert instead.
2879
2880 Args:
2881 body: object, The request body.
2882 The object takes the form of:
2883
2884 { # Represents a Google Cloud Armor security policy resource.
2885 #
2886 # Only external backend services that use load balancers can
2887 # reference a security policy. For more information, see
2888 # Google Cloud Armor security policy overview.
2889 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
2890 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
2891 # This field is only supported in Global Security Policies of type
2892 # CLOUD_ARMOR.
2893 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
2894 # This field is only supported in Global Security Policies of type
2895 # CLOUD_ARMOR.
2896 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
2897 # STANDARD - opaque rules. (default)
2898 # PREMIUM - transparent rules.
2899 # This field is only supported in Global Security Policies of type
2900 # CLOUD_ARMOR.
2901 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
2902 # customizable thresholds.
2903 {
2904 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
2905 &quot;autoDeployExpirationSec&quot;: 42,
2906 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
2907 &quot;autoDeployLoadThreshold&quot;: 3.14,
2908 &quot;detectionAbsoluteQps&quot;: 3.14,
2909 &quot;detectionLoadThreshold&quot;: 3.14,
2910 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
2911 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
2912 # The name must be unique within the security policy.
2913 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
2914 # on specified granular traffic units.
2915 { # Configurations to specifc granular traffic units processed by
2916 # Adaptive Protection.
2917 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
2918 # type constitutes a separate traffic unit.
2919 # It can only be set to true if `value` is empty.
2920 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
2921 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
2922 },
2923 ],
2924 },
2925 ],
2926 },
2927 },
2928 &quot;advancedOptionsConfig&quot;: {
2929 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
2930 # json_parsing is set to STANDARD.
2931 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
2932 #
2933 # As per RFC 1341, a Content-Type header value has the following format:
2934 #
2935 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
2936 #
2937 # When configuring a custom Content-Type header value, only the
2938 # type/subtype needs to be specified, and the parameters should be
2939 # excluded.
2940 &quot;A String&quot;,
2941 ],
2942 },
2943 &quot;jsonParsing&quot;: &quot;A String&quot;,
2944 &quot;logLevel&quot;: &quot;A String&quot;,
2945 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
2946 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
2947 # Values are case insensitive.
2948 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
2949 # resolving the callers client IP address.
2950 &quot;A String&quot;,
2951 ],
2952 },
2953 &quot;associations&quot;: [ # A list of associations that belong to this policy.
2954 {
2955 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
2956 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
2957 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
2958 &quot;A String&quot;,
2959 ],
2960 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
2961 &quot;A String&quot;,
2962 ],
2963 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
2964 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
2965 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
2966 },
2967 ],
2968 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
2969 # text format.
2970 &quot;ddosProtectionConfig&quot;: {
2971 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
2972 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
2973 # builds DDoS mitigations that minimize collateral damage. It quantifies
2974 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
2975 # blocked.
2976 #
2977 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
2978 # not be deployed. Using a lower value will prioritize keeping collateral
2979 # damage low, possibly at the cost of its effectiveness in rate limiting
2980 # some or all of the attack. It should typically be unset, so Advanced DDoS
2981 # (and Adaptive Protection) uses the best mitigation it can find. Setting
2982 # the threshold is advised if there are logs for false positive detections
2983 # with high collateral damage, and will cause Advanced DDoS to attempt to
2984 # find a less aggressive rule that satisfies the constraint. If a suitable
2985 # rule cannot be found, the system falls back to either no mitigation for
2986 # smaller attacks or broader network throttles for larger ones.
2987 &quot;ddosProtection&quot;: &quot;A String&quot;,
2988 },
2989 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2990 # create the resource.
2991 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
2992 # the metadata&#x27;s contents and used for optimistic locking. The
2993 # fingerprint is initially generated by Compute Engine and changes after
2994 # every request to modify or update metadata. You must always provide an
2995 # up-to-date fingerprint hash in order to update or change metadata,
2996 # otherwise the request will fail with error412 conditionNotMet.
2997 #
2998 # To see the latest fingerprint, make get() request to the
2999 # security policy.
3000 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
3001 # defined by the server.
3002 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
3003 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
3004 # is essentially a hash of the labels set used for optimistic locking. The
3005 # fingerprint is initially generated by Compute Engine and changes after
3006 # every request to modify or update labels. You must always provide an
3007 # up-to-date fingerprint hash in order to update or change labels.
3008 #
3009 # To see the latest fingerprint, make get() request to the
3010 # security policy.
3011 &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.
3012 # Label values may be empty.
3013 &quot;a_key&quot;: &quot;A String&quot;,
3014 },
3015 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
3016 # The name must be 1-63 characters long, and comply withRFC1035.
3017 # Specifically, the name must be 1-63 characters long and match the regular
3018 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
3019 # character must be a lowercase letter, and all following characters must
3020 # be a dash, lowercase letter, or digit, except the last character, which
3021 # cannot be a dash.
3022 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
3023 &quot;recaptchaOptionsConfig&quot;: {
3024 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
3025 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
3026 # the security policy. The specified site key needs to be created from the
3027 # reCAPTCHA API. The user is responsible for the validity of the specified
3028 # site key. If not specified, a Google-managed site key is used.
3029 # This field is only supported in Global Security Policies of type
3030 # CLOUD_ARMOR.
3031 },
3032 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
3033 # resides. This field is not applicable to global security policies.
3034 &quot;rules&quot;: [ # A list of rules that belong to this policy.
3035 # There must always be a default rule which is a rule with priority
3036 # 2147483647 and match all condition (for the match condition this means
3037 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
3038 # must be either match &quot;*&quot; or not set). If no rules are provided when
3039 # creating a security policy, a default rule with action &quot;allow&quot; will be
3040 # added.
3041 { # Represents a rule that describes one or more match conditions along with
3042 # the action to be taken when traffic matches this condition (allow or deny).
3043 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
3044 # The following are the valid actions:
3045 #
3046 # - allow: allow access to target.
3047 # - deny(STATUS): deny access to target, returns the
3048 # HTTP response code specified. Valid values for `STATUS`
3049 # are 403, 404, and 502.
3050 # - rate_based_ban: limit client traffic to the configured
3051 # threshold and ban the client if the traffic exceeds the threshold.
3052 # Configure parameters for this action in RateLimitOptions. Requires
3053 # rate_limit_options to be set.
3054 # - redirect: redirect to a different target. This can
3055 # either be an internal reCAPTCHA redirect, or an external URL-based
3056 # redirect via a 302 response. Parameters for this action can be configured
3057 # via redirectOptions. This action is only supported in Global Security
3058 # Policies of type CLOUD_ARMOR.
3059 # - throttle: limit
3060 # client traffic to the configured threshold. Configure parameters for this
3061 # action in rateLimitOptions. Requires rate_limit_options to be set for
3062 # this.
3063 # - fairshare (preview only): when traffic reaches the
3064 # threshold limit, requests from the clients matching this rule begin to be
3065 # rate-limited using the Fair Share algorithm. This action is only allowed
3066 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
3067 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3068 # create the resource.
3069 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
3070 # This field is only supported in Global Security Policies of type
3071 # CLOUD_ARMOR.
3072 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
3073 # present.
3074 {
3075 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
3076 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
3077 },
3078 ],
3079 },
3080 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
3081 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
3082 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
3083 # Exactly one field must be specified.
3084 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
3085 # This field must be specified if versioned_expr is specified and cannot
3086 # be specified if versioned_expr is not specified.
3087 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
3088 # Maximum number of src_ip_ranges allowed is 10.
3089 &quot;A String&quot;,
3090 ],
3091 },
3092 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
3093 # A CEVAL expression is used to specify match criteria such as origin.ip,
3094 # source.region_code and contents in the request header.
3095 # Expressions containing `evaluateThreatIntelligence` require a Cloud
3096 # Armor Enterprise subscription and are not supported in Edge Policies
3097 # nor in Regional Policies. Expressions containing
3098 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
3099 # Enterprise subscription and are only supported in Global Security
3100 # Policies.
3101 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3102 # are documented at https://github.com/google/cel-spec.
3103 #
3104 # Example (Comparison):
3105 #
3106 # title: &quot;Summary size limit&quot;
3107 # description: &quot;Determines if a summary is less than 100 chars&quot;
3108 # expression: &quot;document.summary.size() &lt; 100&quot;
3109 #
3110 # Example (Equality):
3111 #
3112 # title: &quot;Requestor is owner&quot;
3113 # description: &quot;Determines if requestor is the document owner&quot;
3114 # expression: &quot;document.owner == request.auth.claims.email&quot;
3115 #
3116 # Example (Logic):
3117 #
3118 # title: &quot;Public documents&quot;
3119 # description: &quot;Determine whether the document should be publicly visible&quot;
3120 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3121 #
3122 # Example (Data Manipulation):
3123 #
3124 # title: &quot;Notification string&quot;
3125 # description: &quot;Create a notification string with a timestamp.&quot;
3126 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3127 #
3128 # The exact variables and functions that may be referenced within an expression
3129 # are determined by the service that evaluates it. See the service
3130 # documentation for additional information.
3131 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3132 # describes the expression, e.g. when hovered over it in a UI.
3133 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3134 # syntax.
3135 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3136 # reporting, e.g. a file name and a position in the file.
3137 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3138 # its purpose. This can be used e.g. in UIs which allow to enter the
3139 # expression.
3140 },
3141 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
3142 # CEVAL expression (i.e., &#x27;expr&#x27;).
3143 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
3144 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
3145 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3146 # action-tokens. The provided site keys need to be created from
3147 # reCAPTCHA API under the same project where the security policy is
3148 # created.
3149 &quot;A String&quot;,
3150 ],
3151 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3152 # session-tokens. The provided site keys need to be created from
3153 # reCAPTCHA API under the same project where the security policy is
3154 # created.
3155 &quot;A String&quot;,
3156 ],
3157 },
3158 },
3159 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
3160 # If this field is specified, config must also be specified.
3161 # Available preconfigured expressions along with their requirements are:
3162 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
3163 # config.
3164 },
3165 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
3166 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
3167 # &#x27;action&#x27; is enforced.
3168 #
3169 # The match criteria for a rule consists of built-in match fields (like
3170 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
3171 # (&#x27;userDefinedFields&#x27;).
3172 #
3173 # Field values may be extracted directly from the packet or derived from it
3174 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
3175 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
3176 # header is found in the packet and the entire field is in bounds.
3177 #
3178 # Each match field may specify which values can match it, listing one or
3179 # more ranges, prefixes, or exact values that are considered a match for
3180 # the field. A field value must be present in order to match a specified
3181 # match field. If no match values are specified for a match field, then any
3182 # field value is considered to match it, and it&#x27;s not required to be
3183 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
3184 #
3185 # For a packet to match a rule, all specified match fields must match the
3186 # corresponding field values derived from the packet.
3187 #
3188 # Example:
3189 #
3190 # networkMatch:
3191 # srcIpRanges:
3192 # - &quot;192.0.2.0/24&quot;
3193 # - &quot;198.51.100.0/24&quot;
3194 # userDefinedFields:
3195 # - name: &quot;ipv4_fragment_offset&quot;
3196 # values:
3197 # - &quot;1-0x1fff&quot;
3198 #
3199 # The above match condition matches packets with a source IP in
3200 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
3201 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
3202 # against.
3203 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
3204 # format.
3205 &quot;A String&quot;,
3206 ],
3207 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3208 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3209 &quot;A String&quot;,
3210 ],
3211 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
3212 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
3213 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
3214 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
3215 &quot;A String&quot;,
3216 ],
3217 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
3218 42,
3219 ],
3220 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
3221 &quot;A String&quot;,
3222 ],
3223 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3224 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3225 &quot;A String&quot;,
3226 ],
3227 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
3228 # IP address.
3229 &quot;A String&quot;,
3230 ],
3231 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
3232 # matching values for that field.
3233 {
3234 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
3235 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
3236 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
3237 # range (e.g. &quot;0x400-0x7ff&quot;).
3238 &quot;A String&quot;,
3239 ],
3240 },
3241 ],
3242 },
3243 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
3244 # does not evaluate preconfigured WAF rules, i.e., if
3245 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
3246 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
3247 {
3248 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
3249 # inspection during preconfigured WAF evaluation.
3250 {
3251 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3252 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3253 },
3254 ],
3255 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
3256 # inspection during preconfigured WAF evaluation.
3257 {
3258 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3259 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3260 },
3261 ],
3262 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
3263 # from inspection during preconfigured WAF evaluation. Note that the
3264 # parameter can be in the query string or in the POST body.
3265 {
3266 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3267 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3268 },
3269 ],
3270 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
3271 # inspection during preconfigured WAF evaluation. When specifying this
3272 # field, the query or fragment part should be excluded.
3273 {
3274 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3275 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3276 },
3277 ],
3278 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
3279 # preconfigured WAF exclusion. If omitted, it refers to all the rule
3280 # IDs under the WAF rule set.
3281 &quot;A String&quot;,
3282 ],
3283 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
3284 },
3285 ],
3286 },
3287 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
3288 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
3289 # must be a positive value between 0 and 2147483647.
3290 # Rules are evaluated from highest to lowest priority where 0 is the
3291 # highest priority and 2147483647 is the lowest priority.
3292 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
3293 # &quot;fairshare&quot;. Cannot be specified for any other actions.
3294 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
3295 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
3296 # the traffic will continue to be banned by the rate limit after the
3297 # rate falls below the threshold.
3298 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
3299 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
3300 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
3301 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
3302 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3303 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3304 },
3305 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
3306 # threshold. Valid option is &quot;allow&quot; only.
3307 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3308 # values are:
3309 #
3310 # - ALL: A single rate limit threshold is applied to all
3311 # the requests matching this rule. This is the default value if
3312 # &quot;enforceOnKey&quot; is not configured.
3313 # - IP: The source IP address of
3314 # the request is the key. Each IP has this limit enforced
3315 # separately.
3316 # - HTTP_HEADER: The value of the HTTP
3317 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3318 # value is truncated to the first 128 bytes of the header value. If no
3319 # such header is present in the request, the key type defaults toALL.
3320 # - XFF_IP: The first IP address (i.e. the
3321 # originating client IP address) specified in the list of IPs under
3322 # X-Forwarded-For HTTP header. If no such header is present or the value
3323 # is not a valid IP, the key defaults to the source IP address of
3324 # the request i.e. key type IP.
3325 # - HTTP_COOKIE: The value of the HTTP
3326 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3327 # value is truncated to the first 128 bytes of the cookie value. If no
3328 # such cookie is present in the request, the key type defaults toALL.
3329 # - HTTP_PATH: The URL path of the HTTP request. The key
3330 # value is truncated to the first 128 bytes.
3331 # - SNI: Server name indication in the TLS session of the
3332 # HTTPS request. The key value is truncated to the first 128 bytes. The
3333 # key type defaults to ALL on a HTTP session.
3334 # - REGION_CODE: The country/region from which the request
3335 # originates.
3336 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3337 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3338 # key type defaults to ALL.
3339 # - USER_IP: The IP address of the originating client,
3340 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3341 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
3342 # an IP address cannot be resolved from it, the key type defaults toIP.
3343 #
3344 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3345 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3346 # key type defaults to ALL.
3347 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
3348 # limit threshold is enforced for all the requests matching the rule.
3349 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
3350 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
3351 # ratelimit threshold/action is enforced. You can specify up to 3
3352 # enforce_on_key_configs. If enforce_on_key_configs is specified,
3353 # enforce_on_key must not be specified.
3354 {
3355 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3356 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
3357 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
3358 # taken as the key value.
3359 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3360 # values are:
3361 #
3362 # - ALL: A single rate limit threshold is applied to all
3363 # the requests matching this rule. This is the default value if
3364 # &quot;enforceOnKeyConfigs&quot; is not configured.
3365 # - IP: The source IP address of
3366 # the request is the key. Each IP has this limit enforced
3367 # separately.
3368 # - HTTP_HEADER: The value of the HTTP
3369 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3370 # value is truncated to the first 128 bytes of the header value. If no
3371 # such header is present in the request, the key type defaults toALL.
3372 # - XFF_IP: The first IP address (i.e. the
3373 # originating client IP address) specified in the list of IPs under
3374 # X-Forwarded-For HTTP header. If no such header is present or the
3375 # value is not a valid IP, the key defaults to the source IP address of
3376 # the request i.e. key type IP.
3377 # - HTTP_COOKIE: The value of the HTTP
3378 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3379 # value is truncated to the first 128 bytes of the cookie value. If no
3380 # such cookie is present in the request, the key type defaults toALL.
3381 # - HTTP_PATH: The URL path of the HTTP request. The key
3382 # value is truncated to the first 128 bytes.
3383 # - SNI: Server name indication in the TLS session of
3384 # the HTTPS request. The key value is truncated to the first 128 bytes.
3385 # The key type defaults to ALL on a HTTP session.
3386 # - REGION_CODE: The country/region from which the
3387 # request originates.
3388 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3389 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3390 # key type defaults to ALL.
3391 # - USER_IP: The IP address of the originating client,
3392 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3393 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
3394 # or an IP address cannot be resolved from it, the key type defaults toIP.
3395 #
3396 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3397 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3398 # key type defaults to ALL.
3399 },
3400 ],
3401 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3402 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
3403 # value.
3404 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
3405 # value.
3406 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
3407 # threshold, to either deny with a specified HTTP response code, or
3408 # redirect to a different endpoint.
3409 # Valid options are `deny(STATUS)`, where valid values for
3410 # `STATUS` are 403, 404, 429, and 502, and
3411 # `redirect`, where the redirect parameters come from
3412 # `exceedRedirectOptions` below.
3413 # The `redirect` action is only supported in Global Security Policies of
3414 # type CLOUD_ARMOR.
3415 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
3416 # action. Cannot be specified if the exceed action is not redirect.
3417 # This field is only supported in Global Security Policies of type
3418 # CLOUD_ARMOR.
3419 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3420 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3421 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3422 #
3423 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3424 # challenge assessment.
3425 # - EXTERNAL_302: redirect to a different URL via a 302
3426 # response.
3427 },
3428 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
3429 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3430 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3431 },
3432 },
3433 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
3434 # other actions.
3435 # This field is only supported in Global Security Policies of type
3436 # CLOUD_ARMOR.
3437 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3438 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3439 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3440 #
3441 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3442 # challenge assessment.
3443 # - EXTERNAL_302: redirect to a different URL via a 302
3444 # response.
3445 },
3446 },
3447 ],
3448 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
3449 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
3450 # unique in the organization in which the security policy is created. This
3451 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
3452 # The name must be 1-63 characters long, and comply with
3453 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
3454 # characters long and match the regular expression
3455 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
3456 # lowercase letter, and all following characters must be a dash, lowercase
3457 # letter, or digit, except the last character, which cannot be a dash.
3458 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
3459 #
3460 # - CLOUD_ARMOR: Cloud Armor backend security policies can
3461 # be configured to filter incoming HTTP requests targeting backend services.
3462 # They filter requests before they hit the origin servers.
3463 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
3464 # be configured to filter incoming HTTP requests targeting backend services
3465 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
3466 # They filter requests before the request is served from Google&#x27;s cache.
3467 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
3468 # internal service policies can be configured to filter HTTP requests
3469 # targeting services managed by Traffic Director in a service mesh. They
3470 # filter requests before the request is served from the application.
3471 #
3472 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
3473 # can be configured to filter packets targeting network load balancing
3474 # resources such as backend services, target pools, target instances, and
3475 # instances with external IPs. They filter requests before the request is
3476 # served from the application.
3477 #
3478 #
3479 # This field can be set only at resource creation time.
3480 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
3481 # user-defined field consists of up to 4 bytes extracted from a fixed offset
3482 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
3483 # optional mask to select certain bits. Rules may then specify matching
3484 # values for these fields.
3485 #
3486 # Example:
3487 #
3488 # userDefinedFields:
3489 # - name: &quot;ipv4_fragment_offset&quot;
3490 # base: IPV4
3491 # offset: 6
3492 # size: 2
3493 # mask: &quot;0x1fff&quot;
3494 {
3495 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
3496 #
3497 # - IPV4: Points to the beginning of the IPv4 header.
3498 # - IPV6: Points to the beginning of the IPv6 header.
3499 # - TCP: Points to the beginning of the TCP header, skipping
3500 # over any IPv4 options or IPv6 extension headers. Not present for
3501 # non-first fragments.
3502 # - UDP: Points to the beginning of the UDP header, skipping
3503 # over any IPv4 options or IPv6 extension headers. Not present for
3504 # non-first fragments.
3505 #
3506 #
3507 # required
3508 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
3509 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
3510 # The last byte of the field (in network byte order) corresponds to the
3511 # least significant byte of the mask.
3512 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
3513 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
3514 # &#x27;base&#x27;.
3515 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
3516 },
3517 ],
3518 }
3519
3520 parentId: string, Parent ID for this request. The ID can be either be &quot;folders/[FOLDER_ID]&quot;
3521 if the parent is a folder or &quot;organizations/[ORGANIZATION_ID]&quot; if the
3522 parent is an organization.
3523 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
3524 that if you must retry your request, the server will know to ignore the
3525 request if it has already been completed.
3526
3527 For example, consider a situation where you make an initial request and
3528 the request times out. If you make the request again with the same
3529 request ID, the server can check if original operation with the same
3530 request ID was received, and if so, will ignore the second request. This
3531 prevents clients from accidentally creating duplicate commitments.
3532
3533 The request ID must be
3534 a valid UUID with the exception that zero UUID is not supported
3535 (00000000-0000-0000-0000-000000000000).
3536 x__xgafv: string, V1 error format.
3537 Allowed values
3538 1 - v1 error format
3539 2 - v2 error format
3540
3541 Returns:
3542 An object of the form:
3543
3544 { # Represents an Operation resource.
3545 #
3546 # Google Compute Engine has three Operation resources:
3547 #
3548 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
3549 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
3550 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
3551 #
3552 # You can use an operation resource to manage asynchronous API requests.
3553 # For more information, readHandling
3554 # API responses.
3555 #
3556 # Operations can be global, regional or zonal.
3557 #
3558 # - For global operations, use the `globalOperations`
3559 # resource.
3560 # - For regional operations, use the
3561 # `regionOperations` resource.
3562 # - For zonal operations, use
3563 # the `zoneOperations` resource.
3564 #
3565 #
3566 #
3567 # For more information, read
3568 # Global, Regional, and Zonal Resources.
3569 #
3570 # Note that completed Operation resources have a limited
3571 # retention period.
3572 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
3573 # Not present otherwise.
3574 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3575 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
3576 # set when the operation is created.
3577 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
3578 # text format.
3579 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
3580 # this field will be populated.
3581 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
3582 # operation.
3583 {
3584 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3585 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
3586 # details. There is a set of defined message types to use for providing
3587 # details.The syntax depends on the error code. For example,
3588 # QuotaExceededInfo will have details when the error code is
3589 # QUOTA_EXCEEDED.
3590 {
3591 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
3592 #
3593 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
3594 # is not enabled:
3595 #
3596 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
3597 # &quot;domain&quot;: &quot;googleapis.com&quot;
3598 # &quot;metadata&quot;: {
3599 # &quot;resource&quot;: &quot;projects/123&quot;,
3600 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
3601 # }
3602 # }
3603 #
3604 # This response indicates that the pubsub.googleapis.com API is not enabled.
3605 #
3606 # Example of an error that is returned when attempting to create a Spanner
3607 # instance in a region that is out of stock:
3608 #
3609 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
3610 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
3611 # &quot;metadata&quot;: {
3612 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
3613 # }
3614 # }
3615 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
3616 # is typically the registered service name of the tool or product that
3617 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
3618 # generated by some common infrastructure, the error domain must be a
3619 # globally unique value that identifies the infrastructure. For Google API
3620 # infrastructure, the error domain is &quot;googleapis.com&quot;.
3621 &quot;metadatas&quot;: { # Additional structured details about this error.
3622 #
3623 # Keys must match a regular expression of `a-z+` but should
3624 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
3625 # length. When identifying the current value of an exceeded limit, the units
3626 # should be contained in the key, not the value. For example, rather than
3627 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
3628 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
3629 # instances that can be created in a single (batch) request.
3630 &quot;a_key&quot;: &quot;A String&quot;,
3631 },
3632 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
3633 # proximate cause of the error. Error reasons are unique within a particular
3634 # domain of errors. This should be at most 63 characters and match a
3635 # regular expression of `A-Z+[A-Z0-9]`, which represents
3636 # UPPER_SNAKE_CASE.
3637 },
3638 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
3639 #
3640 # For example, if a quota check failed with an error indicating the calling
3641 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
3642 # directly to the right place in the developer console to flip the bit.
3643 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
3644 { # Describes a URL link.
3645 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
3646 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
3647 },
3648 ],
3649 },
3650 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
3651 # which can be attached to an RPC error.
3652 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
3653 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
3654 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
3655 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
3656 },
3657 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
3658 &quot;dimensions&quot;: { # The map holding related quota dimensions.
3659 &quot;a_key&quot;: &quot;A String&quot;,
3660 },
3661 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
3662 # type or metric.
3663 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
3664 # or metric.
3665 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
3666 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
3667 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
3668 },
3669 },
3670 ],
3671 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
3672 # This property is optional.
3673 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
3674 },
3675 ],
3676 },
3677 &quot;getVersionOperationMetadata&quot;: {
3678 &quot;inlineSbomInfo&quot;: {
3679 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
3680 # appropriate identifiers.
3681 &quot;a_key&quot;: &quot;A String&quot;,
3682 },
3683 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
3684 # identifiers.
3685 &quot;a_key&quot;: &quot;A String&quot;,
3686 },
3687 },
3688 },
3689 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
3690 # message that was returned, such as `NOT FOUND`.
3691 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
3692 # status code that was returned. For example, a `404` means the
3693 # resource was not found.
3694 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
3695 # defined by the server.
3696 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
3697 # This value is inRFC3339
3698 # text format.
3699 &quot;instancesBulkInsertOperationMetadata&quot;: {
3700 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
3701 # Example key: zones/us-central1-a
3702 &quot;a_key&quot;: {
3703 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
3704 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
3705 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
3706 # error.
3707 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
3708 # if the flow is rolling forward or rolling back.
3709 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
3710 },
3711 },
3712 },
3713 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
3714 # Operation resources.
3715 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3716 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
3717 # group of operations results from a `bulkInsert` API request.
3718 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
3719 # `update`, or `delete`, and so on.
3720 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
3721 # There is no requirement that this be linear or support any granularity of
3722 # operations. This should not be used to guess when the operation will be
3723 # complete. This number should monotonically increase as the operation
3724 # progresses.
3725 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
3726 # applicable when performing regional operations.
3727 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3728 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
3729 # this field will contain information on all underlying zonal actions and
3730 # their state.
3731 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
3732 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
3733 # Example key: zones/us-central1-a
3734 &quot;a_key&quot;: {
3735 &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
3736 # populated.
3737 # different programming environments, including REST APIs and RPC APIs. It is
3738 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
3739 # three pieces of data: error code, error message, and error details.
3740 #
3741 # You can find out more about this error model and how to work with it in the
3742 # [API Design Guide](https://cloud.google.com/apis/design/errors).
3743 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
3744 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
3745 # message types for APIs to use.
3746 {
3747 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3748 },
3749 ],
3750 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
3751 # user-facing error message should be localized and sent in the
3752 # google.rpc.Status.details field, or localized by the client.
3753 },
3754 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
3755 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
3756 },
3757 },
3758 },
3759 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
3760 # This value is inRFC3339
3761 # text format.
3762 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
3763 # following:
3764 # `PENDING`, `RUNNING`, or `DONE`.
3765 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
3766 # operation.
3767 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
3768 # of the target resource.
3769 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
3770 # operations related to creating a snapshot, this points to the disk
3771 # that the snapshot was created from.
3772 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
3773 # `[email protected]` or
3774 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
3775 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
3776 # operation, this field will be populated.
3777 {
3778 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
3779 # Engine returns NO_RESULTS_ON_PAGE if there
3780 # are no results in the response.
3781 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
3782 # value format. For example:
3783 #
3784 # &quot;data&quot;: [
3785 # {
3786 # &quot;key&quot;: &quot;scope&quot;,
3787 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
3788 # }
3789 {
3790 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
3791 # returned. For example, for warnings where there are no results in a list
3792 # request for a particular zone, this key might be scope and
3793 # the key value might be the zone name. Other examples might be a key
3794 # indicating a deprecated resource and a suggested replacement, or a
3795 # warning about invalid network settings (for example, if an instance
3796 # attempts to perform IP forwarding but is not enabled for IP forwarding).
3797 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3798 },
3799 ],
3800 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3801 },
3802 ],
3803 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
3804 # applicable when performing per-zone operations.
3805 }</pre>
3806 </div>
3807
3808 <div class="method">
3809 <code class="details" id="list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
3810 <pre>List all the policies that have been configured for the specified
3811 organization.
3812
3813 Use this API to read Cloud Armor policies. Previously, alpha and beta
3814 versions of this API were used to read firewall policies. This usage is now
3815 disabled for most organizations. Use firewallPolicies.list instead.
3816
3817 Args:
3818 filter: string, A filter expression that filters resources listed in the response. Most
3819 Compute resources support two types of filter expressions:
3820 expressions that support regular expressions and expressions that follow
3821 API improvement proposal AIP-160.
3822 These two types of filter expressions cannot be mixed in one request.
3823
3824 If you want to use AIP-160, your expression must specify the field name, an
3825 operator, and the value that you want to use for filtering. The value
3826 must be a string, a number, or a boolean. The operator
3827 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
3828
3829 For example, if you are filtering Compute Engine instances, you can
3830 exclude instances named `example-instance` by specifying
3831 `name != example-instance`.
3832
3833 The `:*` comparison can be used to test whether a key has been defined.
3834 For example, to find all objects with `owner` label use:
3835 ```
3836 labels.owner:*
3837 ```
3838
3839 You can also filter nested fields. For example, you could specify
3840 `scheduling.automaticRestart = false` to include instances only
3841 if they are not scheduled for automatic restarts. You can use filtering
3842 on nested fields to filter based onresource labels.
3843
3844 To filter on multiple expressions, provide each separate expression within
3845 parentheses. For example:
3846 ```
3847 (scheduling.automaticRestart = true)
3848 (cpuPlatform = &quot;Intel Skylake&quot;)
3849 ```
3850 By default, each expression is an `AND` expression. However, you
3851 can include `AND` and `OR` expressions explicitly.
3852 For example:
3853 ```
3854 (cpuPlatform = &quot;Intel Skylake&quot;) OR
3855 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
3856 (scheduling.automaticRestart = true)
3857 ```
3858
3859 If you want to use a regular expression, use the `eq` (equal) or `ne`
3860 (not equal) operator against a single un-parenthesized expression with or
3861 without quotes or against multiple parenthesized expressions. Examples:
3862
3863 `fieldname eq unquoted literal`
3864 `fieldname eq &#x27;single quoted literal&#x27;`
3865 `fieldname eq &quot;double quoted literal&quot;`
3866 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
3867
3868 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
3869 The literal value must match the entire field.
3870
3871 For example, to filter for instances that do not end with name &quot;instance&quot;,
3872 you would use `name ne .*instance`.
3873
3874 You cannot combine constraints on multiple fields using regular
3875 expressions.
3876 maxResults: integer, The maximum number of results per page that should be returned.
3877 If the number of available results is larger than `maxResults`,
3878 Compute Engine returns a `nextPageToken` that can be used to get
3879 the next page of results in subsequent list requests. Acceptable values are
3880 `0` to `500`, inclusive. (Default: `500`)
3881 orderBy: string, Sorts list results by a certain order. By default, results
3882 are returned in alphanumerical order based on the resource name.
3883
3884 You can also sort results in descending order based on the creation
3885 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
3886 results based on the `creationTimestamp` field in
3887 reverse chronological order (newest result first). Use this to sort
3888 resources like operations so that the newest operation is returned first.
3889
3890 Currently, only sorting by `name` or
3891 `creationTimestamp desc` is supported.
3892 pageToken: string, Specifies a page token to use. Set `pageToken` to the
3893 `nextPageToken` returned by a previous list request to get
3894 the next page of results.
3895 parentId: string, Parent ID for this request.
3896 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
3897 of failure. The default value is false.
3898
3899 For example, when partial success behavior is enabled, aggregatedList for a
3900 single zone scope either returns all resources in the zone or no resources,
3901 with an error code.
3902 x__xgafv: string, V1 error format.
3903 Allowed values
3904 1 - v1 error format
3905 2 - v2 error format
3906
3907 Returns:
3908 An object of the form:
3909
3910 {
3911 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3912 &quot;items&quot;: [ # A list of SecurityPolicy resources.
3913 { # Represents a Google Cloud Armor security policy resource.
3914 #
3915 # Only external backend services that use load balancers can
3916 # reference a security policy. For more information, see
3917 # Google Cloud Armor security policy overview.
3918 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
3919 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
3920 # This field is only supported in Global Security Policies of type
3921 # CLOUD_ARMOR.
3922 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
3923 # This field is only supported in Global Security Policies of type
3924 # CLOUD_ARMOR.
3925 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
3926 # STANDARD - opaque rules. (default)
3927 # PREMIUM - transparent rules.
3928 # This field is only supported in Global Security Policies of type
3929 # CLOUD_ARMOR.
3930 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
3931 # customizable thresholds.
3932 {
3933 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
3934 &quot;autoDeployExpirationSec&quot;: 42,
3935 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
3936 &quot;autoDeployLoadThreshold&quot;: 3.14,
3937 &quot;detectionAbsoluteQps&quot;: 3.14,
3938 &quot;detectionLoadThreshold&quot;: 3.14,
3939 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
3940 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
3941 # The name must be unique within the security policy.
3942 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
3943 # on specified granular traffic units.
3944 { # Configurations to specifc granular traffic units processed by
3945 # Adaptive Protection.
3946 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
3947 # type constitutes a separate traffic unit.
3948 # It can only be set to true if `value` is empty.
3949 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
3950 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
3951 },
3952 ],
3953 },
3954 ],
3955 },
3956 },
3957 &quot;advancedOptionsConfig&quot;: {
3958 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
3959 # json_parsing is set to STANDARD.
3960 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
3961 #
3962 # As per RFC 1341, a Content-Type header value has the following format:
3963 #
3964 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
3965 #
3966 # When configuring a custom Content-Type header value, only the
3967 # type/subtype needs to be specified, and the parameters should be
3968 # excluded.
3969 &quot;A String&quot;,
3970 ],
3971 },
3972 &quot;jsonParsing&quot;: &quot;A String&quot;,
3973 &quot;logLevel&quot;: &quot;A String&quot;,
3974 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
3975 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
3976 # Values are case insensitive.
3977 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
3978 # resolving the callers client IP address.
3979 &quot;A String&quot;,
3980 ],
3981 },
3982 &quot;associations&quot;: [ # A list of associations that belong to this policy.
3983 {
3984 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
3985 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
3986 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
3987 &quot;A String&quot;,
3988 ],
3989 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
3990 &quot;A String&quot;,
3991 ],
3992 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
3993 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
3994 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
3995 },
3996 ],
3997 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
3998 # text format.
3999 &quot;ddosProtectionConfig&quot;: {
4000 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
4001 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
4002 # builds DDoS mitigations that minimize collateral damage. It quantifies
4003 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
4004 # blocked.
4005 #
4006 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
4007 # not be deployed. Using a lower value will prioritize keeping collateral
4008 # damage low, possibly at the cost of its effectiveness in rate limiting
4009 # some or all of the attack. It should typically be unset, so Advanced DDoS
4010 # (and Adaptive Protection) uses the best mitigation it can find. Setting
4011 # the threshold is advised if there are logs for false positive detections
4012 # with high collateral damage, and will cause Advanced DDoS to attempt to
4013 # find a less aggressive rule that satisfies the constraint. If a suitable
4014 # rule cannot be found, the system falls back to either no mitigation for
4015 # smaller attacks or broader network throttles for larger ones.
4016 &quot;ddosProtection&quot;: &quot;A String&quot;,
4017 },
4018 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4019 # create the resource.
4020 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
4021 # the metadata&#x27;s contents and used for optimistic locking. The
4022 # fingerprint is initially generated by Compute Engine and changes after
4023 # every request to modify or update metadata. You must always provide an
4024 # up-to-date fingerprint hash in order to update or change metadata,
4025 # otherwise the request will fail with error412 conditionNotMet.
4026 #
4027 # To see the latest fingerprint, make get() request to the
4028 # security policy.
4029 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
4030 # defined by the server.
4031 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
4032 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
4033 # is essentially a hash of the labels set used for optimistic locking. The
4034 # fingerprint is initially generated by Compute Engine and changes after
4035 # every request to modify or update labels. You must always provide an
4036 # up-to-date fingerprint hash in order to update or change labels.
4037 #
4038 # To see the latest fingerprint, make get() request to the
4039 # security policy.
4040 &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.
4041 # Label values may be empty.
4042 &quot;a_key&quot;: &quot;A String&quot;,
4043 },
4044 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
4045 # The name must be 1-63 characters long, and comply withRFC1035.
4046 # Specifically, the name must be 1-63 characters long and match the regular
4047 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
4048 # character must be a lowercase letter, and all following characters must
4049 # be a dash, lowercase letter, or digit, except the last character, which
4050 # cannot be a dash.
4051 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
4052 &quot;recaptchaOptionsConfig&quot;: {
4053 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
4054 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
4055 # the security policy. The specified site key needs to be created from the
4056 # reCAPTCHA API. The user is responsible for the validity of the specified
4057 # site key. If not specified, a Google-managed site key is used.
4058 # This field is only supported in Global Security Policies of type
4059 # CLOUD_ARMOR.
4060 },
4061 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
4062 # resides. This field is not applicable to global security policies.
4063 &quot;rules&quot;: [ # A list of rules that belong to this policy.
4064 # There must always be a default rule which is a rule with priority
4065 # 2147483647 and match all condition (for the match condition this means
4066 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
4067 # must be either match &quot;*&quot; or not set). If no rules are provided when
4068 # creating a security policy, a default rule with action &quot;allow&quot; will be
4069 # added.
4070 { # Represents a rule that describes one or more match conditions along with
4071 # the action to be taken when traffic matches this condition (allow or deny).
4072 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
4073 # The following are the valid actions:
4074 #
4075 # - allow: allow access to target.
4076 # - deny(STATUS): deny access to target, returns the
4077 # HTTP response code specified. Valid values for `STATUS`
4078 # are 403, 404, and 502.
4079 # - rate_based_ban: limit client traffic to the configured
4080 # threshold and ban the client if the traffic exceeds the threshold.
4081 # Configure parameters for this action in RateLimitOptions. Requires
4082 # rate_limit_options to be set.
4083 # - redirect: redirect to a different target. This can
4084 # either be an internal reCAPTCHA redirect, or an external URL-based
4085 # redirect via a 302 response. Parameters for this action can be configured
4086 # via redirectOptions. This action is only supported in Global Security
4087 # Policies of type CLOUD_ARMOR.
4088 # - throttle: limit
4089 # client traffic to the configured threshold. Configure parameters for this
4090 # action in rateLimitOptions. Requires rate_limit_options to be set for
4091 # this.
4092 # - fairshare (preview only): when traffic reaches the
4093 # threshold limit, requests from the clients matching this rule begin to be
4094 # rate-limited using the Fair Share algorithm. This action is only allowed
4095 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
4096 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4097 # create the resource.
4098 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
4099 # This field is only supported in Global Security Policies of type
4100 # CLOUD_ARMOR.
4101 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
4102 # present.
4103 {
4104 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
4105 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
4106 },
4107 ],
4108 },
4109 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
4110 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
4111 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
4112 # Exactly one field must be specified.
4113 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
4114 # This field must be specified if versioned_expr is specified and cannot
4115 # be specified if versioned_expr is not specified.
4116 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
4117 # Maximum number of src_ip_ranges allowed is 10.
4118 &quot;A String&quot;,
4119 ],
4120 },
4121 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
4122 # A CEVAL expression is used to specify match criteria such as origin.ip,
4123 # source.region_code and contents in the request header.
4124 # Expressions containing `evaluateThreatIntelligence` require a Cloud
4125 # Armor Enterprise subscription and are not supported in Edge Policies
4126 # nor in Regional Policies. Expressions containing
4127 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
4128 # Enterprise subscription and are only supported in Global Security
4129 # Policies.
4130 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4131 # are documented at https://github.com/google/cel-spec.
4132 #
4133 # Example (Comparison):
4134 #
4135 # title: &quot;Summary size limit&quot;
4136 # description: &quot;Determines if a summary is less than 100 chars&quot;
4137 # expression: &quot;document.summary.size() &lt; 100&quot;
4138 #
4139 # Example (Equality):
4140 #
4141 # title: &quot;Requestor is owner&quot;
4142 # description: &quot;Determines if requestor is the document owner&quot;
4143 # expression: &quot;document.owner == request.auth.claims.email&quot;
4144 #
4145 # Example (Logic):
4146 #
4147 # title: &quot;Public documents&quot;
4148 # description: &quot;Determine whether the document should be publicly visible&quot;
4149 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4150 #
4151 # Example (Data Manipulation):
4152 #
4153 # title: &quot;Notification string&quot;
4154 # description: &quot;Create a notification string with a timestamp.&quot;
4155 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4156 #
4157 # The exact variables and functions that may be referenced within an expression
4158 # are determined by the service that evaluates it. See the service
4159 # documentation for additional information.
4160 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4161 # describes the expression, e.g. when hovered over it in a UI.
4162 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4163 # syntax.
4164 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4165 # reporting, e.g. a file name and a position in the file.
4166 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4167 # its purpose. This can be used e.g. in UIs which allow to enter the
4168 # expression.
4169 },
4170 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
4171 # CEVAL expression (i.e., &#x27;expr&#x27;).
4172 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
4173 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
4174 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4175 # action-tokens. The provided site keys need to be created from
4176 # reCAPTCHA API under the same project where the security policy is
4177 # created.
4178 &quot;A String&quot;,
4179 ],
4180 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4181 # session-tokens. The provided site keys need to be created from
4182 # reCAPTCHA API under the same project where the security policy is
4183 # created.
4184 &quot;A String&quot;,
4185 ],
4186 },
4187 },
4188 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
4189 # If this field is specified, config must also be specified.
4190 # Available preconfigured expressions along with their requirements are:
4191 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
4192 # config.
4193 },
4194 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
4195 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
4196 # &#x27;action&#x27; is enforced.
4197 #
4198 # The match criteria for a rule consists of built-in match fields (like
4199 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
4200 # (&#x27;userDefinedFields&#x27;).
4201 #
4202 # Field values may be extracted directly from the packet or derived from it
4203 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
4204 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
4205 # header is found in the packet and the entire field is in bounds.
4206 #
4207 # Each match field may specify which values can match it, listing one or
4208 # more ranges, prefixes, or exact values that are considered a match for
4209 # the field. A field value must be present in order to match a specified
4210 # match field. If no match values are specified for a match field, then any
4211 # field value is considered to match it, and it&#x27;s not required to be
4212 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
4213 #
4214 # For a packet to match a rule, all specified match fields must match the
4215 # corresponding field values derived from the packet.
4216 #
4217 # Example:
4218 #
4219 # networkMatch:
4220 # srcIpRanges:
4221 # - &quot;192.0.2.0/24&quot;
4222 # - &quot;198.51.100.0/24&quot;
4223 # userDefinedFields:
4224 # - name: &quot;ipv4_fragment_offset&quot;
4225 # values:
4226 # - &quot;1-0x1fff&quot;
4227 #
4228 # The above match condition matches packets with a source IP in
4229 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
4230 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
4231 # against.
4232 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
4233 # format.
4234 &quot;A String&quot;,
4235 ],
4236 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4237 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4238 &quot;A String&quot;,
4239 ],
4240 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
4241 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
4242 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
4243 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
4244 &quot;A String&quot;,
4245 ],
4246 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
4247 42,
4248 ],
4249 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
4250 &quot;A String&quot;,
4251 ],
4252 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4253 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4254 &quot;A String&quot;,
4255 ],
4256 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
4257 # IP address.
4258 &quot;A String&quot;,
4259 ],
4260 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
4261 # matching values for that field.
4262 {
4263 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
4264 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
4265 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
4266 # range (e.g. &quot;0x400-0x7ff&quot;).
4267 &quot;A String&quot;,
4268 ],
4269 },
4270 ],
4271 },
4272 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
4273 # does not evaluate preconfigured WAF rules, i.e., if
4274 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
4275 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
4276 {
4277 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
4278 # inspection during preconfigured WAF evaluation.
4279 {
4280 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4281 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4282 },
4283 ],
4284 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
4285 # inspection during preconfigured WAF evaluation.
4286 {
4287 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4288 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4289 },
4290 ],
4291 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
4292 # from inspection during preconfigured WAF evaluation. Note that the
4293 # parameter can be in the query string or in the POST body.
4294 {
4295 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4296 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4297 },
4298 ],
4299 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
4300 # inspection during preconfigured WAF evaluation. When specifying this
4301 # field, the query or fragment part should be excluded.
4302 {
4303 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4304 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4305 },
4306 ],
4307 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
4308 # preconfigured WAF exclusion. If omitted, it refers to all the rule
4309 # IDs under the WAF rule set.
4310 &quot;A String&quot;,
4311 ],
4312 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
4313 },
4314 ],
4315 },
4316 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
4317 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
4318 # must be a positive value between 0 and 2147483647.
4319 # Rules are evaluated from highest to lowest priority where 0 is the
4320 # highest priority and 2147483647 is the lowest priority.
4321 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
4322 # &quot;fairshare&quot;. Cannot be specified for any other actions.
4323 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
4324 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
4325 # the traffic will continue to be banned by the rate limit after the
4326 # rate falls below the threshold.
4327 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
4328 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
4329 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
4330 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
4331 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
4332 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
4333 },
4334 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
4335 # threshold. Valid option is &quot;allow&quot; only.
4336 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4337 # values are:
4338 #
4339 # - ALL: A single rate limit threshold is applied to all
4340 # the requests matching this rule. This is the default value if
4341 # &quot;enforceOnKey&quot; is not configured.
4342 # - IP: The source IP address of
4343 # the request is the key. Each IP has this limit enforced
4344 # separately.
4345 # - HTTP_HEADER: The value of the HTTP
4346 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4347 # value is truncated to the first 128 bytes of the header value. If no
4348 # such header is present in the request, the key type defaults toALL.
4349 # - XFF_IP: The first IP address (i.e. the
4350 # originating client IP address) specified in the list of IPs under
4351 # X-Forwarded-For HTTP header. If no such header is present or the value
4352 # is not a valid IP, the key defaults to the source IP address of
4353 # the request i.e. key type IP.
4354 # - HTTP_COOKIE: The value of the HTTP
4355 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4356 # value is truncated to the first 128 bytes of the cookie value. If no
4357 # such cookie is present in the request, the key type defaults toALL.
4358 # - HTTP_PATH: The URL path of the HTTP request. The key
4359 # value is truncated to the first 128 bytes.
4360 # - SNI: Server name indication in the TLS session of the
4361 # HTTPS request. The key value is truncated to the first 128 bytes. The
4362 # key type defaults to ALL on a HTTP session.
4363 # - REGION_CODE: The country/region from which the request
4364 # originates.
4365 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4366 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4367 # key type defaults to ALL.
4368 # - USER_IP: The IP address of the originating client,
4369 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4370 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
4371 # an IP address cannot be resolved from it, the key type defaults toIP.
4372 #
4373 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4374 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4375 # key type defaults to ALL.
4376 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
4377 # limit threshold is enforced for all the requests matching the rule.
4378 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
4379 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
4380 # ratelimit threshold/action is enforced. You can specify up to 3
4381 # enforce_on_key_configs. If enforce_on_key_configs is specified,
4382 # enforce_on_key must not be specified.
4383 {
4384 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4385 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
4386 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
4387 # taken as the key value.
4388 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4389 # values are:
4390 #
4391 # - ALL: A single rate limit threshold is applied to all
4392 # the requests matching this rule. This is the default value if
4393 # &quot;enforceOnKeyConfigs&quot; is not configured.
4394 # - IP: The source IP address of
4395 # the request is the key. Each IP has this limit enforced
4396 # separately.
4397 # - HTTP_HEADER: The value of the HTTP
4398 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4399 # value is truncated to the first 128 bytes of the header value. If no
4400 # such header is present in the request, the key type defaults toALL.
4401 # - XFF_IP: The first IP address (i.e. the
4402 # originating client IP address) specified in the list of IPs under
4403 # X-Forwarded-For HTTP header. If no such header is present or the
4404 # value is not a valid IP, the key defaults to the source IP address of
4405 # the request i.e. key type IP.
4406 # - HTTP_COOKIE: The value of the HTTP
4407 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4408 # value is truncated to the first 128 bytes of the cookie value. If no
4409 # such cookie is present in the request, the key type defaults toALL.
4410 # - HTTP_PATH: The URL path of the HTTP request. The key
4411 # value is truncated to the first 128 bytes.
4412 # - SNI: Server name indication in the TLS session of
4413 # the HTTPS request. The key value is truncated to the first 128 bytes.
4414 # The key type defaults to ALL on a HTTP session.
4415 # - REGION_CODE: The country/region from which the
4416 # request originates.
4417 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4418 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4419 # key type defaults to ALL.
4420 # - USER_IP: The IP address of the originating client,
4421 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4422 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
4423 # or an IP address cannot be resolved from it, the key type defaults toIP.
4424 #
4425 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4426 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4427 # key type defaults to ALL.
4428 },
4429 ],
4430 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4431 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
4432 # value.
4433 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
4434 # value.
4435 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
4436 # threshold, to either deny with a specified HTTP response code, or
4437 # redirect to a different endpoint.
4438 # Valid options are `deny(STATUS)`, where valid values for
4439 # `STATUS` are 403, 404, 429, and 502, and
4440 # `redirect`, where the redirect parameters come from
4441 # `exceedRedirectOptions` below.
4442 # The `redirect` action is only supported in Global Security Policies of
4443 # type CLOUD_ARMOR.
4444 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
4445 # action. Cannot be specified if the exceed action is not redirect.
4446 # This field is only supported in Global Security Policies of type
4447 # CLOUD_ARMOR.
4448 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
4449 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
4450 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
4451 #
4452 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
4453 # challenge assessment.
4454 # - EXTERNAL_302: redirect to a different URL via a 302
4455 # response.
4456 },
4457 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
4458 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
4459 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
4460 },
4461 },
4462 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
4463 # other actions.
4464 # This field is only supported in Global Security Policies of type
4465 # CLOUD_ARMOR.
4466 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
4467 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
4468 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
4469 #
4470 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
4471 # challenge assessment.
4472 # - EXTERNAL_302: redirect to a different URL via a 302
4473 # response.
4474 },
4475 },
4476 ],
4477 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
4478 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
4479 # unique in the organization in which the security policy is created. This
4480 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
4481 # The name must be 1-63 characters long, and comply with
4482 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
4483 # characters long and match the regular expression
4484 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
4485 # lowercase letter, and all following characters must be a dash, lowercase
4486 # letter, or digit, except the last character, which cannot be a dash.
4487 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
4488 #
4489 # - CLOUD_ARMOR: Cloud Armor backend security policies can
4490 # be configured to filter incoming HTTP requests targeting backend services.
4491 # They filter requests before they hit the origin servers.
4492 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
4493 # be configured to filter incoming HTTP requests targeting backend services
4494 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
4495 # They filter requests before the request is served from Google&#x27;s cache.
4496 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
4497 # internal service policies can be configured to filter HTTP requests
4498 # targeting services managed by Traffic Director in a service mesh. They
4499 # filter requests before the request is served from the application.
4500 #
4501 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
4502 # can be configured to filter packets targeting network load balancing
4503 # resources such as backend services, target pools, target instances, and
4504 # instances with external IPs. They filter requests before the request is
4505 # served from the application.
4506 #
4507 #
4508 # This field can be set only at resource creation time.
4509 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
4510 # user-defined field consists of up to 4 bytes extracted from a fixed offset
4511 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
4512 # optional mask to select certain bits. Rules may then specify matching
4513 # values for these fields.
4514 #
4515 # Example:
4516 #
4517 # userDefinedFields:
4518 # - name: &quot;ipv4_fragment_offset&quot;
4519 # base: IPV4
4520 # offset: 6
4521 # size: 2
4522 # mask: &quot;0x1fff&quot;
4523 {
4524 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
4525 #
4526 # - IPV4: Points to the beginning of the IPv4 header.
4527 # - IPV6: Points to the beginning of the IPv6 header.
4528 # - TCP: Points to the beginning of the TCP header, skipping
4529 # over any IPv4 options or IPv6 extension headers. Not present for
4530 # non-first fragments.
4531 # - UDP: Points to the beginning of the UDP header, skipping
4532 # over any IPv4 options or IPv6 extension headers. Not present for
4533 # non-first fragments.
4534 #
4535 #
4536 # required
4537 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
4538 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
4539 # The last byte of the field (in network byte order) corresponds to the
4540 # least significant byte of the mask.
4541 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
4542 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
4543 # &#x27;base&#x27;.
4544 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
4545 },
4546 ],
4547 },
4548 ],
4549 &quot;kind&quot;: &quot;compute#securityPolicyList&quot;, # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyList for listsof securityPolicies
4550 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
4551 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
4552 # the query parameter pageToken in the next list request.
4553 # Subsequent list requests will have their own nextPageToken to
4554 # continue paging through the results.
4555 &quot;warning&quot;: { # [Output Only] Informational warning message.
4556 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
4557 # Engine returns NO_RESULTS_ON_PAGE if there
4558 # are no results in the response.
4559 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
4560 # value format. For example:
4561 #
4562 # &quot;data&quot;: [
4563 # {
4564 # &quot;key&quot;: &quot;scope&quot;,
4565 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
4566 # }
4567 {
4568 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
4569 # returned. For example, for warnings where there are no results in a list
4570 # request for a particular zone, this key might be scope and
4571 # the key value might be the zone name. Other examples might be a key
4572 # indicating a deprecated resource and a suggested replacement, or a
4573 # warning about invalid network settings (for example, if an instance
4574 # attempts to perform IP forwarding but is not enabled for IP forwarding).
4575 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4576 },
4577 ],
4578 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4579 },
4580 }</pre>
4581 </div>
4582
4583 <div class="method">
4584 <code class="details" id="listAssociations">listAssociations(targetResource=None, x__xgafv=None)</code>
4585 <pre>Lists associations of a specified target, i.e., organization or folder.
4586
4587 Use this API to read Cloud Armor policies. Previously, alpha and beta
4588 versions of this API were used to read firewall policies. This usage is
4589 now disabled for most organizations. Use firewallPolicies.listAssociations
4590 instead.
4591
4592 Args:
4593 targetResource: string, The target resource to list associations. It is an organization, or a
4594 folder.
4595 x__xgafv: string, V1 error format.
4596 Allowed values
4597 1 - v1 error format
4598 2 - v2 error format
4599
4600 Returns:
4601 An object of the form:
4602
4603 {
4604 &quot;associations&quot;: [ # A list of associations.
4605 {
4606 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
4607 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
4608 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
4609 &quot;A String&quot;,
4610 ],
4611 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
4612 &quot;A String&quot;,
4613 ],
4614 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
4615 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
4616 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
4617 },
4618 ],
4619 &quot;kind&quot;: &quot;compute#organizationSecurityPoliciesListAssociationsResponse&quot;, # Output only. [Output Only] Type of securityPolicy associations. Alwayscompute#organizationSecurityPoliciesListAssociations for lists
4620 # of securityPolicy associations.
4621 }</pre>
4622 </div>
4623
4624 <div class="method">
4625 <code class="details" id="listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
4626 <pre>Gets the current list of preconfigured Web Application Firewall (WAF)
4627 expressions.
4628
4629 Args:
4630 filter: string, A filter expression that filters resources listed in the response. Most
4631 Compute resources support two types of filter expressions:
4632 expressions that support regular expressions and expressions that follow
4633 API improvement proposal AIP-160.
4634 These two types of filter expressions cannot be mixed in one request.
4635
4636 If you want to use AIP-160, your expression must specify the field name, an
4637 operator, and the value that you want to use for filtering. The value
4638 must be a string, a number, or a boolean. The operator
4639 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
4640
4641 For example, if you are filtering Compute Engine instances, you can
4642 exclude instances named `example-instance` by specifying
4643 `name != example-instance`.
4644
4645 The `:*` comparison can be used to test whether a key has been defined.
4646 For example, to find all objects with `owner` label use:
4647 ```
4648 labels.owner:*
4649 ```
4650
4651 You can also filter nested fields. For example, you could specify
4652 `scheduling.automaticRestart = false` to include instances only
4653 if they are not scheduled for automatic restarts. You can use filtering
4654 on nested fields to filter based onresource labels.
4655
4656 To filter on multiple expressions, provide each separate expression within
4657 parentheses. For example:
4658 ```
4659 (scheduling.automaticRestart = true)
4660 (cpuPlatform = &quot;Intel Skylake&quot;)
4661 ```
4662 By default, each expression is an `AND` expression. However, you
4663 can include `AND` and `OR` expressions explicitly.
4664 For example:
4665 ```
4666 (cpuPlatform = &quot;Intel Skylake&quot;) OR
4667 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
4668 (scheduling.automaticRestart = true)
4669 ```
4670
4671 If you want to use a regular expression, use the `eq` (equal) or `ne`
4672 (not equal) operator against a single un-parenthesized expression with or
4673 without quotes or against multiple parenthesized expressions. Examples:
4674
4675 `fieldname eq unquoted literal`
4676 `fieldname eq &#x27;single quoted literal&#x27;`
4677 `fieldname eq &quot;double quoted literal&quot;`
4678 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
4679
4680 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
4681 The literal value must match the entire field.
4682
4683 For example, to filter for instances that do not end with name &quot;instance&quot;,
4684 you would use `name ne .*instance`.
4685
4686 You cannot combine constraints on multiple fields using regular
4687 expressions.
4688 maxResults: integer, The maximum number of results per page that should be returned.
4689 If the number of available results is larger than `maxResults`,
4690 Compute Engine returns a `nextPageToken` that can be used to get
4691 the next page of results in subsequent list requests. Acceptable values are
4692 `0` to `500`, inclusive. (Default: `500`)
4693 orderBy: string, Sorts list results by a certain order. By default, results
4694 are returned in alphanumerical order based on the resource name.
4695
4696 You can also sort results in descending order based on the creation
4697 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
4698 results based on the `creationTimestamp` field in
4699 reverse chronological order (newest result first). Use this to sort
4700 resources like operations so that the newest operation is returned first.
4701
4702 Currently, only sorting by `name` or
4703 `creationTimestamp desc` is supported.
4704 pageToken: string, Specifies a page token to use. Set `pageToken` to the
4705 `nextPageToken` returned by a previous list request to get
4706 the next page of results.
4707 parentId: string, Parent ID for this request.
4708 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
4709 of failure. The default value is false.
4710
4711 For example, when partial success behavior is enabled, aggregatedList for a
4712 single zone scope either returns all resources in the zone or no resources,
4713 with an error code.
4714 x__xgafv: string, V1 error format.
4715 Allowed values
4716 1 - v1 error format
4717 2 - v2 error format
4718
4719 Returns:
4720 An object of the form:
4721
4722 {
4723 &quot;preconfiguredExpressionSets&quot;: {
4724 &quot;wafRules&quot;: {
4725 &quot;expressionSets&quot;: [ # List of entities that are currently supported for WAF rules.
4726 {
4727 &quot;aliases&quot;: [ # A list of alternate IDs. The format should be:
4728 # - E.g. XSS-stable
4729 # Generic suffix like &quot;stable&quot; is particularly useful if a policy
4730 # likes to avail newer set of expressions without having to change
4731 # the policy.
4732 # A given alias name can&#x27;t be used for more than one entity set.
4733 &quot;A String&quot;,
4734 ],
4735 &quot;expressions&quot;: [ # List of available expressions.
4736 {
4737 &quot;id&quot;: &quot;A String&quot;, # Expression ID should uniquely identify the origin of the expression.
4738 # E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
4739 # version 2.9.1 rule id 973337.
4740 # The ID could be used to determine the individual attack definition
4741 # that has been detected. It could also be used to exclude it from
4742 # the policy in case of false positive.
4743 # required
4744 &quot;sensitivity&quot;: 42, # The sensitivity value associated with the WAF rule ID. This corresponds
4745 # to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
4746 # opt-in only rules.
4747 },
4748 ],
4749 &quot;id&quot;: &quot;A String&quot;, # Google specified expression set ID. The format should be:
4750 # - E.g. XSS-20170329
4751 # required
4752 },
4753 ],
4754 },
4755 },
4756 }</pre>
4757 </div>
4758
4759 <div class="method">
4760 <code class="details" id="list_next">list_next()</code>
4761 <pre>Retrieves the next page of results.
4762
4763 Args:
4764 previous_request: The request for the previous page. (required)
4765 previous_response: The response from the request for the previous page. (required)
4766
4767 Returns:
4768 A request object that you can call &#x27;execute()&#x27; on to request the next
4769 page. Returns None if there are no more items in the collection.
4770 </pre>
4771 </div>
4772
4773 <div class="method">
4774 <code class="details" id="move">move(securityPolicy, parentId=None, requestId=None, x__xgafv=None)</code>
4775 <pre>Moves the specified security policy.
4776
4777 Use this API to modify Cloud Armor policies. Previously, alpha and beta
4778 versions of this API were used to modify firewall policies. This usage is
4779 now disabled for most organizations. Use firewallPolicies.move instead.
4780
4781 Args:
4782 securityPolicy: string, Name of the security policy to update. (required)
4783 parentId: string, The new parent of the security policy.
4784 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
4785 that if you must retry your request, the server will know to ignore the
4786 request if it has already been completed.
4787
4788 For example, consider a situation where you make an initial request and
4789 the request times out. If you make the request again with the same
4790 request ID, the server can check if original operation with the same
4791 request ID was received, and if so, will ignore the second request. This
4792 prevents clients from accidentally creating duplicate commitments.
4793
4794 The request ID must be
4795 a valid UUID with the exception that zero UUID is not supported
4796 (00000000-0000-0000-0000-000000000000).
4797 x__xgafv: string, V1 error format.
4798 Allowed values
4799 1 - v1 error format
4800 2 - v2 error format
4801
4802 Returns:
4803 An object of the form:
4804
4805 { # Represents an Operation resource.
4806 #
4807 # Google Compute Engine has three Operation resources:
4808 #
4809 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
4810 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
4811 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
4812 #
4813 # You can use an operation resource to manage asynchronous API requests.
4814 # For more information, readHandling
4815 # API responses.
4816 #
4817 # Operations can be global, regional or zonal.
4818 #
4819 # - For global operations, use the `globalOperations`
4820 # resource.
4821 # - For regional operations, use the
4822 # `regionOperations` resource.
4823 # - For zonal operations, use
4824 # the `zoneOperations` resource.
4825 #
4826 #
4827 #
4828 # For more information, read
4829 # Global, Regional, and Zonal Resources.
4830 #
4831 # Note that completed Operation resources have a limited
4832 # retention period.
4833 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
4834 # Not present otherwise.
4835 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4836 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
4837 # set when the operation is created.
4838 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
4839 # text format.
4840 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
4841 # this field will be populated.
4842 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
4843 # operation.
4844 {
4845 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4846 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
4847 # details. There is a set of defined message types to use for providing
4848 # details.The syntax depends on the error code. For example,
4849 # QuotaExceededInfo will have details when the error code is
4850 # QUOTA_EXCEEDED.
4851 {
4852 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
4853 #
4854 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
4855 # is not enabled:
4856 #
4857 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
4858 # &quot;domain&quot;: &quot;googleapis.com&quot;
4859 # &quot;metadata&quot;: {
4860 # &quot;resource&quot;: &quot;projects/123&quot;,
4861 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
4862 # }
4863 # }
4864 #
4865 # This response indicates that the pubsub.googleapis.com API is not enabled.
4866 #
4867 # Example of an error that is returned when attempting to create a Spanner
4868 # instance in a region that is out of stock:
4869 #
4870 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
4871 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
4872 # &quot;metadata&quot;: {
4873 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
4874 # }
4875 # }
4876 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
4877 # is typically the registered service name of the tool or product that
4878 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
4879 # generated by some common infrastructure, the error domain must be a
4880 # globally unique value that identifies the infrastructure. For Google API
4881 # infrastructure, the error domain is &quot;googleapis.com&quot;.
4882 &quot;metadatas&quot;: { # Additional structured details about this error.
4883 #
4884 # Keys must match a regular expression of `a-z+` but should
4885 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
4886 # length. When identifying the current value of an exceeded limit, the units
4887 # should be contained in the key, not the value. For example, rather than
4888 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
4889 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
4890 # instances that can be created in a single (batch) request.
4891 &quot;a_key&quot;: &quot;A String&quot;,
4892 },
4893 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
4894 # proximate cause of the error. Error reasons are unique within a particular
4895 # domain of errors. This should be at most 63 characters and match a
4896 # regular expression of `A-Z+[A-Z0-9]`, which represents
4897 # UPPER_SNAKE_CASE.
4898 },
4899 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
4900 #
4901 # For example, if a quota check failed with an error indicating the calling
4902 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
4903 # directly to the right place in the developer console to flip the bit.
4904 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
4905 { # Describes a URL link.
4906 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
4907 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
4908 },
4909 ],
4910 },
4911 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
4912 # which can be attached to an RPC error.
4913 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
4914 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
4915 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
4916 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
4917 },
4918 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
4919 &quot;dimensions&quot;: { # The map holding related quota dimensions.
4920 &quot;a_key&quot;: &quot;A String&quot;,
4921 },
4922 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
4923 # type or metric.
4924 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
4925 # or metric.
4926 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
4927 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
4928 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
4929 },
4930 },
4931 ],
4932 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
4933 # This property is optional.
4934 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4935 },
4936 ],
4937 },
4938 &quot;getVersionOperationMetadata&quot;: {
4939 &quot;inlineSbomInfo&quot;: {
4940 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
4941 # appropriate identifiers.
4942 &quot;a_key&quot;: &quot;A String&quot;,
4943 },
4944 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
4945 # identifiers.
4946 &quot;a_key&quot;: &quot;A String&quot;,
4947 },
4948 },
4949 },
4950 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
4951 # message that was returned, such as `NOT FOUND`.
4952 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
4953 # status code that was returned. For example, a `404` means the
4954 # resource was not found.
4955 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
4956 # defined by the server.
4957 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
4958 # This value is inRFC3339
4959 # text format.
4960 &quot;instancesBulkInsertOperationMetadata&quot;: {
4961 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
4962 # Example key: zones/us-central1-a
4963 &quot;a_key&quot;: {
4964 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
4965 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
4966 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
4967 # error.
4968 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
4969 # if the flow is rolling forward or rolling back.
4970 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
4971 },
4972 },
4973 },
4974 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
4975 # Operation resources.
4976 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4977 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
4978 # group of operations results from a `bulkInsert` API request.
4979 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
4980 # `update`, or `delete`, and so on.
4981 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
4982 # There is no requirement that this be linear or support any granularity of
4983 # operations. This should not be used to guess when the operation will be
4984 # complete. This number should monotonically increase as the operation
4985 # progresses.
4986 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
4987 # applicable when performing regional operations.
4988 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4989 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
4990 # this field will contain information on all underlying zonal actions and
4991 # their state.
4992 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
4993 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
4994 # Example key: zones/us-central1-a
4995 &quot;a_key&quot;: {
4996 &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
4997 # populated.
4998 # different programming environments, including REST APIs and RPC APIs. It is
4999 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
5000 # three pieces of data: error code, error message, and error details.
5001 #
5002 # You can find out more about this error model and how to work with it in the
5003 # [API Design Guide](https://cloud.google.com/apis/design/errors).
5004 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
5005 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
5006 # message types for APIs to use.
5007 {
5008 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
5009 },
5010 ],
5011 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
5012 # user-facing error message should be localized and sent in the
5013 # google.rpc.Status.details field, or localized by the client.
5014 },
5015 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
5016 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
5017 },
5018 },
5019 },
5020 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
5021 # This value is inRFC3339
5022 # text format.
5023 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
5024 # following:
5025 # `PENDING`, `RUNNING`, or `DONE`.
5026 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
5027 # operation.
5028 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
5029 # of the target resource.
5030 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
5031 # operations related to creating a snapshot, this points to the disk
5032 # that the snapshot was created from.
5033 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
5034 # `[email protected]` or
5035 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
5036 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
5037 # operation, this field will be populated.
5038 {
5039 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
5040 # Engine returns NO_RESULTS_ON_PAGE if there
5041 # are no results in the response.
5042 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
5043 # value format. For example:
5044 #
5045 # &quot;data&quot;: [
5046 # {
5047 # &quot;key&quot;: &quot;scope&quot;,
5048 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
5049 # }
5050 {
5051 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
5052 # returned. For example, for warnings where there are no results in a list
5053 # request for a particular zone, this key might be scope and
5054 # the key value might be the zone name. Other examples might be a key
5055 # indicating a deprecated resource and a suggested replacement, or a
5056 # warning about invalid network settings (for example, if an instance
5057 # attempts to perform IP forwarding but is not enabled for IP forwarding).
5058 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5059 },
5060 ],
5061 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5062 },
5063 ],
5064 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
5065 # applicable when performing per-zone operations.
5066 }</pre>
5067 </div>
5068
5069 <div class="method">
5070 <code class="details" id="patch">patch(securityPolicy, body=None, requestId=None, x__xgafv=None)</code>
5071 <pre>Patches the specified policy with the data included in the request.
5072
5073 Use this API to modify Cloud Armor policies. Previously, alpha and beta
5074 versions of this API were used to modify firewall policies. This usage is
5075 now disabled for most organizations. Use firewallPolicies.patch instead.
5076
5077 Args:
5078 securityPolicy: string, Name of the security policy to update. (required)
5079 body: object, The request body.
5080 The object takes the form of:
5081
5082 { # Represents a Google Cloud Armor security policy resource.
5083 #
5084 # Only external backend services that use load balancers can
5085 # reference a security policy. For more information, see
5086 # Google Cloud Armor security policy overview.
5087 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
5088 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
5089 # This field is only supported in Global Security Policies of type
5090 # CLOUD_ARMOR.
5091 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
5092 # This field is only supported in Global Security Policies of type
5093 # CLOUD_ARMOR.
5094 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
5095 # STANDARD - opaque rules. (default)
5096 # PREMIUM - transparent rules.
5097 # This field is only supported in Global Security Policies of type
5098 # CLOUD_ARMOR.
5099 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
5100 # customizable thresholds.
5101 {
5102 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
5103 &quot;autoDeployExpirationSec&quot;: 42,
5104 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
5105 &quot;autoDeployLoadThreshold&quot;: 3.14,
5106 &quot;detectionAbsoluteQps&quot;: 3.14,
5107 &quot;detectionLoadThreshold&quot;: 3.14,
5108 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
5109 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
5110 # The name must be unique within the security policy.
5111 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
5112 # on specified granular traffic units.
5113 { # Configurations to specifc granular traffic units processed by
5114 # Adaptive Protection.
5115 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
5116 # type constitutes a separate traffic unit.
5117 # It can only be set to true if `value` is empty.
5118 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
5119 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
5120 },
5121 ],
5122 },
5123 ],
5124 },
5125 },
5126 &quot;advancedOptionsConfig&quot;: {
5127 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
5128 # json_parsing is set to STANDARD.
5129 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
5130 #
5131 # As per RFC 1341, a Content-Type header value has the following format:
5132 #
5133 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
5134 #
5135 # When configuring a custom Content-Type header value, only the
5136 # type/subtype needs to be specified, and the parameters should be
5137 # excluded.
5138 &quot;A String&quot;,
5139 ],
5140 },
5141 &quot;jsonParsing&quot;: &quot;A String&quot;,
5142 &quot;logLevel&quot;: &quot;A String&quot;,
5143 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
5144 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
5145 # Values are case insensitive.
5146 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
5147 # resolving the callers client IP address.
5148 &quot;A String&quot;,
5149 ],
5150 },
5151 &quot;associations&quot;: [ # A list of associations that belong to this policy.
5152 {
5153 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
5154 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
5155 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
5156 &quot;A String&quot;,
5157 ],
5158 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
5159 &quot;A String&quot;,
5160 ],
5161 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
5162 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
5163 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
5164 },
5165 ],
5166 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
5167 # text format.
5168 &quot;ddosProtectionConfig&quot;: {
5169 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
5170 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
5171 # builds DDoS mitigations that minimize collateral damage. It quantifies
5172 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
5173 # blocked.
5174 #
5175 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
5176 # not be deployed. Using a lower value will prioritize keeping collateral
5177 # damage low, possibly at the cost of its effectiveness in rate limiting
5178 # some or all of the attack. It should typically be unset, so Advanced DDoS
5179 # (and Adaptive Protection) uses the best mitigation it can find. Setting
5180 # the threshold is advised if there are logs for false positive detections
5181 # with high collateral damage, and will cause Advanced DDoS to attempt to
5182 # find a less aggressive rule that satisfies the constraint. If a suitable
5183 # rule cannot be found, the system falls back to either no mitigation for
5184 # smaller attacks or broader network throttles for larger ones.
5185 &quot;ddosProtection&quot;: &quot;A String&quot;,
5186 },
5187 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5188 # create the resource.
5189 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
5190 # the metadata&#x27;s contents and used for optimistic locking. The
5191 # fingerprint is initially generated by Compute Engine and changes after
5192 # every request to modify or update metadata. You must always provide an
5193 # up-to-date fingerprint hash in order to update or change metadata,
5194 # otherwise the request will fail with error412 conditionNotMet.
5195 #
5196 # To see the latest fingerprint, make get() request to the
5197 # security policy.
5198 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
5199 # defined by the server.
5200 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
5201 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
5202 # is essentially a hash of the labels set used for optimistic locking. The
5203 # fingerprint is initially generated by Compute Engine and changes after
5204 # every request to modify or update labels. You must always provide an
5205 # up-to-date fingerprint hash in order to update or change labels.
5206 #
5207 # To see the latest fingerprint, make get() request to the
5208 # security policy.
5209 &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.
5210 # Label values may be empty.
5211 &quot;a_key&quot;: &quot;A String&quot;,
5212 },
5213 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
5214 # The name must be 1-63 characters long, and comply withRFC1035.
5215 # Specifically, the name must be 1-63 characters long and match the regular
5216 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
5217 # character must be a lowercase letter, and all following characters must
5218 # be a dash, lowercase letter, or digit, except the last character, which
5219 # cannot be a dash.
5220 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
5221 &quot;recaptchaOptionsConfig&quot;: {
5222 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
5223 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
5224 # the security policy. The specified site key needs to be created from the
5225 # reCAPTCHA API. The user is responsible for the validity of the specified
5226 # site key. If not specified, a Google-managed site key is used.
5227 # This field is only supported in Global Security Policies of type
5228 # CLOUD_ARMOR.
5229 },
5230 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
5231 # resides. This field is not applicable to global security policies.
5232 &quot;rules&quot;: [ # A list of rules that belong to this policy.
5233 # There must always be a default rule which is a rule with priority
5234 # 2147483647 and match all condition (for the match condition this means
5235 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
5236 # must be either match &quot;*&quot; or not set). If no rules are provided when
5237 # creating a security policy, a default rule with action &quot;allow&quot; will be
5238 # added.
5239 { # Represents a rule that describes one or more match conditions along with
5240 # the action to be taken when traffic matches this condition (allow or deny).
5241 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
5242 # The following are the valid actions:
5243 #
5244 # - allow: allow access to target.
5245 # - deny(STATUS): deny access to target, returns the
5246 # HTTP response code specified. Valid values for `STATUS`
5247 # are 403, 404, and 502.
5248 # - rate_based_ban: limit client traffic to the configured
5249 # threshold and ban the client if the traffic exceeds the threshold.
5250 # Configure parameters for this action in RateLimitOptions. Requires
5251 # rate_limit_options to be set.
5252 # - redirect: redirect to a different target. This can
5253 # either be an internal reCAPTCHA redirect, or an external URL-based
5254 # redirect via a 302 response. Parameters for this action can be configured
5255 # via redirectOptions. This action is only supported in Global Security
5256 # Policies of type CLOUD_ARMOR.
5257 # - throttle: limit
5258 # client traffic to the configured threshold. Configure parameters for this
5259 # action in rateLimitOptions. Requires rate_limit_options to be set for
5260 # this.
5261 # - fairshare (preview only): when traffic reaches the
5262 # threshold limit, requests from the clients matching this rule begin to be
5263 # rate-limited using the Fair Share algorithm. This action is only allowed
5264 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
5265 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5266 # create the resource.
5267 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
5268 # This field is only supported in Global Security Policies of type
5269 # CLOUD_ARMOR.
5270 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
5271 # present.
5272 {
5273 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
5274 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
5275 },
5276 ],
5277 },
5278 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
5279 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
5280 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
5281 # Exactly one field must be specified.
5282 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
5283 # This field must be specified if versioned_expr is specified and cannot
5284 # be specified if versioned_expr is not specified.
5285 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
5286 # Maximum number of src_ip_ranges allowed is 10.
5287 &quot;A String&quot;,
5288 ],
5289 },
5290 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
5291 # A CEVAL expression is used to specify match criteria such as origin.ip,
5292 # source.region_code and contents in the request header.
5293 # Expressions containing `evaluateThreatIntelligence` require a Cloud
5294 # Armor Enterprise subscription and are not supported in Edge Policies
5295 # nor in Regional Policies. Expressions containing
5296 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
5297 # Enterprise subscription and are only supported in Global Security
5298 # Policies.
5299 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
5300 # are documented at https://github.com/google/cel-spec.
5301 #
5302 # Example (Comparison):
5303 #
5304 # title: &quot;Summary size limit&quot;
5305 # description: &quot;Determines if a summary is less than 100 chars&quot;
5306 # expression: &quot;document.summary.size() &lt; 100&quot;
5307 #
5308 # Example (Equality):
5309 #
5310 # title: &quot;Requestor is owner&quot;
5311 # description: &quot;Determines if requestor is the document owner&quot;
5312 # expression: &quot;document.owner == request.auth.claims.email&quot;
5313 #
5314 # Example (Logic):
5315 #
5316 # title: &quot;Public documents&quot;
5317 # description: &quot;Determine whether the document should be publicly visible&quot;
5318 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
5319 #
5320 # Example (Data Manipulation):
5321 #
5322 # title: &quot;Notification string&quot;
5323 # description: &quot;Create a notification string with a timestamp.&quot;
5324 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
5325 #
5326 # The exact variables and functions that may be referenced within an expression
5327 # are determined by the service that evaluates it. See the service
5328 # documentation for additional information.
5329 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
5330 # describes the expression, e.g. when hovered over it in a UI.
5331 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
5332 # syntax.
5333 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
5334 # reporting, e.g. a file name and a position in the file.
5335 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
5336 # its purpose. This can be used e.g. in UIs which allow to enter the
5337 # expression.
5338 },
5339 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
5340 # CEVAL expression (i.e., &#x27;expr&#x27;).
5341 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
5342 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
5343 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5344 # action-tokens. The provided site keys need to be created from
5345 # reCAPTCHA API under the same project where the security policy is
5346 # created.
5347 &quot;A String&quot;,
5348 ],
5349 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5350 # session-tokens. The provided site keys need to be created from
5351 # reCAPTCHA API under the same project where the security policy is
5352 # created.
5353 &quot;A String&quot;,
5354 ],
5355 },
5356 },
5357 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
5358 # If this field is specified, config must also be specified.
5359 # Available preconfigured expressions along with their requirements are:
5360 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
5361 # config.
5362 },
5363 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
5364 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
5365 # &#x27;action&#x27; is enforced.
5366 #
5367 # The match criteria for a rule consists of built-in match fields (like
5368 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
5369 # (&#x27;userDefinedFields&#x27;).
5370 #
5371 # Field values may be extracted directly from the packet or derived from it
5372 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
5373 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
5374 # header is found in the packet and the entire field is in bounds.
5375 #
5376 # Each match field may specify which values can match it, listing one or
5377 # more ranges, prefixes, or exact values that are considered a match for
5378 # the field. A field value must be present in order to match a specified
5379 # match field. If no match values are specified for a match field, then any
5380 # field value is considered to match it, and it&#x27;s not required to be
5381 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
5382 #
5383 # For a packet to match a rule, all specified match fields must match the
5384 # corresponding field values derived from the packet.
5385 #
5386 # Example:
5387 #
5388 # networkMatch:
5389 # srcIpRanges:
5390 # - &quot;192.0.2.0/24&quot;
5391 # - &quot;198.51.100.0/24&quot;
5392 # userDefinedFields:
5393 # - name: &quot;ipv4_fragment_offset&quot;
5394 # values:
5395 # - &quot;1-0x1fff&quot;
5396 #
5397 # The above match condition matches packets with a source IP in
5398 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
5399 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
5400 # against.
5401 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
5402 # format.
5403 &quot;A String&quot;,
5404 ],
5405 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5406 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5407 &quot;A String&quot;,
5408 ],
5409 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
5410 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
5411 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
5412 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
5413 &quot;A String&quot;,
5414 ],
5415 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
5416 42,
5417 ],
5418 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
5419 &quot;A String&quot;,
5420 ],
5421 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5422 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5423 &quot;A String&quot;,
5424 ],
5425 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
5426 # IP address.
5427 &quot;A String&quot;,
5428 ],
5429 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
5430 # matching values for that field.
5431 {
5432 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
5433 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
5434 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
5435 # range (e.g. &quot;0x400-0x7ff&quot;).
5436 &quot;A String&quot;,
5437 ],
5438 },
5439 ],
5440 },
5441 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
5442 # does not evaluate preconfigured WAF rules, i.e., if
5443 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
5444 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
5445 {
5446 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
5447 # inspection during preconfigured WAF evaluation.
5448 {
5449 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5450 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5451 },
5452 ],
5453 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
5454 # inspection during preconfigured WAF evaluation.
5455 {
5456 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5457 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5458 },
5459 ],
5460 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
5461 # from inspection during preconfigured WAF evaluation. Note that the
5462 # parameter can be in the query string or in the POST body.
5463 {
5464 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5465 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5466 },
5467 ],
5468 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
5469 # inspection during preconfigured WAF evaluation. When specifying this
5470 # field, the query or fragment part should be excluded.
5471 {
5472 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5473 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5474 },
5475 ],
5476 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
5477 # preconfigured WAF exclusion. If omitted, it refers to all the rule
5478 # IDs under the WAF rule set.
5479 &quot;A String&quot;,
5480 ],
5481 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
5482 },
5483 ],
5484 },
5485 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
5486 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
5487 # must be a positive value between 0 and 2147483647.
5488 # Rules are evaluated from highest to lowest priority where 0 is the
5489 # highest priority and 2147483647 is the lowest priority.
5490 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
5491 # &quot;fairshare&quot;. Cannot be specified for any other actions.
5492 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
5493 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
5494 # the traffic will continue to be banned by the rate limit after the
5495 # rate falls below the threshold.
5496 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
5497 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
5498 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
5499 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
5500 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
5501 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
5502 },
5503 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
5504 # threshold. Valid option is &quot;allow&quot; only.
5505 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
5506 # values are:
5507 #
5508 # - ALL: A single rate limit threshold is applied to all
5509 # the requests matching this rule. This is the default value if
5510 # &quot;enforceOnKey&quot; is not configured.
5511 # - IP: The source IP address of
5512 # the request is the key. Each IP has this limit enforced
5513 # separately.
5514 # - HTTP_HEADER: The value of the HTTP
5515 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
5516 # value is truncated to the first 128 bytes of the header value. If no
5517 # such header is present in the request, the key type defaults toALL.
5518 # - XFF_IP: The first IP address (i.e. the
5519 # originating client IP address) specified in the list of IPs under
5520 # X-Forwarded-For HTTP header. If no such header is present or the value
5521 # is not a valid IP, the key defaults to the source IP address of
5522 # the request i.e. key type IP.
5523 # - HTTP_COOKIE: The value of the HTTP
5524 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
5525 # value is truncated to the first 128 bytes of the cookie value. If no
5526 # such cookie is present in the request, the key type defaults toALL.
5527 # - HTTP_PATH: The URL path of the HTTP request. The key
5528 # value is truncated to the first 128 bytes.
5529 # - SNI: Server name indication in the TLS session of the
5530 # HTTPS request. The key value is truncated to the first 128 bytes. The
5531 # key type defaults to ALL on a HTTP session.
5532 # - REGION_CODE: The country/region from which the request
5533 # originates.
5534 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
5535 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5536 # key type defaults to ALL.
5537 # - USER_IP: The IP address of the originating client,
5538 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
5539 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
5540 # an IP address cannot be resolved from it, the key type defaults toIP.
5541 #
5542 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
5543 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5544 # key type defaults to ALL.
5545 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
5546 # limit threshold is enforced for all the requests matching the rule.
5547 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
5548 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
5549 # ratelimit threshold/action is enforced. You can specify up to 3
5550 # enforce_on_key_configs. If enforce_on_key_configs is specified,
5551 # enforce_on_key must not be specified.
5552 {
5553 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
5554 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
5555 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
5556 # taken as the key value.
5557 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
5558 # values are:
5559 #
5560 # - ALL: A single rate limit threshold is applied to all
5561 # the requests matching this rule. This is the default value if
5562 # &quot;enforceOnKeyConfigs&quot; is not configured.
5563 # - IP: The source IP address of
5564 # the request is the key. Each IP has this limit enforced
5565 # separately.
5566 # - HTTP_HEADER: The value of the HTTP
5567 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
5568 # value is truncated to the first 128 bytes of the header value. If no
5569 # such header is present in the request, the key type defaults toALL.
5570 # - XFF_IP: The first IP address (i.e. the
5571 # originating client IP address) specified in the list of IPs under
5572 # X-Forwarded-For HTTP header. If no such header is present or the
5573 # value is not a valid IP, the key defaults to the source IP address of
5574 # the request i.e. key type IP.
5575 # - HTTP_COOKIE: The value of the HTTP
5576 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
5577 # value is truncated to the first 128 bytes of the cookie value. If no
5578 # such cookie is present in the request, the key type defaults toALL.
5579 # - HTTP_PATH: The URL path of the HTTP request. The key
5580 # value is truncated to the first 128 bytes.
5581 # - SNI: Server name indication in the TLS session of
5582 # the HTTPS request. The key value is truncated to the first 128 bytes.
5583 # The key type defaults to ALL on a HTTP session.
5584 # - REGION_CODE: The country/region from which the
5585 # request originates.
5586 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
5587 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5588 # key type defaults to ALL.
5589 # - USER_IP: The IP address of the originating client,
5590 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
5591 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
5592 # or an IP address cannot be resolved from it, the key type defaults toIP.
5593 #
5594 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
5595 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5596 # key type defaults to ALL.
5597 },
5598 ],
5599 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
5600 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
5601 # value.
5602 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
5603 # value.
5604 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
5605 # threshold, to either deny with a specified HTTP response code, or
5606 # redirect to a different endpoint.
5607 # Valid options are `deny(STATUS)`, where valid values for
5608 # `STATUS` are 403, 404, 429, and 502, and
5609 # `redirect`, where the redirect parameters come from
5610 # `exceedRedirectOptions` below.
5611 # The `redirect` action is only supported in Global Security Policies of
5612 # type CLOUD_ARMOR.
5613 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
5614 # action. Cannot be specified if the exceed action is not redirect.
5615 # This field is only supported in Global Security Policies of type
5616 # CLOUD_ARMOR.
5617 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
5618 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
5619 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
5620 #
5621 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
5622 # challenge assessment.
5623 # - EXTERNAL_302: redirect to a different URL via a 302
5624 # response.
5625 },
5626 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
5627 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
5628 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
5629 },
5630 },
5631 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
5632 # other actions.
5633 # This field is only supported in Global Security Policies of type
5634 # CLOUD_ARMOR.
5635 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
5636 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
5637 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
5638 #
5639 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
5640 # challenge assessment.
5641 # - EXTERNAL_302: redirect to a different URL via a 302
5642 # response.
5643 },
5644 },
5645 ],
5646 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
5647 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5648 # unique in the organization in which the security policy is created. This
5649 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
5650 # The name must be 1-63 characters long, and comply with
5651 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5652 # characters long and match the regular expression
5653 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5654 # lowercase letter, and all following characters must be a dash, lowercase
5655 # letter, or digit, except the last character, which cannot be a dash.
5656 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
5657 #
5658 # - CLOUD_ARMOR: Cloud Armor backend security policies can
5659 # be configured to filter incoming HTTP requests targeting backend services.
5660 # They filter requests before they hit the origin servers.
5661 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
5662 # be configured to filter incoming HTTP requests targeting backend services
5663 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
5664 # They filter requests before the request is served from Google&#x27;s cache.
5665 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
5666 # internal service policies can be configured to filter HTTP requests
5667 # targeting services managed by Traffic Director in a service mesh. They
5668 # filter requests before the request is served from the application.
5669 #
5670 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
5671 # can be configured to filter packets targeting network load balancing
5672 # resources such as backend services, target pools, target instances, and
5673 # instances with external IPs. They filter requests before the request is
5674 # served from the application.
5675 #
5676 #
5677 # This field can be set only at resource creation time.
5678 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
5679 # user-defined field consists of up to 4 bytes extracted from a fixed offset
5680 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
5681 # optional mask to select certain bits. Rules may then specify matching
5682 # values for these fields.
5683 #
5684 # Example:
5685 #
5686 # userDefinedFields:
5687 # - name: &quot;ipv4_fragment_offset&quot;
5688 # base: IPV4
5689 # offset: 6
5690 # size: 2
5691 # mask: &quot;0x1fff&quot;
5692 {
5693 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
5694 #
5695 # - IPV4: Points to the beginning of the IPv4 header.
5696 # - IPV6: Points to the beginning of the IPv6 header.
5697 # - TCP: Points to the beginning of the TCP header, skipping
5698 # over any IPv4 options or IPv6 extension headers. Not present for
5699 # non-first fragments.
5700 # - UDP: Points to the beginning of the UDP header, skipping
5701 # over any IPv4 options or IPv6 extension headers. Not present for
5702 # non-first fragments.
5703 #
5704 #
5705 # required
5706 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
5707 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
5708 # The last byte of the field (in network byte order) corresponds to the
5709 # least significant byte of the mask.
5710 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
5711 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
5712 # &#x27;base&#x27;.
5713 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
5714 },
5715 ],
5716 }
5717
5718 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
5719 that if you must retry your request, the server will know to ignore the
5720 request if it has already been completed.
5721
5722 For example, consider a situation where you make an initial request and
5723 the request times out. If you make the request again with the same
5724 request ID, the server can check if original operation with the same
5725 request ID was received, and if so, will ignore the second request. This
5726 prevents clients from accidentally creating duplicate commitments.
5727
5728 The request ID must be
5729 a valid UUID with the exception that zero UUID is not supported
5730 (00000000-0000-0000-0000-000000000000).
5731 x__xgafv: string, V1 error format.
5732 Allowed values
5733 1 - v1 error format
5734 2 - v2 error format
5735
5736 Returns:
5737 An object of the form:
5738
5739 { # Represents an Operation resource.
5740 #
5741 # Google Compute Engine has three Operation resources:
5742 #
5743 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
5744 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
5745 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
5746 #
5747 # You can use an operation resource to manage asynchronous API requests.
5748 # For more information, readHandling
5749 # API responses.
5750 #
5751 # Operations can be global, regional or zonal.
5752 #
5753 # - For global operations, use the `globalOperations`
5754 # resource.
5755 # - For regional operations, use the
5756 # `regionOperations` resource.
5757 # - For zonal operations, use
5758 # the `zoneOperations` resource.
5759 #
5760 #
5761 #
5762 # For more information, read
5763 # Global, Regional, and Zonal Resources.
5764 #
5765 # Note that completed Operation resources have a limited
5766 # retention period.
5767 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
5768 # Not present otherwise.
5769 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5770 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
5771 # set when the operation is created.
5772 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
5773 # text format.
5774 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
5775 # this field will be populated.
5776 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
5777 # operation.
5778 {
5779 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5780 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
5781 # details. There is a set of defined message types to use for providing
5782 # details.The syntax depends on the error code. For example,
5783 # QuotaExceededInfo will have details when the error code is
5784 # QUOTA_EXCEEDED.
5785 {
5786 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
5787 #
5788 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
5789 # is not enabled:
5790 #
5791 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
5792 # &quot;domain&quot;: &quot;googleapis.com&quot;
5793 # &quot;metadata&quot;: {
5794 # &quot;resource&quot;: &quot;projects/123&quot;,
5795 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
5796 # }
5797 # }
5798 #
5799 # This response indicates that the pubsub.googleapis.com API is not enabled.
5800 #
5801 # Example of an error that is returned when attempting to create a Spanner
5802 # instance in a region that is out of stock:
5803 #
5804 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
5805 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
5806 # &quot;metadata&quot;: {
5807 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
5808 # }
5809 # }
5810 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
5811 # is typically the registered service name of the tool or product that
5812 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
5813 # generated by some common infrastructure, the error domain must be a
5814 # globally unique value that identifies the infrastructure. For Google API
5815 # infrastructure, the error domain is &quot;googleapis.com&quot;.
5816 &quot;metadatas&quot;: { # Additional structured details about this error.
5817 #
5818 # Keys must match a regular expression of `a-z+` but should
5819 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
5820 # length. When identifying the current value of an exceeded limit, the units
5821 # should be contained in the key, not the value. For example, rather than
5822 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
5823 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
5824 # instances that can be created in a single (batch) request.
5825 &quot;a_key&quot;: &quot;A String&quot;,
5826 },
5827 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
5828 # proximate cause of the error. Error reasons are unique within a particular
5829 # domain of errors. This should be at most 63 characters and match a
5830 # regular expression of `A-Z+[A-Z0-9]`, which represents
5831 # UPPER_SNAKE_CASE.
5832 },
5833 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
5834 #
5835 # For example, if a quota check failed with an error indicating the calling
5836 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
5837 # directly to the right place in the developer console to flip the bit.
5838 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
5839 { # Describes a URL link.
5840 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
5841 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
5842 },
5843 ],
5844 },
5845 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
5846 # which can be attached to an RPC error.
5847 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
5848 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
5849 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
5850 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
5851 },
5852 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
5853 &quot;dimensions&quot;: { # The map holding related quota dimensions.
5854 &quot;a_key&quot;: &quot;A String&quot;,
5855 },
5856 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
5857 # type or metric.
5858 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
5859 # or metric.
5860 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
5861 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
5862 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
5863 },
5864 },
5865 ],
5866 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
5867 # This property is optional.
5868 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
5869 },
5870 ],
5871 },
5872 &quot;getVersionOperationMetadata&quot;: {
5873 &quot;inlineSbomInfo&quot;: {
5874 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
5875 # appropriate identifiers.
5876 &quot;a_key&quot;: &quot;A String&quot;,
5877 },
5878 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
5879 # identifiers.
5880 &quot;a_key&quot;: &quot;A String&quot;,
5881 },
5882 },
5883 },
5884 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
5885 # message that was returned, such as `NOT FOUND`.
5886 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
5887 # status code that was returned. For example, a `404` means the
5888 # resource was not found.
5889 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
5890 # defined by the server.
5891 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
5892 # This value is inRFC3339
5893 # text format.
5894 &quot;instancesBulkInsertOperationMetadata&quot;: {
5895 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
5896 # Example key: zones/us-central1-a
5897 &quot;a_key&quot;: {
5898 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
5899 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
5900 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
5901 # error.
5902 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
5903 # if the flow is rolling forward or rolling back.
5904 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
5905 },
5906 },
5907 },
5908 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
5909 # Operation resources.
5910 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5911 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
5912 # group of operations results from a `bulkInsert` API request.
5913 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
5914 # `update`, or `delete`, and so on.
5915 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
5916 # There is no requirement that this be linear or support any granularity of
5917 # operations. This should not be used to guess when the operation will be
5918 # complete. This number should monotonically increase as the operation
5919 # progresses.
5920 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
5921 # applicable when performing regional operations.
5922 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5923 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
5924 # this field will contain information on all underlying zonal actions and
5925 # their state.
5926 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
5927 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
5928 # Example key: zones/us-central1-a
5929 &quot;a_key&quot;: {
5930 &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
5931 # populated.
5932 # different programming environments, including REST APIs and RPC APIs. It is
5933 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
5934 # three pieces of data: error code, error message, and error details.
5935 #
5936 # You can find out more about this error model and how to work with it in the
5937 # [API Design Guide](https://cloud.google.com/apis/design/errors).
5938 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
5939 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
5940 # message types for APIs to use.
5941 {
5942 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
5943 },
5944 ],
5945 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
5946 # user-facing error message should be localized and sent in the
5947 # google.rpc.Status.details field, or localized by the client.
5948 },
5949 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
5950 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
5951 },
5952 },
5953 },
5954 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
5955 # This value is inRFC3339
5956 # text format.
5957 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
5958 # following:
5959 # `PENDING`, `RUNNING`, or `DONE`.
5960 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
5961 # operation.
5962 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
5963 # of the target resource.
5964 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
5965 # operations related to creating a snapshot, this points to the disk
5966 # that the snapshot was created from.
5967 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
5968 # `[email protected]` or
5969 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
5970 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
5971 # operation, this field will be populated.
5972 {
5973 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
5974 # Engine returns NO_RESULTS_ON_PAGE if there
5975 # are no results in the response.
5976 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
5977 # value format. For example:
5978 #
5979 # &quot;data&quot;: [
5980 # {
5981 # &quot;key&quot;: &quot;scope&quot;,
5982 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
5983 # }
5984 {
5985 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
5986 # returned. For example, for warnings where there are no results in a list
5987 # request for a particular zone, this key might be scope and
5988 # the key value might be the zone name. Other examples might be a key
5989 # indicating a deprecated resource and a suggested replacement, or a
5990 # warning about invalid network settings (for example, if an instance
5991 # attempts to perform IP forwarding but is not enabled for IP forwarding).
5992 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5993 },
5994 ],
5995 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5996 },
5997 ],
5998 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
5999 # applicable when performing per-zone operations.
6000 }</pre>
6001 </div>
6002
6003 <div class="method">
6004 <code class="details" id="patchRule">patchRule(securityPolicy, body=None, priority=None, requestId=None, x__xgafv=None)</code>
6005 <pre>Patches a rule at the specified priority.
6006
6007 Use this API to modify Cloud Armor policies. Previously, alpha and beta
6008 versions of this API were used to modify firewall policies. This usage is
6009 now disabled for most organizations. Use firewallPolicies.patchRule
6010 instead.
6011
6012 Args:
6013 securityPolicy: string, Name of the security policy to update. (required)
6014 body: object, The request body.
6015 The object takes the form of:
6016
6017 { # Represents a rule that describes one or more match conditions along with
6018 # the action to be taken when traffic matches this condition (allow or deny).
6019 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
6020 # The following are the valid actions:
6021 #
6022 # - allow: allow access to target.
6023 # - deny(STATUS): deny access to target, returns the
6024 # HTTP response code specified. Valid values for `STATUS`
6025 # are 403, 404, and 502.
6026 # - rate_based_ban: limit client traffic to the configured
6027 # threshold and ban the client if the traffic exceeds the threshold.
6028 # Configure parameters for this action in RateLimitOptions. Requires
6029 # rate_limit_options to be set.
6030 # - redirect: redirect to a different target. This can
6031 # either be an internal reCAPTCHA redirect, or an external URL-based
6032 # redirect via a 302 response. Parameters for this action can be configured
6033 # via redirectOptions. This action is only supported in Global Security
6034 # Policies of type CLOUD_ARMOR.
6035 # - throttle: limit
6036 # client traffic to the configured threshold. Configure parameters for this
6037 # action in rateLimitOptions. Requires rate_limit_options to be set for
6038 # this.
6039 # - fairshare (preview only): when traffic reaches the
6040 # threshold limit, requests from the clients matching this rule begin to be
6041 # rate-limited using the Fair Share algorithm. This action is only allowed
6042 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
6043 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
6044 # create the resource.
6045 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
6046 # This field is only supported in Global Security Policies of type
6047 # CLOUD_ARMOR.
6048 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
6049 # present.
6050 {
6051 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
6052 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
6053 },
6054 ],
6055 },
6056 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
6057 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
6058 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
6059 # Exactly one field must be specified.
6060 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
6061 # This field must be specified if versioned_expr is specified and cannot
6062 # be specified if versioned_expr is not specified.
6063 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
6064 # Maximum number of src_ip_ranges allowed is 10.
6065 &quot;A String&quot;,
6066 ],
6067 },
6068 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
6069 # A CEVAL expression is used to specify match criteria such as origin.ip,
6070 # source.region_code and contents in the request header.
6071 # Expressions containing `evaluateThreatIntelligence` require a Cloud
6072 # Armor Enterprise subscription and are not supported in Edge Policies
6073 # nor in Regional Policies. Expressions containing
6074 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
6075 # Enterprise subscription and are only supported in Global Security
6076 # Policies.
6077 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
6078 # are documented at https://github.com/google/cel-spec.
6079 #
6080 # Example (Comparison):
6081 #
6082 # title: &quot;Summary size limit&quot;
6083 # description: &quot;Determines if a summary is less than 100 chars&quot;
6084 # expression: &quot;document.summary.size() &lt; 100&quot;
6085 #
6086 # Example (Equality):
6087 #
6088 # title: &quot;Requestor is owner&quot;
6089 # description: &quot;Determines if requestor is the document owner&quot;
6090 # expression: &quot;document.owner == request.auth.claims.email&quot;
6091 #
6092 # Example (Logic):
6093 #
6094 # title: &quot;Public documents&quot;
6095 # description: &quot;Determine whether the document should be publicly visible&quot;
6096 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
6097 #
6098 # Example (Data Manipulation):
6099 #
6100 # title: &quot;Notification string&quot;
6101 # description: &quot;Create a notification string with a timestamp.&quot;
6102 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
6103 #
6104 # The exact variables and functions that may be referenced within an expression
6105 # are determined by the service that evaluates it. See the service
6106 # documentation for additional information.
6107 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
6108 # describes the expression, e.g. when hovered over it in a UI.
6109 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
6110 # syntax.
6111 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
6112 # reporting, e.g. a file name and a position in the file.
6113 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
6114 # its purpose. This can be used e.g. in UIs which allow to enter the
6115 # expression.
6116 },
6117 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
6118 # CEVAL expression (i.e., &#x27;expr&#x27;).
6119 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
6120 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
6121 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6122 # action-tokens. The provided site keys need to be created from
6123 # reCAPTCHA API under the same project where the security policy is
6124 # created.
6125 &quot;A String&quot;,
6126 ],
6127 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6128 # session-tokens. The provided site keys need to be created from
6129 # reCAPTCHA API under the same project where the security policy is
6130 # created.
6131 &quot;A String&quot;,
6132 ],
6133 },
6134 },
6135 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
6136 # If this field is specified, config must also be specified.
6137 # Available preconfigured expressions along with their requirements are:
6138 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
6139 # config.
6140 },
6141 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
6142 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
6143 # &#x27;action&#x27; is enforced.
6144 #
6145 # The match criteria for a rule consists of built-in match fields (like
6146 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
6147 # (&#x27;userDefinedFields&#x27;).
6148 #
6149 # Field values may be extracted directly from the packet or derived from it
6150 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
6151 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
6152 # header is found in the packet and the entire field is in bounds.
6153 #
6154 # Each match field may specify which values can match it, listing one or
6155 # more ranges, prefixes, or exact values that are considered a match for
6156 # the field. A field value must be present in order to match a specified
6157 # match field. If no match values are specified for a match field, then any
6158 # field value is considered to match it, and it&#x27;s not required to be
6159 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
6160 #
6161 # For a packet to match a rule, all specified match fields must match the
6162 # corresponding field values derived from the packet.
6163 #
6164 # Example:
6165 #
6166 # networkMatch:
6167 # srcIpRanges:
6168 # - &quot;192.0.2.0/24&quot;
6169 # - &quot;198.51.100.0/24&quot;
6170 # userDefinedFields:
6171 # - name: &quot;ipv4_fragment_offset&quot;
6172 # values:
6173 # - &quot;1-0x1fff&quot;
6174 #
6175 # The above match condition matches packets with a source IP in
6176 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
6177 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
6178 # against.
6179 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
6180 # format.
6181 &quot;A String&quot;,
6182 ],
6183 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6184 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6185 &quot;A String&quot;,
6186 ],
6187 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
6188 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
6189 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
6190 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
6191 &quot;A String&quot;,
6192 ],
6193 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
6194 42,
6195 ],
6196 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
6197 &quot;A String&quot;,
6198 ],
6199 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6200 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6201 &quot;A String&quot;,
6202 ],
6203 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
6204 # IP address.
6205 &quot;A String&quot;,
6206 ],
6207 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
6208 # matching values for that field.
6209 {
6210 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
6211 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
6212 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
6213 # range (e.g. &quot;0x400-0x7ff&quot;).
6214 &quot;A String&quot;,
6215 ],
6216 },
6217 ],
6218 },
6219 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
6220 # does not evaluate preconfigured WAF rules, i.e., if
6221 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
6222 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
6223 {
6224 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
6225 # inspection during preconfigured WAF evaluation.
6226 {
6227 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6228 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6229 },
6230 ],
6231 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
6232 # inspection during preconfigured WAF evaluation.
6233 {
6234 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6235 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6236 },
6237 ],
6238 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
6239 # from inspection during preconfigured WAF evaluation. Note that the
6240 # parameter can be in the query string or in the POST body.
6241 {
6242 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6243 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6244 },
6245 ],
6246 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
6247 # inspection during preconfigured WAF evaluation. When specifying this
6248 # field, the query or fragment part should be excluded.
6249 {
6250 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6251 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6252 },
6253 ],
6254 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
6255 # preconfigured WAF exclusion. If omitted, it refers to all the rule
6256 # IDs under the WAF rule set.
6257 &quot;A String&quot;,
6258 ],
6259 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
6260 },
6261 ],
6262 },
6263 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
6264 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
6265 # must be a positive value between 0 and 2147483647.
6266 # Rules are evaluated from highest to lowest priority where 0 is the
6267 # highest priority and 2147483647 is the lowest priority.
6268 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
6269 # &quot;fairshare&quot;. Cannot be specified for any other actions.
6270 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
6271 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
6272 # the traffic will continue to be banned by the rate limit after the
6273 # rate falls below the threshold.
6274 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
6275 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
6276 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
6277 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
6278 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6279 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6280 },
6281 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
6282 # threshold. Valid option is &quot;allow&quot; only.
6283 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6284 # values are:
6285 #
6286 # - ALL: A single rate limit threshold is applied to all
6287 # the requests matching this rule. This is the default value if
6288 # &quot;enforceOnKey&quot; is not configured.
6289 # - IP: The source IP address of
6290 # the request is the key. Each IP has this limit enforced
6291 # separately.
6292 # - HTTP_HEADER: The value of the HTTP
6293 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6294 # value is truncated to the first 128 bytes of the header value. If no
6295 # such header is present in the request, the key type defaults toALL.
6296 # - XFF_IP: The first IP address (i.e. the
6297 # originating client IP address) specified in the list of IPs under
6298 # X-Forwarded-For HTTP header. If no such header is present or the value
6299 # is not a valid IP, the key defaults to the source IP address of
6300 # the request i.e. key type IP.
6301 # - HTTP_COOKIE: The value of the HTTP
6302 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6303 # value is truncated to the first 128 bytes of the cookie value. If no
6304 # such cookie is present in the request, the key type defaults toALL.
6305 # - HTTP_PATH: The URL path of the HTTP request. The key
6306 # value is truncated to the first 128 bytes.
6307 # - SNI: Server name indication in the TLS session of the
6308 # HTTPS request. The key value is truncated to the first 128 bytes. The
6309 # key type defaults to ALL on a HTTP session.
6310 # - REGION_CODE: The country/region from which the request
6311 # originates.
6312 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6313 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6314 # key type defaults to ALL.
6315 # - USER_IP: The IP address of the originating client,
6316 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6317 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
6318 # an IP address cannot be resolved from it, the key type defaults toIP.
6319 #
6320 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6321 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6322 # key type defaults to ALL.
6323 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
6324 # limit threshold is enforced for all the requests matching the rule.
6325 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
6326 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
6327 # ratelimit threshold/action is enforced. You can specify up to 3
6328 # enforce_on_key_configs. If enforce_on_key_configs is specified,
6329 # enforce_on_key must not be specified.
6330 {
6331 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6332 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
6333 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
6334 # taken as the key value.
6335 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6336 # values are:
6337 #
6338 # - ALL: A single rate limit threshold is applied to all
6339 # the requests matching this rule. This is the default value if
6340 # &quot;enforceOnKeyConfigs&quot; is not configured.
6341 # - IP: The source IP address of
6342 # the request is the key. Each IP has this limit enforced
6343 # separately.
6344 # - HTTP_HEADER: The value of the HTTP
6345 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6346 # value is truncated to the first 128 bytes of the header value. If no
6347 # such header is present in the request, the key type defaults toALL.
6348 # - XFF_IP: The first IP address (i.e. the
6349 # originating client IP address) specified in the list of IPs under
6350 # X-Forwarded-For HTTP header. If no such header is present or the
6351 # value is not a valid IP, the key defaults to the source IP address of
6352 # the request i.e. key type IP.
6353 # - HTTP_COOKIE: The value of the HTTP
6354 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6355 # value is truncated to the first 128 bytes of the cookie value. If no
6356 # such cookie is present in the request, the key type defaults toALL.
6357 # - HTTP_PATH: The URL path of the HTTP request. The key
6358 # value is truncated to the first 128 bytes.
6359 # - SNI: Server name indication in the TLS session of
6360 # the HTTPS request. The key value is truncated to the first 128 bytes.
6361 # The key type defaults to ALL on a HTTP session.
6362 # - REGION_CODE: The country/region from which the
6363 # request originates.
6364 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6365 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6366 # key type defaults to ALL.
6367 # - USER_IP: The IP address of the originating client,
6368 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6369 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
6370 # or an IP address cannot be resolved from it, the key type defaults toIP.
6371 #
6372 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6373 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6374 # key type defaults to ALL.
6375 },
6376 ],
6377 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6378 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
6379 # value.
6380 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
6381 # value.
6382 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
6383 # threshold, to either deny with a specified HTTP response code, or
6384 # redirect to a different endpoint.
6385 # Valid options are `deny(STATUS)`, where valid values for
6386 # `STATUS` are 403, 404, 429, and 502, and
6387 # `redirect`, where the redirect parameters come from
6388 # `exceedRedirectOptions` below.
6389 # The `redirect` action is only supported in Global Security Policies of
6390 # type CLOUD_ARMOR.
6391 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
6392 # action. Cannot be specified if the exceed action is not redirect.
6393 # This field is only supported in Global Security Policies of type
6394 # CLOUD_ARMOR.
6395 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6396 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6397 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6398 #
6399 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6400 # challenge assessment.
6401 # - EXTERNAL_302: redirect to a different URL via a 302
6402 # response.
6403 },
6404 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
6405 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6406 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6407 },
6408 },
6409 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
6410 # other actions.
6411 # This field is only supported in Global Security Policies of type
6412 # CLOUD_ARMOR.
6413 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6414 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6415 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6416 #
6417 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6418 # challenge assessment.
6419 # - EXTERNAL_302: redirect to a different URL via a 302
6420 # response.
6421 },
6422 }
6423
6424 priority: integer, The priority of the rule to patch.
6425 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
6426 that if you must retry your request, the server will know to ignore the
6427 request if it has already been completed.
6428
6429 For example, consider a situation where you make an initial request and
6430 the request times out. If you make the request again with the same
6431 request ID, the server can check if original operation with the same
6432 request ID was received, and if so, will ignore the second request. This
6433 prevents clients from accidentally creating duplicate commitments.
6434
6435 The request ID must be
6436 a valid UUID with the exception that zero UUID is not supported
6437 (00000000-0000-0000-0000-000000000000).
6438 x__xgafv: string, V1 error format.
6439 Allowed values
6440 1 - v1 error format
6441 2 - v2 error format
6442
6443 Returns:
6444 An object of the form:
6445
6446 { # Represents an Operation resource.
6447 #
6448 # Google Compute Engine has three Operation resources:
6449 #
6450 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
6451 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
6452 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
6453 #
6454 # You can use an operation resource to manage asynchronous API requests.
6455 # For more information, readHandling
6456 # API responses.
6457 #
6458 # Operations can be global, regional or zonal.
6459 #
6460 # - For global operations, use the `globalOperations`
6461 # resource.
6462 # - For regional operations, use the
6463 # `regionOperations` resource.
6464 # - For zonal operations, use
6465 # the `zoneOperations` resource.
6466 #
6467 #
6468 #
6469 # For more information, read
6470 # Global, Regional, and Zonal Resources.
6471 #
6472 # Note that completed Operation resources have a limited
6473 # retention period.
6474 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
6475 # Not present otherwise.
6476 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6477 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
6478 # set when the operation is created.
6479 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
6480 # text format.
6481 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
6482 # this field will be populated.
6483 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
6484 # operation.
6485 {
6486 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6487 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
6488 # details. There is a set of defined message types to use for providing
6489 # details.The syntax depends on the error code. For example,
6490 # QuotaExceededInfo will have details when the error code is
6491 # QUOTA_EXCEEDED.
6492 {
6493 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
6494 #
6495 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
6496 # is not enabled:
6497 #
6498 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
6499 # &quot;domain&quot;: &quot;googleapis.com&quot;
6500 # &quot;metadata&quot;: {
6501 # &quot;resource&quot;: &quot;projects/123&quot;,
6502 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
6503 # }
6504 # }
6505 #
6506 # This response indicates that the pubsub.googleapis.com API is not enabled.
6507 #
6508 # Example of an error that is returned when attempting to create a Spanner
6509 # instance in a region that is out of stock:
6510 #
6511 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
6512 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
6513 # &quot;metadata&quot;: {
6514 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
6515 # }
6516 # }
6517 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
6518 # is typically the registered service name of the tool or product that
6519 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
6520 # generated by some common infrastructure, the error domain must be a
6521 # globally unique value that identifies the infrastructure. For Google API
6522 # infrastructure, the error domain is &quot;googleapis.com&quot;.
6523 &quot;metadatas&quot;: { # Additional structured details about this error.
6524 #
6525 # Keys must match a regular expression of `a-z+` but should
6526 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
6527 # length. When identifying the current value of an exceeded limit, the units
6528 # should be contained in the key, not the value. For example, rather than
6529 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
6530 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
6531 # instances that can be created in a single (batch) request.
6532 &quot;a_key&quot;: &quot;A String&quot;,
6533 },
6534 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
6535 # proximate cause of the error. Error reasons are unique within a particular
6536 # domain of errors. This should be at most 63 characters and match a
6537 # regular expression of `A-Z+[A-Z0-9]`, which represents
6538 # UPPER_SNAKE_CASE.
6539 },
6540 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
6541 #
6542 # For example, if a quota check failed with an error indicating the calling
6543 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
6544 # directly to the right place in the developer console to flip the bit.
6545 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
6546 { # Describes a URL link.
6547 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
6548 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
6549 },
6550 ],
6551 },
6552 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
6553 # which can be attached to an RPC error.
6554 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
6555 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
6556 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
6557 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
6558 },
6559 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
6560 &quot;dimensions&quot;: { # The map holding related quota dimensions.
6561 &quot;a_key&quot;: &quot;A String&quot;,
6562 },
6563 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
6564 # type or metric.
6565 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
6566 # or metric.
6567 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
6568 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
6569 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
6570 },
6571 },
6572 ],
6573 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
6574 # This property is optional.
6575 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
6576 },
6577 ],
6578 },
6579 &quot;getVersionOperationMetadata&quot;: {
6580 &quot;inlineSbomInfo&quot;: {
6581 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
6582 # appropriate identifiers.
6583 &quot;a_key&quot;: &quot;A String&quot;,
6584 },
6585 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
6586 # identifiers.
6587 &quot;a_key&quot;: &quot;A String&quot;,
6588 },
6589 },
6590 },
6591 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
6592 # message that was returned, such as `NOT FOUND`.
6593 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
6594 # status code that was returned. For example, a `404` means the
6595 # resource was not found.
6596 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
6597 # defined by the server.
6598 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
6599 # This value is inRFC3339
6600 # text format.
6601 &quot;instancesBulkInsertOperationMetadata&quot;: {
6602 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
6603 # Example key: zones/us-central1-a
6604 &quot;a_key&quot;: {
6605 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
6606 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
6607 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
6608 # error.
6609 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
6610 # if the flow is rolling forward or rolling back.
6611 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
6612 },
6613 },
6614 },
6615 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
6616 # Operation resources.
6617 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6618 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
6619 # group of operations results from a `bulkInsert` API request.
6620 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
6621 # `update`, or `delete`, and so on.
6622 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
6623 # There is no requirement that this be linear or support any granularity of
6624 # operations. This should not be used to guess when the operation will be
6625 # complete. This number should monotonically increase as the operation
6626 # progresses.
6627 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
6628 # applicable when performing regional operations.
6629 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6630 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
6631 # this field will contain information on all underlying zonal actions and
6632 # their state.
6633 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
6634 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
6635 # Example key: zones/us-central1-a
6636 &quot;a_key&quot;: {
6637 &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
6638 # populated.
6639 # different programming environments, including REST APIs and RPC APIs. It is
6640 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
6641 # three pieces of data: error code, error message, and error details.
6642 #
6643 # You can find out more about this error model and how to work with it in the
6644 # [API Design Guide](https://cloud.google.com/apis/design/errors).
6645 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6646 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
6647 # message types for APIs to use.
6648 {
6649 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6650 },
6651 ],
6652 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
6653 # user-facing error message should be localized and sent in the
6654 # google.rpc.Status.details field, or localized by the client.
6655 },
6656 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
6657 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
6658 },
6659 },
6660 },
6661 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
6662 # This value is inRFC3339
6663 # text format.
6664 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
6665 # following:
6666 # `PENDING`, `RUNNING`, or `DONE`.
6667 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
6668 # operation.
6669 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
6670 # of the target resource.
6671 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
6672 # operations related to creating a snapshot, this points to the disk
6673 # that the snapshot was created from.
6674 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
6675 # `[email protected]` or
6676 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
6677 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
6678 # operation, this field will be populated.
6679 {
6680 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
6681 # Engine returns NO_RESULTS_ON_PAGE if there
6682 # are no results in the response.
6683 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
6684 # value format. For example:
6685 #
6686 # &quot;data&quot;: [
6687 # {
6688 # &quot;key&quot;: &quot;scope&quot;,
6689 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
6690 # }
6691 {
6692 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
6693 # returned. For example, for warnings where there are no results in a list
6694 # request for a particular zone, this key might be scope and
6695 # the key value might be the zone name. Other examples might be a key
6696 # indicating a deprecated resource and a suggested replacement, or a
6697 # warning about invalid network settings (for example, if an instance
6698 # attempts to perform IP forwarding but is not enabled for IP forwarding).
6699 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6700 },
6701 ],
6702 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6703 },
6704 ],
6705 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
6706 # applicable when performing per-zone operations.
6707 }</pre>
6708 </div>
6709
6710 <div class="method">
6711 <code class="details" id="removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None, x__xgafv=None)</code>
6712 <pre>Removes an association for the specified security policy.
6713
6714 Use this API to modify Cloud Armor policies. Previously, alpha and beta
6715 versions of this API were used to modify firewall policies. This usage is
6716 now disabled for most organizations. Use firewallPolicies.removeAssociation
6717 instead.
6718
6719 Args:
6720 securityPolicy: string, Name of the security policy to update. (required)
6721 name: string, Name for the attachment that will be removed.
6722 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
6723 that if you must retry your request, the server will know to ignore the
6724 request if it has already been completed.
6725
6726 For example, consider a situation where you make an initial request and
6727 the request times out. If you make the request again with the same
6728 request ID, the server can check if original operation with the same
6729 request ID was received, and if so, will ignore the second request. This
6730 prevents clients from accidentally creating duplicate commitments.
6731
6732 The request ID must be
6733 a valid UUID with the exception that zero UUID is not supported
6734 (00000000-0000-0000-0000-000000000000).
6735 x__xgafv: string, V1 error format.
6736 Allowed values
6737 1 - v1 error format
6738 2 - v2 error format
6739
6740 Returns:
6741 An object of the form:
6742
6743 { # Represents an Operation resource.
6744 #
6745 # Google Compute Engine has three Operation resources:
6746 #
6747 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
6748 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
6749 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
6750 #
6751 # You can use an operation resource to manage asynchronous API requests.
6752 # For more information, readHandling
6753 # API responses.
6754 #
6755 # Operations can be global, regional or zonal.
6756 #
6757 # - For global operations, use the `globalOperations`
6758 # resource.
6759 # - For regional operations, use the
6760 # `regionOperations` resource.
6761 # - For zonal operations, use
6762 # the `zoneOperations` resource.
6763 #
6764 #
6765 #
6766 # For more information, read
6767 # Global, Regional, and Zonal Resources.
6768 #
6769 # Note that completed Operation resources have a limited
6770 # retention period.
6771 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
6772 # Not present otherwise.
6773 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6774 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
6775 # set when the operation is created.
6776 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
6777 # text format.
6778 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
6779 # this field will be populated.
6780 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
6781 # operation.
6782 {
6783 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6784 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
6785 # details. There is a set of defined message types to use for providing
6786 # details.The syntax depends on the error code. For example,
6787 # QuotaExceededInfo will have details when the error code is
6788 # QUOTA_EXCEEDED.
6789 {
6790 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
6791 #
6792 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
6793 # is not enabled:
6794 #
6795 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
6796 # &quot;domain&quot;: &quot;googleapis.com&quot;
6797 # &quot;metadata&quot;: {
6798 # &quot;resource&quot;: &quot;projects/123&quot;,
6799 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
6800 # }
6801 # }
6802 #
6803 # This response indicates that the pubsub.googleapis.com API is not enabled.
6804 #
6805 # Example of an error that is returned when attempting to create a Spanner
6806 # instance in a region that is out of stock:
6807 #
6808 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
6809 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
6810 # &quot;metadata&quot;: {
6811 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
6812 # }
6813 # }
6814 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
6815 # is typically the registered service name of the tool or product that
6816 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
6817 # generated by some common infrastructure, the error domain must be a
6818 # globally unique value that identifies the infrastructure. For Google API
6819 # infrastructure, the error domain is &quot;googleapis.com&quot;.
6820 &quot;metadatas&quot;: { # Additional structured details about this error.
6821 #
6822 # Keys must match a regular expression of `a-z+` but should
6823 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
6824 # length. When identifying the current value of an exceeded limit, the units
6825 # should be contained in the key, not the value. For example, rather than
6826 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
6827 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
6828 # instances that can be created in a single (batch) request.
6829 &quot;a_key&quot;: &quot;A String&quot;,
6830 },
6831 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
6832 # proximate cause of the error. Error reasons are unique within a particular
6833 # domain of errors. This should be at most 63 characters and match a
6834 # regular expression of `A-Z+[A-Z0-9]`, which represents
6835 # UPPER_SNAKE_CASE.
6836 },
6837 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
6838 #
6839 # For example, if a quota check failed with an error indicating the calling
6840 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
6841 # directly to the right place in the developer console to flip the bit.
6842 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
6843 { # Describes a URL link.
6844 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
6845 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
6846 },
6847 ],
6848 },
6849 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
6850 # which can be attached to an RPC error.
6851 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
6852 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
6853 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
6854 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
6855 },
6856 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
6857 &quot;dimensions&quot;: { # The map holding related quota dimensions.
6858 &quot;a_key&quot;: &quot;A String&quot;,
6859 },
6860 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
6861 # type or metric.
6862 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
6863 # or metric.
6864 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
6865 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
6866 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
6867 },
6868 },
6869 ],
6870 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
6871 # This property is optional.
6872 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
6873 },
6874 ],
6875 },
6876 &quot;getVersionOperationMetadata&quot;: {
6877 &quot;inlineSbomInfo&quot;: {
6878 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
6879 # appropriate identifiers.
6880 &quot;a_key&quot;: &quot;A String&quot;,
6881 },
6882 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
6883 # identifiers.
6884 &quot;a_key&quot;: &quot;A String&quot;,
6885 },
6886 },
6887 },
6888 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
6889 # message that was returned, such as `NOT FOUND`.
6890 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
6891 # status code that was returned. For example, a `404` means the
6892 # resource was not found.
6893 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
6894 # defined by the server.
6895 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
6896 # This value is inRFC3339
6897 # text format.
6898 &quot;instancesBulkInsertOperationMetadata&quot;: {
6899 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
6900 # Example key: zones/us-central1-a
6901 &quot;a_key&quot;: {
6902 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
6903 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
6904 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
6905 # error.
6906 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
6907 # if the flow is rolling forward or rolling back.
6908 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
6909 },
6910 },
6911 },
6912 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
6913 # Operation resources.
6914 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6915 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
6916 # group of operations results from a `bulkInsert` API request.
6917 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
6918 # `update`, or `delete`, and so on.
6919 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
6920 # There is no requirement that this be linear or support any granularity of
6921 # operations. This should not be used to guess when the operation will be
6922 # complete. This number should monotonically increase as the operation
6923 # progresses.
6924 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
6925 # applicable when performing regional operations.
6926 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6927 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
6928 # this field will contain information on all underlying zonal actions and
6929 # their state.
6930 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
6931 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
6932 # Example key: zones/us-central1-a
6933 &quot;a_key&quot;: {
6934 &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
6935 # populated.
6936 # different programming environments, including REST APIs and RPC APIs. It is
6937 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
6938 # three pieces of data: error code, error message, and error details.
6939 #
6940 # You can find out more about this error model and how to work with it in the
6941 # [API Design Guide](https://cloud.google.com/apis/design/errors).
6942 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6943 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
6944 # message types for APIs to use.
6945 {
6946 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6947 },
6948 ],
6949 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
6950 # user-facing error message should be localized and sent in the
6951 # google.rpc.Status.details field, or localized by the client.
6952 },
6953 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
6954 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
6955 },
6956 },
6957 },
6958 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
6959 # This value is inRFC3339
6960 # text format.
6961 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
6962 # following:
6963 # `PENDING`, `RUNNING`, or `DONE`.
6964 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
6965 # operation.
6966 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
6967 # of the target resource.
6968 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
6969 # operations related to creating a snapshot, this points to the disk
6970 # that the snapshot was created from.
6971 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
6972 # `[email protected]` or
6973 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
6974 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
6975 # operation, this field will be populated.
6976 {
6977 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
6978 # Engine returns NO_RESULTS_ON_PAGE if there
6979 # are no results in the response.
6980 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
6981 # value format. For example:
6982 #
6983 # &quot;data&quot;: [
6984 # {
6985 # &quot;key&quot;: &quot;scope&quot;,
6986 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
6987 # }
6988 {
6989 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
6990 # returned. For example, for warnings where there are no results in a list
6991 # request for a particular zone, this key might be scope and
6992 # the key value might be the zone name. Other examples might be a key
6993 # indicating a deprecated resource and a suggested replacement, or a
6994 # warning about invalid network settings (for example, if an instance
6995 # attempts to perform IP forwarding but is not enabled for IP forwarding).
6996 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6997 },
6998 ],
6999 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7000 },
7001 ],
7002 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7003 # applicable when performing per-zone operations.
7004 }</pre>
7005 </div>
7006
7007 <div class="method">
7008 <code class="details" id="removeRule">removeRule(securityPolicy, priority=None, requestId=None, x__xgafv=None)</code>
7009 <pre>Deletes a rule at the specified priority.
7010
7011 Use this API to modify Cloud Armor policies. Previously, alpha and beta
7012 versions of this API were used to modify firewall policies. This usage is
7013 now disabled for most organizations. Use firewallPolicies.removeRule
7014 instead.
7015
7016 Args:
7017 securityPolicy: string, Name of the security policy to update. (required)
7018 priority: integer, The priority of the rule to remove from the security policy.
7019 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
7020 that if you must retry your request, the server will know to ignore the
7021 request if it has already been completed.
7022
7023 For example, consider a situation where you make an initial request and
7024 the request times out. If you make the request again with the same
7025 request ID, the server can check if original operation with the same
7026 request ID was received, and if so, will ignore the second request. This
7027 prevents clients from accidentally creating duplicate commitments.
7028
7029 The request ID must be
7030 a valid UUID with the exception that zero UUID is not supported
7031 (00000000-0000-0000-0000-000000000000).
7032 x__xgafv: string, V1 error format.
7033 Allowed values
7034 1 - v1 error format
7035 2 - v2 error format
7036
7037 Returns:
7038 An object of the form:
7039
7040 { # Represents an Operation resource.
7041 #
7042 # Google Compute Engine has three Operation resources:
7043 #
7044 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
7045 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
7046 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
7047 #
7048 # You can use an operation resource to manage asynchronous API requests.
7049 # For more information, readHandling
7050 # API responses.
7051 #
7052 # Operations can be global, regional or zonal.
7053 #
7054 # - For global operations, use the `globalOperations`
7055 # resource.
7056 # - For regional operations, use the
7057 # `regionOperations` resource.
7058 # - For zonal operations, use
7059 # the `zoneOperations` resource.
7060 #
7061 #
7062 #
7063 # For more information, read
7064 # Global, Regional, and Zonal Resources.
7065 #
7066 # Note that completed Operation resources have a limited
7067 # retention period.
7068 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7069 # Not present otherwise.
7070 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7071 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7072 # set when the operation is created.
7073 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7074 # text format.
7075 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7076 # this field will be populated.
7077 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7078 # operation.
7079 {
7080 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7081 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7082 # details. There is a set of defined message types to use for providing
7083 # details.The syntax depends on the error code. For example,
7084 # QuotaExceededInfo will have details when the error code is
7085 # QUOTA_EXCEEDED.
7086 {
7087 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7088 #
7089 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7090 # is not enabled:
7091 #
7092 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7093 # &quot;domain&quot;: &quot;googleapis.com&quot;
7094 # &quot;metadata&quot;: {
7095 # &quot;resource&quot;: &quot;projects/123&quot;,
7096 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7097 # }
7098 # }
7099 #
7100 # This response indicates that the pubsub.googleapis.com API is not enabled.
7101 #
7102 # Example of an error that is returned when attempting to create a Spanner
7103 # instance in a region that is out of stock:
7104 #
7105 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7106 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7107 # &quot;metadata&quot;: {
7108 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7109 # }
7110 # }
7111 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7112 # is typically the registered service name of the tool or product that
7113 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7114 # generated by some common infrastructure, the error domain must be a
7115 # globally unique value that identifies the infrastructure. For Google API
7116 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7117 &quot;metadatas&quot;: { # Additional structured details about this error.
7118 #
7119 # Keys must match a regular expression of `a-z+` but should
7120 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7121 # length. When identifying the current value of an exceeded limit, the units
7122 # should be contained in the key, not the value. For example, rather than
7123 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7124 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7125 # instances that can be created in a single (batch) request.
7126 &quot;a_key&quot;: &quot;A String&quot;,
7127 },
7128 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7129 # proximate cause of the error. Error reasons are unique within a particular
7130 # domain of errors. This should be at most 63 characters and match a
7131 # regular expression of `A-Z+[A-Z0-9]`, which represents
7132 # UPPER_SNAKE_CASE.
7133 },
7134 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7135 #
7136 # For example, if a quota check failed with an error indicating the calling
7137 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7138 # directly to the right place in the developer console to flip the bit.
7139 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7140 { # Describes a URL link.
7141 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7142 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7143 },
7144 ],
7145 },
7146 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7147 # which can be attached to an RPC error.
7148 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7149 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7150 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7151 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7152 },
7153 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7154 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7155 &quot;a_key&quot;: &quot;A String&quot;,
7156 },
7157 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7158 # type or metric.
7159 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7160 # or metric.
7161 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7162 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7163 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7164 },
7165 },
7166 ],
7167 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7168 # This property is optional.
7169 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7170 },
7171 ],
7172 },
7173 &quot;getVersionOperationMetadata&quot;: {
7174 &quot;inlineSbomInfo&quot;: {
7175 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7176 # appropriate identifiers.
7177 &quot;a_key&quot;: &quot;A String&quot;,
7178 },
7179 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7180 # identifiers.
7181 &quot;a_key&quot;: &quot;A String&quot;,
7182 },
7183 },
7184 },
7185 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7186 # message that was returned, such as `NOT FOUND`.
7187 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7188 # status code that was returned. For example, a `404` means the
7189 # resource was not found.
7190 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7191 # defined by the server.
7192 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7193 # This value is inRFC3339
7194 # text format.
7195 &quot;instancesBulkInsertOperationMetadata&quot;: {
7196 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7197 # Example key: zones/us-central1-a
7198 &quot;a_key&quot;: {
7199 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7200 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7201 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7202 # error.
7203 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7204 # if the flow is rolling forward or rolling back.
7205 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7206 },
7207 },
7208 },
7209 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7210 # Operation resources.
7211 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7212 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7213 # group of operations results from a `bulkInsert` API request.
7214 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7215 # `update`, or `delete`, and so on.
7216 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7217 # There is no requirement that this be linear or support any granularity of
7218 # operations. This should not be used to guess when the operation will be
7219 # complete. This number should monotonically increase as the operation
7220 # progresses.
7221 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7222 # applicable when performing regional operations.
7223 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7224 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7225 # this field will contain information on all underlying zonal actions and
7226 # their state.
7227 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7228 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7229 # Example key: zones/us-central1-a
7230 &quot;a_key&quot;: {
7231 &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
7232 # populated.
7233 # different programming environments, including REST APIs and RPC APIs. It is
7234 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7235 # three pieces of data: error code, error message, and error details.
7236 #
7237 # You can find out more about this error model and how to work with it in the
7238 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7239 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7240 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7241 # message types for APIs to use.
7242 {
7243 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7244 },
7245 ],
7246 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7247 # user-facing error message should be localized and sent in the
7248 # google.rpc.Status.details field, or localized by the client.
7249 },
7250 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7251 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7252 },
7253 },
7254 },
7255 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7256 # This value is inRFC3339
7257 # text format.
7258 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7259 # following:
7260 # `PENDING`, `RUNNING`, or `DONE`.
7261 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7262 # operation.
7263 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7264 # of the target resource.
7265 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7266 # operations related to creating a snapshot, this points to the disk
7267 # that the snapshot was created from.
7268 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7269 # `[email protected]` or
7270 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7271 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7272 # operation, this field will be populated.
7273 {
7274 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7275 # Engine returns NO_RESULTS_ON_PAGE if there
7276 # are no results in the response.
7277 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7278 # value format. For example:
7279 #
7280 # &quot;data&quot;: [
7281 # {
7282 # &quot;key&quot;: &quot;scope&quot;,
7283 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7284 # }
7285 {
7286 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7287 # returned. For example, for warnings where there are no results in a list
7288 # request for a particular zone, this key might be scope and
7289 # the key value might be the zone name. Other examples might be a key
7290 # indicating a deprecated resource and a suggested replacement, or a
7291 # warning about invalid network settings (for example, if an instance
7292 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7293 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7294 },
7295 ],
7296 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7297 },
7298 ],
7299 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7300 # applicable when performing per-zone operations.
7301 }</pre>
7302 </div>
7303
7304 </body></html>