Debian Codegraph @

docs/dyn/compute_alpha.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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.organizationSecurityPolicies.html">organizationSecurityPolicies</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#addAssociation">addAssociation(securityPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</a></code></p>
79 <p class="firstline">Inserts an association for the specified security policy.</p>
80 <p class="toc_element">
81 <code><a href="#addRule">addRule(securityPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Inserts a rule into a security policy.</p>
83 <p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85 <p class="firstline">Close httplib2 connections.</p>
86 <p class="toc_element">
87 <code><a href="#copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Copies rules to the specified security policy.</p>
89 <p class="toc_element">
90 <code><a href="#delete">delete(securityPolicy, requestId=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Deletes the specified policy.</p>
92 <p class="toc_element">
93 <code><a href="#get">get(securityPolicy, x__xgafv=None)</a></code></p>
94 <p class="firstline">List all of the ordered rules present in a single specified policy.</p>
95 <p class="toc_element">
96 <code><a href="#getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Gets an association with the specified name.</p>
98 <p class="toc_element">
99 <code><a href="#getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">Gets a rule at the specified priority.</p>
101 <p class="toc_element">
102 <code><a href="#insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
103 <p class="firstline">Creates a new policy in the specified organization using the data included</p>
104 <p class="toc_element">
105 <code><a href="#list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
106 <p class="firstline">List all the policies that have been configured for the specified</p>
107 <p class="toc_element">
108 <code><a href="#listAssociations">listAssociations(targetResource=None, x__xgafv=None)</a></code></p>
109 <p class="firstline">Lists associations of a specified target, i.e., organization or folder.</p>
110 <p class="toc_element">
111 <code><a href="#listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
112 <p class="firstline">Gets the current list of preconfigured Web Application Firewall (WAF)</p>
113 <p class="toc_element">
114 <code><a href="#list_next">list_next()</a></code></p>
115 <p class="firstline">Retrieves the next page of results.</p>
116 <p class="toc_element">
117 <code><a href="#move">move(securityPolicy, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
118 <p class="firstline">Moves the specified security policy.</p>
119 <p class="toc_element">
120 <code><a href="#patch">patch(securityPolicy, body=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p>
121 <p class="firstline">Patches the specified policy with the data included in the request.</p>
122 <p class="toc_element">
123 <code><a href="#patchRule">patchRule(securityPolicy, body=None, priority=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p>
124 <p class="firstline">Patches a rule at the specified priority.</p>
125 <p class="toc_element">
126 <code><a href="#removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None, x__xgafv=None)</a></code></p>
127 <p class="firstline">Removes an association for the specified security policy.</p>
128 <p class="toc_element">
129 <code><a href="#removeRule">removeRule(securityPolicy, priority=None, requestId=None, x__xgafv=None)</a></code></p>
130 <p class="firstline">Deletes a rule at the specified priority.</p>
131 <h3>Method Details</h3>
132 <div class="method">
133 <code class="details" id="addAssociation">addAssociation(securityPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</code>
134 <pre>Inserts an association for the specified security policy.
135
136 This has billing implications. Projects in the hierarchy with effective
137 hierarchical security policies will be automatically enrolled into Cloud
138 Armor Enterprise if not already enrolled.
139
140 Use this API to modify Cloud Armor policies. Previously, alpha and beta
141 versions of this API were used to modify firewall policies. This usage is
142 now disabled for most organizations. Use firewallPolicies.addAssociation
143 instead.
144
145 Args:
146 securityPolicy: string, Name of the security policy to update. (required)
147 body: object, The request body.
148 The object takes the form of:
149
150 {
151 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
152 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
153 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
154 &quot;A String&quot;,
155 ],
156 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
157 &quot;A String&quot;,
158 ],
159 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
160 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
161 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
162 }
163
164 replaceExistingAssociation: boolean, Indicates whether or not to replace it if an association of the attachment
165 already exists. This is false by default, in which case an error will be
166 returned if an association already exists.
167 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
168 that if you must retry your request, the server will know to ignore the
169 request if it has already been completed.
170
171 For example, consider a situation where you make an initial request and
172 the request times out. If you make the request again with the same
173 request ID, the server can check if original operation with the same
174 request ID was received, and if so, will ignore the second request. This
175 prevents clients from accidentally creating duplicate commitments.
176
177 The request ID must be
178 a valid UUID with the exception that zero UUID is not supported
179 (00000000-0000-0000-0000-000000000000).
180 x__xgafv: string, V1 error format.
181 Allowed values
182 1 - v1 error format
183 2 - v2 error format
184
185 Returns:
186 An object of the form:
187
188 { # Represents an Operation resource.
189 #
190 # Google Compute Engine has three Operation resources:
191 #
192 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
193 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
194 # * [Zonal](/compute/docs/reference/rest/alpha/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;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
373 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
374 # this field will contain information on all underlying zonal actions and
375 # their state.
376 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
377 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
378 # Example key: zones/us-central1-a
379 &quot;a_key&quot;: {
380 &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
381 # populated.
382 # different programming environments, including REST APIs and RPC APIs. It is
383 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
384 # three pieces of data: error code, error message, and error details.
385 #
386 # You can find out more about this error model and how to work with it in the
387 # [API Design Guide](https://cloud.google.com/apis/design/errors).
388 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
389 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
390 # message types for APIs to use.
391 {
392 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
393 },
394 ],
395 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
396 # user-facing error message should be localized and sent in the
397 # google.rpc.Status.details field, or localized by the client.
398 },
399 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
400 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
401 },
402 },
403 },
404 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
405 # This value is inRFC3339
406 # text format.
407 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
408 # following:
409 # `PENDING`, `RUNNING`, or `DONE`.
410 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
411 # operation.
412 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
413 # of the target resource.
414 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
415 # operations related to creating a snapshot, this points to the disk
416 # that the snapshot was created from.
417 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
418 # `[email protected]` or
419 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
420 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
421 # operation, this field will be populated.
422 {
423 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
424 # Engine returns NO_RESULTS_ON_PAGE if there
425 # are no results in the response.
426 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
427 # value format. For example:
428 #
429 # &quot;data&quot;: [
430 # {
431 # &quot;key&quot;: &quot;scope&quot;,
432 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
433 # }
434 {
435 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
436 # returned. For example, for warnings where there are no results in a list
437 # request for a particular zone, this key might be scope and
438 # the key value might be the zone name. Other examples might be a key
439 # indicating a deprecated resource and a suggested replacement, or a
440 # warning about invalid network settings (for example, if an instance
441 # attempts to perform IP forwarding but is not enabled for IP forwarding).
442 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
443 },
444 ],
445 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
446 },
447 ],
448 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
449 # applicable when performing per-zone operations.
450 }</pre>
451 </div>
452
453 <div class="method">
454 <code class="details" id="addRule">addRule(securityPolicy, body=None, requestId=None, x__xgafv=None)</code>
455 <pre>Inserts a rule into a security policy.
456
457 Use this API to modify Cloud Armor policies. Previously, alpha and beta
458 versions of this API were used to modify firewall policies. This usage is
459 now disabled for most organizations. Use firewallPolicies.addRule instead.
460
461 Args:
462 securityPolicy: string, Name of the security policy to update. (required)
463 body: object, The request body.
464 The object takes the form of:
465
466 { # Represents a rule that describes one or more match conditions along with
467 # the action to be taken when traffic matches this condition (allow or deny).
468 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
469 # The following are the valid actions:
470 #
471 # - allow: allow access to target.
472 # - deny(STATUS): deny access to target, returns the
473 # HTTP response code specified. Valid values for `STATUS`
474 # are 403, 404, and 502.
475 # - rate_based_ban: limit client traffic to the configured
476 # threshold and ban the client if the traffic exceeds the threshold.
477 # Configure parameters for this action in RateLimitOptions. Requires
478 # rate_limit_options to be set.
479 # - redirect: redirect to a different target. This can
480 # either be an internal reCAPTCHA redirect, or an external URL-based
481 # redirect via a 302 response. Parameters for this action can be configured
482 # via redirectOptions. This action is only supported in Global Security
483 # Policies of type CLOUD_ARMOR.
484 # - throttle: limit
485 # client traffic to the configured threshold. Configure parameters for this
486 # action in rateLimitOptions. Requires rate_limit_options to be set for
487 # this.
488 # - fairshare (preview only): when traffic reaches the
489 # threshold limit, requests from the clients matching this rule begin to be
490 # rate-limited using the Fair Share algorithm. This action is only allowed
491 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
492 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
493 # create the resource.
494 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
495 # specified when versioned_expr is set to FIREWALL.
496 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
497 # enabled, logs will be exported to the configured export destination in
498 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
499 # cannot enable logging on &quot;goto_next&quot; rules.
500 #
501 # This field may only be specified when the versioned_expr is set to
502 # FIREWALL.
503 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
504 # This field is only supported in Global Security Policies of type
505 # CLOUD_ARMOR.
506 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
507 # present.
508 {
509 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
510 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
511 },
512 ],
513 },
514 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
515 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
516 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
517 # Exactly one field must be specified.
518 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
519 # This field must be specified if versioned_expr is specified and cannot
520 # be specified if versioned_expr is not specified.
521 &quot;destIpRanges&quot;: [ # CIDR IP address range.
522 #
523 # This field may only be specified when versioned_expr is set to
524 # FIREWALL.
525 &quot;A String&quot;,
526 ],
527 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
528 #
529 # This field may only be specified when versioned_expr is set to
530 # FIREWALL.
531 {
532 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
533 # required when creating a firewall rule. This value can either be
534 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
535 # protocol number.
536 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
537 # only applicable for UDP or TCP protocol. Each entry must be either
538 # an integer or a range. If not specified, this rule applies to
539 # connections through any port.
540 #
541 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
542 #
543 # This field may only be specified when versioned_expr is set to
544 # FIREWALL.
545 &quot;A String&quot;,
546 ],
547 },
548 ],
549 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
550 #
551 # This field may only be specified when versioned_expr is set to
552 # FIREWALL.
553 {
554 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
555 # required when creating a firewall rule. This value can either be
556 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
557 # protocol number.
558 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
559 # only applicable for UDP or TCP protocol. Each entry must be either
560 # an integer or a range. If not specified, this rule applies to
561 # connections through any port.
562 #
563 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
564 #
565 # This field may only be specified when versioned_expr is set to
566 # FIREWALL.
567 &quot;A String&quot;,
568 ],
569 },
570 ],
571 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
572 # Maximum number of src_ip_ranges allowed is 10.
573 &quot;A String&quot;,
574 ],
575 },
576 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
577 # A CEVAL expression is used to specify match criteria such as origin.ip,
578 # source.region_code and contents in the request header.
579 # Expressions containing `evaluateThreatIntelligence` require a Cloud
580 # Armor Enterprise subscription and are not supported in Edge Policies
581 # nor in Regional Policies. Expressions containing
582 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
583 # Enterprise subscription and are only supported in Global Security
584 # Policies.
585 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
586 # are documented at https://github.com/google/cel-spec.
587 #
588 # Example (Comparison):
589 #
590 # title: &quot;Summary size limit&quot;
591 # description: &quot;Determines if a summary is less than 100 chars&quot;
592 # expression: &quot;document.summary.size() &lt; 100&quot;
593 #
594 # Example (Equality):
595 #
596 # title: &quot;Requestor is owner&quot;
597 # description: &quot;Determines if requestor is the document owner&quot;
598 # expression: &quot;document.owner == request.auth.claims.email&quot;
599 #
600 # Example (Logic):
601 #
602 # title: &quot;Public documents&quot;
603 # description: &quot;Determine whether the document should be publicly visible&quot;
604 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
605 #
606 # Example (Data Manipulation):
607 #
608 # title: &quot;Notification string&quot;
609 # description: &quot;Create a notification string with a timestamp.&quot;
610 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
611 #
612 # The exact variables and functions that may be referenced within an expression
613 # are determined by the service that evaluates it. See the service
614 # documentation for additional information.
615 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
616 # describes the expression, e.g. when hovered over it in a UI.
617 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
618 # syntax.
619 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
620 # reporting, e.g. a file name and a position in the file.
621 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
622 # its purpose. This can be used e.g. in UIs which allow to enter the
623 # expression.
624 },
625 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
626 # CEVAL expression (i.e., &#x27;expr&#x27;).
627 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
628 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
629 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
630 # action-tokens. The provided site keys need to be created from
631 # reCAPTCHA API under the same project where the security policy is
632 # created.
633 &quot;A String&quot;,
634 ],
635 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
636 # session-tokens. The provided site keys need to be created from
637 # reCAPTCHA API under the same project where the security policy is
638 # created.
639 &quot;A String&quot;,
640 ],
641 },
642 },
643 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
644 # If this field is specified, config must also be specified.
645 # Available preconfigured expressions along with their requirements are:
646 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
647 # config.
648 },
649 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
650 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
651 # &#x27;action&#x27; is enforced.
652 #
653 # The match criteria for a rule consists of built-in match fields (like
654 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
655 # (&#x27;userDefinedFields&#x27;).
656 #
657 # Field values may be extracted directly from the packet or derived from it
658 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
659 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
660 # header is found in the packet and the entire field is in bounds.
661 #
662 # Each match field may specify which values can match it, listing one or
663 # more ranges, prefixes, or exact values that are considered a match for
664 # the field. A field value must be present in order to match a specified
665 # match field. If no match values are specified for a match field, then any
666 # field value is considered to match it, and it&#x27;s not required to be
667 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
668 #
669 # For a packet to match a rule, all specified match fields must match the
670 # corresponding field values derived from the packet.
671 #
672 # Example:
673 #
674 # networkMatch:
675 # srcIpRanges:
676 # - &quot;192.0.2.0/24&quot;
677 # - &quot;198.51.100.0/24&quot;
678 # userDefinedFields:
679 # - name: &quot;ipv4_fragment_offset&quot;
680 # values:
681 # - &quot;1-0x1fff&quot;
682 #
683 # The above match condition matches packets with a source IP in
684 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
685 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
686 # against.
687 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
688 # format.
689 &quot;A String&quot;,
690 ],
691 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
692 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
693 &quot;A String&quot;,
694 ],
695 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
696 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
697 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
698 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
699 &quot;A String&quot;,
700 ],
701 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
702 42,
703 ],
704 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
705 &quot;A String&quot;,
706 ],
707 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
708 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
709 &quot;A String&quot;,
710 ],
711 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
712 # IP address.
713 &quot;A String&quot;,
714 ],
715 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
716 # matching values for that field.
717 {
718 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
719 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
720 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
721 # range (e.g. &quot;0x400-0x7ff&quot;).
722 &quot;A String&quot;,
723 ],
724 },
725 ],
726 },
727 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
728 # does not evaluate preconfigured WAF rules, i.e., if
729 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
730 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
731 {
732 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
733 # preconfigured WAF evaluation.
734 {
735 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
736 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
737 },
738 ],
739 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
740 # inspection during preconfigured WAF evaluation.
741 {
742 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
743 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
744 },
745 ],
746 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
747 # inspection during preconfigured WAF evaluation.
748 {
749 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
750 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
751 },
752 ],
753 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
754 # from inspection during preconfigured WAF evaluation. Note that the
755 # parameter can be in the query string or in the POST body.
756 {
757 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
758 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
759 },
760 ],
761 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
762 # inspection during preconfigured WAF evaluation. When specifying this
763 # field, the query or fragment part should be excluded.
764 {
765 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
766 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
767 },
768 ],
769 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
770 # preconfigured WAF exclusion. If omitted, it refers to all the rule
771 # IDs under the WAF rule set.
772 &quot;A String&quot;,
773 ],
774 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
775 },
776 ],
777 },
778 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
779 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
780 # must be a positive value between 0 and 2147483647.
781 # Rules are evaluated from highest to lowest priority where 0 is the
782 # highest priority and 2147483647 is the lowest priority.
783 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
784 # &quot;fairshare&quot;. Cannot be specified for any other actions.
785 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
786 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
787 # the traffic will continue to be banned by the rate limit after the
788 # rate falls below the threshold.
789 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
790 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
791 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
792 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
793 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
794 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
795 },
796 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
797 # threshold. Valid option is &quot;allow&quot; only.
798 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
799 # values are:
800 #
801 # - ALL: A single rate limit threshold is applied to all
802 # the requests matching this rule. This is the default value if
803 # &quot;enforceOnKey&quot; is not configured.
804 # - IP: The source IP address of
805 # the request is the key. Each IP has this limit enforced
806 # separately.
807 # - HTTP_HEADER: The value of the HTTP
808 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
809 # value is truncated to the first 128 bytes of the header value. If no
810 # such header is present in the request, the key type defaults toALL.
811 # - XFF_IP: The first IP address (i.e. the
812 # originating client IP address) specified in the list of IPs under
813 # X-Forwarded-For HTTP header. If no such header is present or the value
814 # is not a valid IP, the key defaults to the source IP address of
815 # the request i.e. key type IP.
816 # - HTTP_COOKIE: The value of the HTTP
817 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
818 # value is truncated to the first 128 bytes of the cookie value. If no
819 # such cookie is present in the request, the key type defaults toALL.
820 # - HTTP_PATH: The URL path of the HTTP request. The key
821 # value is truncated to the first 128 bytes.
822 # - SNI: Server name indication in the TLS session of the
823 # HTTPS request. The key value is truncated to the first 128 bytes. The
824 # key type defaults to ALL on a HTTP session.
825 # - REGION_CODE: The country/region from which the request
826 # originates.
827 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
828 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
829 # key type defaults to ALL.
830 # - USER_IP: The IP address of the originating client,
831 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
832 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
833 # an IP address cannot be resolved from it, the key type defaults toIP.
834 #
835 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
836 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
837 # key type defaults to ALL.
838 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
839 # limit threshold is enforced for all the requests matching the rule.
840 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
841 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
842 # ratelimit threshold/action is enforced. You can specify up to 3
843 # enforce_on_key_configs. If enforce_on_key_configs is specified,
844 # enforce_on_key must not be specified.
845 {
846 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
847 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
848 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
849 # taken as the key value.
850 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
851 # values are:
852 #
853 # - ALL: A single rate limit threshold is applied to all
854 # the requests matching this rule. This is the default value if
855 # &quot;enforceOnKeyConfigs&quot; is not configured.
856 # - IP: The source IP address of
857 # the request is the key. Each IP has this limit enforced
858 # separately.
859 # - HTTP_HEADER: The value of the HTTP
860 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
861 # value is truncated to the first 128 bytes of the header value. If no
862 # such header is present in the request, the key type defaults toALL.
863 # - XFF_IP: The first IP address (i.e. the
864 # originating client IP address) specified in the list of IPs under
865 # X-Forwarded-For HTTP header. If no such header is present or the
866 # value is not a valid IP, the key defaults to the source IP address of
867 # the request i.e. key type IP.
868 # - HTTP_COOKIE: The value of the HTTP
869 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
870 # value is truncated to the first 128 bytes of the cookie value. If no
871 # such cookie is present in the request, the key type defaults toALL.
872 # - HTTP_PATH: The URL path of the HTTP request. The key
873 # value is truncated to the first 128 bytes.
874 # - SNI: Server name indication in the TLS session of
875 # the HTTPS request. The key value is truncated to the first 128 bytes.
876 # The key type defaults to ALL on a HTTP session.
877 # - REGION_CODE: The country/region from which the
878 # request originates.
879 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
880 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
881 # key type defaults to ALL.
882 # - USER_IP: The IP address of the originating client,
883 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
884 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
885 # or an IP address cannot be resolved from it, the key type defaults toIP.
886 #
887 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
888 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
889 # key type defaults to ALL.
890 },
891 ],
892 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
893 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
894 # value.
895 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
896 # value.
897 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
898 # threshold, to either deny with a specified HTTP response code, or
899 # redirect to a different endpoint.
900 # Valid options are `deny(STATUS)`, where valid values for
901 # `STATUS` are 403, 404, 429, and 502, and
902 # `redirect`, where the redirect parameters come from
903 # `exceedRedirectOptions` below.
904 # The `redirect` action is only supported in Global Security Policies of
905 # type CLOUD_ARMOR.
906 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
907 # above the configured rate limit threshold
908 &quot;code&quot;: 42, # The status code, which should be an enum value of
909 # google.rpc.Code.
910 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
911 },
912 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
913 # action. Cannot be specified if the exceed action is not redirect.
914 # This field is only supported in Global Security Policies of type
915 # CLOUD_ARMOR.
916 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
917 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
918 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
919 #
920 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
921 # challenge assessment.
922 # - EXTERNAL_302: redirect to a different URL via a 302
923 # response.
924 },
925 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
926 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
927 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
928 },
929 },
930 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
931 # other actions.
932 # This field is only supported in Global Security Policies of type
933 # CLOUD_ARMOR.
934 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
935 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
936 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
937 #
938 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
939 # challenge assessment.
940 # - EXTERNAL_302: redirect to a different URL via a 302
941 # response.
942 },
943 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
944 # other actions.
945 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
946 # rule.
947 # [Deprecated] Use requiredManagedProtectionTiers instead.
948 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
949 # policy. This can only be set during rule creation, if rule number is not
950 # specified it will be generated by the server.
951 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
952 # policy rule.
953 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
954 # allows you to control which network&#x27;s VMs get this rule. If this field
955 # is left blank, all VMs within the organization will receive the rule.
956 #
957 # This field may only be specified when versioned_expr is set to FIREWALL.
958 &quot;A String&quot;,
959 ],
960 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
961 # applied with this rule.
962 &quot;A String&quot;,
963 ],
964 }
965
966 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
967 that if you must retry your request, the server will know to ignore the
968 request if it has already been completed.
969
970 For example, consider a situation where you make an initial request and
971 the request times out. If you make the request again with the same
972 request ID, the server can check if original operation with the same
973 request ID was received, and if so, will ignore the second request. This
974 prevents clients from accidentally creating duplicate commitments.
975
976 The request ID must be
977 a valid UUID with the exception that zero UUID is not supported
978 (00000000-0000-0000-0000-000000000000).
979 x__xgafv: string, V1 error format.
980 Allowed values
981 1 - v1 error format
982 2 - v2 error format
983
984 Returns:
985 An object of the form:
986
987 { # Represents an Operation resource.
988 #
989 # Google Compute Engine has three Operation resources:
990 #
991 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
992 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
993 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
994 #
995 # You can use an operation resource to manage asynchronous API requests.
996 # For more information, readHandling
997 # API responses.
998 #
999 # Operations can be global, regional or zonal.
1000 #
1001 # - For global operations, use the `globalOperations`
1002 # resource.
1003 # - For regional operations, use the
1004 # `regionOperations` resource.
1005 # - For zonal operations, use
1006 # the `zoneOperations` resource.
1007 #
1008 #
1009 #
1010 # For more information, read
1011 # Global, Regional, and Zonal Resources.
1012 #
1013 # Note that completed Operation resources have a limited
1014 # retention period.
1015 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1016 # Not present otherwise.
1017 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1018 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1019 # set when the operation is created.
1020 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1021 # text format.
1022 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1023 # this field will be populated.
1024 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1025 # operation.
1026 {
1027 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1028 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1029 # details. There is a set of defined message types to use for providing
1030 # details.The syntax depends on the error code. For example,
1031 # QuotaExceededInfo will have details when the error code is
1032 # QUOTA_EXCEEDED.
1033 {
1034 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1035 #
1036 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1037 # is not enabled:
1038 #
1039 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1040 # &quot;domain&quot;: &quot;googleapis.com&quot;
1041 # &quot;metadata&quot;: {
1042 # &quot;resource&quot;: &quot;projects/123&quot;,
1043 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1044 # }
1045 # }
1046 #
1047 # This response indicates that the pubsub.googleapis.com API is not enabled.
1048 #
1049 # Example of an error that is returned when attempting to create a Spanner
1050 # instance in a region that is out of stock:
1051 #
1052 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1053 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1054 # &quot;metadata&quot;: {
1055 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1056 # }
1057 # }
1058 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1059 # is typically the registered service name of the tool or product that
1060 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1061 # generated by some common infrastructure, the error domain must be a
1062 # globally unique value that identifies the infrastructure. For Google API
1063 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1064 &quot;metadatas&quot;: { # Additional structured details about this error.
1065 #
1066 # Keys must match a regular expression of `a-z+` but should
1067 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1068 # length. When identifying the current value of an exceeded limit, the units
1069 # should be contained in the key, not the value. For example, rather than
1070 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1071 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1072 # instances that can be created in a single (batch) request.
1073 &quot;a_key&quot;: &quot;A String&quot;,
1074 },
1075 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1076 # proximate cause of the error. Error reasons are unique within a particular
1077 # domain of errors. This should be at most 63 characters and match a
1078 # regular expression of `A-Z+[A-Z0-9]`, which represents
1079 # UPPER_SNAKE_CASE.
1080 },
1081 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1082 #
1083 # For example, if a quota check failed with an error indicating the calling
1084 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1085 # directly to the right place in the developer console to flip the bit.
1086 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1087 { # Describes a URL link.
1088 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1089 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1090 },
1091 ],
1092 },
1093 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1094 # which can be attached to an RPC error.
1095 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1096 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1097 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1098 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1099 },
1100 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1101 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1102 &quot;a_key&quot;: &quot;A String&quot;,
1103 },
1104 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1105 # type or metric.
1106 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1107 # or metric.
1108 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1109 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1110 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1111 },
1112 },
1113 ],
1114 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1115 # This property is optional.
1116 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1117 },
1118 ],
1119 },
1120 &quot;getVersionOperationMetadata&quot;: {
1121 &quot;inlineSbomInfo&quot;: {
1122 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1123 # appropriate identifiers.
1124 &quot;a_key&quot;: &quot;A String&quot;,
1125 },
1126 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1127 # identifiers.
1128 &quot;a_key&quot;: &quot;A String&quot;,
1129 },
1130 },
1131 },
1132 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1133 # message that was returned, such as `NOT FOUND`.
1134 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1135 # status code that was returned. For example, a `404` means the
1136 # resource was not found.
1137 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1138 # defined by the server.
1139 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1140 # This value is inRFC3339
1141 # text format.
1142 &quot;instancesBulkInsertOperationMetadata&quot;: {
1143 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1144 # Example key: zones/us-central1-a
1145 &quot;a_key&quot;: {
1146 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1147 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1148 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1149 # error.
1150 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1151 # if the flow is rolling forward or rolling back.
1152 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1153 },
1154 },
1155 },
1156 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1157 # Operation resources.
1158 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1159 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1160 # group of operations results from a `bulkInsert` API request.
1161 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1162 # `update`, or `delete`, and so on.
1163 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1164 # There is no requirement that this be linear or support any granularity of
1165 # operations. This should not be used to guess when the operation will be
1166 # complete. This number should monotonically increase as the operation
1167 # progresses.
1168 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1169 # applicable when performing regional operations.
1170 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1171 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
1172 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1173 # this field will contain information on all underlying zonal actions and
1174 # their state.
1175 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1176 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1177 # Example key: zones/us-central1-a
1178 &quot;a_key&quot;: {
1179 &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
1180 # populated.
1181 # different programming environments, including REST APIs and RPC APIs. It is
1182 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1183 # three pieces of data: error code, error message, and error details.
1184 #
1185 # You can find out more about this error model and how to work with it in the
1186 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1187 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1188 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1189 # message types for APIs to use.
1190 {
1191 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1192 },
1193 ],
1194 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1195 # user-facing error message should be localized and sent in the
1196 # google.rpc.Status.details field, or localized by the client.
1197 },
1198 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1199 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1200 },
1201 },
1202 },
1203 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1204 # This value is inRFC3339
1205 # text format.
1206 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1207 # following:
1208 # `PENDING`, `RUNNING`, or `DONE`.
1209 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1210 # operation.
1211 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1212 # of the target resource.
1213 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1214 # operations related to creating a snapshot, this points to the disk
1215 # that the snapshot was created from.
1216 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1217 # `[email protected]` or
1218 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1219 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1220 # operation, this field will be populated.
1221 {
1222 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1223 # Engine returns NO_RESULTS_ON_PAGE if there
1224 # are no results in the response.
1225 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1226 # value format. For example:
1227 #
1228 # &quot;data&quot;: [
1229 # {
1230 # &quot;key&quot;: &quot;scope&quot;,
1231 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1232 # }
1233 {
1234 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1235 # returned. For example, for warnings where there are no results in a list
1236 # request for a particular zone, this key might be scope and
1237 # the key value might be the zone name. Other examples might be a key
1238 # indicating a deprecated resource and a suggested replacement, or a
1239 # warning about invalid network settings (for example, if an instance
1240 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1241 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1242 },
1243 ],
1244 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1245 },
1246 ],
1247 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1248 # applicable when performing per-zone operations.
1249 }</pre>
1250 </div>
1251
1252 <div class="method">
1253 <code class="details" id="close">close()</code>
1254 <pre>Close httplib2 connections.</pre>
1255 </div>
1256
1257 <div class="method">
1258 <code class="details" id="copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</code>
1259 <pre>Copies rules to the specified security policy.
1260
1261 Use this API to modify Cloud Armor policies. Previously, alpha and beta
1262 versions of this API were used to modify firewall policies. This usage is
1263 now disabled for most organizations. Use firewallPolicies.cloneRules
1264 instead.
1265
1266 Args:
1267 securityPolicy: string, Name of the security policy to update. (required)
1268 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1269 that if you must retry your request, the server will know to ignore the
1270 request if it has already been completed.
1271
1272 For example, consider a situation where you make an initial request and
1273 the request times out. If you make the request again with the same
1274 request ID, the server can check if original operation with the same
1275 request ID was received, and if so, will ignore the second request. This
1276 prevents clients from accidentally creating duplicate commitments.
1277
1278 The request ID must be
1279 a valid UUID with the exception that zero UUID is not supported
1280 (00000000-0000-0000-0000-000000000000).
1281 sourceSecurityPolicy: string, The security policy from which to copy rules.
1282 x__xgafv: string, V1 error format.
1283 Allowed values
1284 1 - v1 error format
1285 2 - v2 error format
1286
1287 Returns:
1288 An object of the form:
1289
1290 { # Represents an Operation resource.
1291 #
1292 # Google Compute Engine has three Operation resources:
1293 #
1294 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
1295 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
1296 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
1297 #
1298 # You can use an operation resource to manage asynchronous API requests.
1299 # For more information, readHandling
1300 # API responses.
1301 #
1302 # Operations can be global, regional or zonal.
1303 #
1304 # - For global operations, use the `globalOperations`
1305 # resource.
1306 # - For regional operations, use the
1307 # `regionOperations` resource.
1308 # - For zonal operations, use
1309 # the `zoneOperations` resource.
1310 #
1311 #
1312 #
1313 # For more information, read
1314 # Global, Regional, and Zonal Resources.
1315 #
1316 # Note that completed Operation resources have a limited
1317 # retention period.
1318 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1319 # Not present otherwise.
1320 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1321 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1322 # set when the operation is created.
1323 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1324 # text format.
1325 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1326 # this field will be populated.
1327 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1328 # operation.
1329 {
1330 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1331 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1332 # details. There is a set of defined message types to use for providing
1333 # details.The syntax depends on the error code. For example,
1334 # QuotaExceededInfo will have details when the error code is
1335 # QUOTA_EXCEEDED.
1336 {
1337 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1338 #
1339 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1340 # is not enabled:
1341 #
1342 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1343 # &quot;domain&quot;: &quot;googleapis.com&quot;
1344 # &quot;metadata&quot;: {
1345 # &quot;resource&quot;: &quot;projects/123&quot;,
1346 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1347 # }
1348 # }
1349 #
1350 # This response indicates that the pubsub.googleapis.com API is not enabled.
1351 #
1352 # Example of an error that is returned when attempting to create a Spanner
1353 # instance in a region that is out of stock:
1354 #
1355 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1356 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1357 # &quot;metadata&quot;: {
1358 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1359 # }
1360 # }
1361 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1362 # is typically the registered service name of the tool or product that
1363 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1364 # generated by some common infrastructure, the error domain must be a
1365 # globally unique value that identifies the infrastructure. For Google API
1366 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1367 &quot;metadatas&quot;: { # Additional structured details about this error.
1368 #
1369 # Keys must match a regular expression of `a-z+` but should
1370 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1371 # length. When identifying the current value of an exceeded limit, the units
1372 # should be contained in the key, not the value. For example, rather than
1373 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1374 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1375 # instances that can be created in a single (batch) request.
1376 &quot;a_key&quot;: &quot;A String&quot;,
1377 },
1378 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1379 # proximate cause of the error. Error reasons are unique within a particular
1380 # domain of errors. This should be at most 63 characters and match a
1381 # regular expression of `A-Z+[A-Z0-9]`, which represents
1382 # UPPER_SNAKE_CASE.
1383 },
1384 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1385 #
1386 # For example, if a quota check failed with an error indicating the calling
1387 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1388 # directly to the right place in the developer console to flip the bit.
1389 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1390 { # Describes a URL link.
1391 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1392 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1393 },
1394 ],
1395 },
1396 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1397 # which can be attached to an RPC error.
1398 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1399 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1400 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1401 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1402 },
1403 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1404 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1405 &quot;a_key&quot;: &quot;A String&quot;,
1406 },
1407 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1408 # type or metric.
1409 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1410 # or metric.
1411 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1412 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1413 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1414 },
1415 },
1416 ],
1417 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1418 # This property is optional.
1419 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1420 },
1421 ],
1422 },
1423 &quot;getVersionOperationMetadata&quot;: {
1424 &quot;inlineSbomInfo&quot;: {
1425 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1426 # appropriate identifiers.
1427 &quot;a_key&quot;: &quot;A String&quot;,
1428 },
1429 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1430 # identifiers.
1431 &quot;a_key&quot;: &quot;A String&quot;,
1432 },
1433 },
1434 },
1435 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1436 # message that was returned, such as `NOT FOUND`.
1437 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1438 # status code that was returned. For example, a `404` means the
1439 # resource was not found.
1440 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1441 # defined by the server.
1442 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1443 # This value is inRFC3339
1444 # text format.
1445 &quot;instancesBulkInsertOperationMetadata&quot;: {
1446 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1447 # Example key: zones/us-central1-a
1448 &quot;a_key&quot;: {
1449 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1450 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1451 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1452 # error.
1453 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1454 # if the flow is rolling forward or rolling back.
1455 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1456 },
1457 },
1458 },
1459 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1460 # Operation resources.
1461 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1462 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1463 # group of operations results from a `bulkInsert` API request.
1464 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1465 # `update`, or `delete`, and so on.
1466 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1467 # There is no requirement that this be linear or support any granularity of
1468 # operations. This should not be used to guess when the operation will be
1469 # complete. This number should monotonically increase as the operation
1470 # progresses.
1471 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1472 # applicable when performing regional operations.
1473 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1474 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
1475 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1476 # this field will contain information on all underlying zonal actions and
1477 # their state.
1478 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1479 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1480 # Example key: zones/us-central1-a
1481 &quot;a_key&quot;: {
1482 &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
1483 # populated.
1484 # different programming environments, including REST APIs and RPC APIs. It is
1485 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1486 # three pieces of data: error code, error message, and error details.
1487 #
1488 # You can find out more about this error model and how to work with it in the
1489 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1490 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1491 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1492 # message types for APIs to use.
1493 {
1494 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1495 },
1496 ],
1497 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1498 # user-facing error message should be localized and sent in the
1499 # google.rpc.Status.details field, or localized by the client.
1500 },
1501 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1502 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1503 },
1504 },
1505 },
1506 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1507 # This value is inRFC3339
1508 # text format.
1509 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1510 # following:
1511 # `PENDING`, `RUNNING`, or `DONE`.
1512 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1513 # operation.
1514 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1515 # of the target resource.
1516 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1517 # operations related to creating a snapshot, this points to the disk
1518 # that the snapshot was created from.
1519 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1520 # `[email protected]` or
1521 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1522 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1523 # operation, this field will be populated.
1524 {
1525 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1526 # Engine returns NO_RESULTS_ON_PAGE if there
1527 # are no results in the response.
1528 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1529 # value format. For example:
1530 #
1531 # &quot;data&quot;: [
1532 # {
1533 # &quot;key&quot;: &quot;scope&quot;,
1534 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1535 # }
1536 {
1537 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1538 # returned. For example, for warnings where there are no results in a list
1539 # request for a particular zone, this key might be scope and
1540 # the key value might be the zone name. Other examples might be a key
1541 # indicating a deprecated resource and a suggested replacement, or a
1542 # warning about invalid network settings (for example, if an instance
1543 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1544 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1545 },
1546 ],
1547 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1548 },
1549 ],
1550 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1551 # applicable when performing per-zone operations.
1552 }</pre>
1553 </div>
1554
1555 <div class="method">
1556 <code class="details" id="delete">delete(securityPolicy, requestId=None, x__xgafv=None)</code>
1557 <pre>Deletes the specified policy.
1558
1559 Use this API to remove Cloud Armor policies. Previously, alpha and beta
1560 versions of this API were used to remove firewall policies. This usage is
1561 now disabled for most organizations. Use firewallPolicies.delete instead.
1562
1563 Args:
1564 securityPolicy: string, Name of the security policy to delete. (required)
1565 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1566 that if you must retry your request, the server will know to ignore the
1567 request if it has already been completed.
1568
1569 For example, consider a situation where you make an initial request and
1570 the request times out. If you make the request again with the same
1571 request ID, the server can check if original operation with the same
1572 request ID was received, and if so, will ignore the second request. This
1573 prevents clients from accidentally creating duplicate commitments.
1574
1575 The request ID must be
1576 a valid UUID with the exception that zero UUID is not supported
1577 (00000000-0000-0000-0000-000000000000).
1578 x__xgafv: string, V1 error format.
1579 Allowed values
1580 1 - v1 error format
1581 2 - v2 error format
1582
1583 Returns:
1584 An object of the form:
1585
1586 { # Represents an Operation resource.
1587 #
1588 # Google Compute Engine has three Operation resources:
1589 #
1590 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
1591 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
1592 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
1593 #
1594 # You can use an operation resource to manage asynchronous API requests.
1595 # For more information, readHandling
1596 # API responses.
1597 #
1598 # Operations can be global, regional or zonal.
1599 #
1600 # - For global operations, use the `globalOperations`
1601 # resource.
1602 # - For regional operations, use the
1603 # `regionOperations` resource.
1604 # - For zonal operations, use
1605 # the `zoneOperations` resource.
1606 #
1607 #
1608 #
1609 # For more information, read
1610 # Global, Regional, and Zonal Resources.
1611 #
1612 # Note that completed Operation resources have a limited
1613 # retention period.
1614 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1615 # Not present otherwise.
1616 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1617 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1618 # set when the operation is created.
1619 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1620 # text format.
1621 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1622 # this field will be populated.
1623 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1624 # operation.
1625 {
1626 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1627 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1628 # details. There is a set of defined message types to use for providing
1629 # details.The syntax depends on the error code. For example,
1630 # QuotaExceededInfo will have details when the error code is
1631 # QUOTA_EXCEEDED.
1632 {
1633 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1634 #
1635 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1636 # is not enabled:
1637 #
1638 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1639 # &quot;domain&quot;: &quot;googleapis.com&quot;
1640 # &quot;metadata&quot;: {
1641 # &quot;resource&quot;: &quot;projects/123&quot;,
1642 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1643 # }
1644 # }
1645 #
1646 # This response indicates that the pubsub.googleapis.com API is not enabled.
1647 #
1648 # Example of an error that is returned when attempting to create a Spanner
1649 # instance in a region that is out of stock:
1650 #
1651 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1652 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1653 # &quot;metadata&quot;: {
1654 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1655 # }
1656 # }
1657 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1658 # is typically the registered service name of the tool or product that
1659 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1660 # generated by some common infrastructure, the error domain must be a
1661 # globally unique value that identifies the infrastructure. For Google API
1662 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1663 &quot;metadatas&quot;: { # Additional structured details about this error.
1664 #
1665 # Keys must match a regular expression of `a-z+` but should
1666 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1667 # length. When identifying the current value of an exceeded limit, the units
1668 # should be contained in the key, not the value. For example, rather than
1669 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1670 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1671 # instances that can be created in a single (batch) request.
1672 &quot;a_key&quot;: &quot;A String&quot;,
1673 },
1674 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1675 # proximate cause of the error. Error reasons are unique within a particular
1676 # domain of errors. This should be at most 63 characters and match a
1677 # regular expression of `A-Z+[A-Z0-9]`, which represents
1678 # UPPER_SNAKE_CASE.
1679 },
1680 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1681 #
1682 # For example, if a quota check failed with an error indicating the calling
1683 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1684 # directly to the right place in the developer console to flip the bit.
1685 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1686 { # Describes a URL link.
1687 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1688 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1689 },
1690 ],
1691 },
1692 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1693 # which can be attached to an RPC error.
1694 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1695 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1696 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1697 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1698 },
1699 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1700 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1701 &quot;a_key&quot;: &quot;A String&quot;,
1702 },
1703 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1704 # type or metric.
1705 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1706 # or metric.
1707 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1708 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1709 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1710 },
1711 },
1712 ],
1713 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1714 # This property is optional.
1715 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1716 },
1717 ],
1718 },
1719 &quot;getVersionOperationMetadata&quot;: {
1720 &quot;inlineSbomInfo&quot;: {
1721 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1722 # appropriate identifiers.
1723 &quot;a_key&quot;: &quot;A String&quot;,
1724 },
1725 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1726 # identifiers.
1727 &quot;a_key&quot;: &quot;A String&quot;,
1728 },
1729 },
1730 },
1731 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1732 # message that was returned, such as `NOT FOUND`.
1733 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1734 # status code that was returned. For example, a `404` means the
1735 # resource was not found.
1736 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1737 # defined by the server.
1738 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1739 # This value is inRFC3339
1740 # text format.
1741 &quot;instancesBulkInsertOperationMetadata&quot;: {
1742 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1743 # Example key: zones/us-central1-a
1744 &quot;a_key&quot;: {
1745 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1746 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1747 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1748 # error.
1749 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1750 # if the flow is rolling forward or rolling back.
1751 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1752 },
1753 },
1754 },
1755 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1756 # Operation resources.
1757 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1758 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1759 # group of operations results from a `bulkInsert` API request.
1760 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1761 # `update`, or `delete`, and so on.
1762 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1763 # There is no requirement that this be linear or support any granularity of
1764 # operations. This should not be used to guess when the operation will be
1765 # complete. This number should monotonically increase as the operation
1766 # progresses.
1767 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1768 # applicable when performing regional operations.
1769 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1770 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
1771 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1772 # this field will contain information on all underlying zonal actions and
1773 # their state.
1774 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1775 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1776 # Example key: zones/us-central1-a
1777 &quot;a_key&quot;: {
1778 &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
1779 # populated.
1780 # different programming environments, including REST APIs and RPC APIs. It is
1781 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1782 # three pieces of data: error code, error message, and error details.
1783 #
1784 # You can find out more about this error model and how to work with it in the
1785 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1786 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1787 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1788 # message types for APIs to use.
1789 {
1790 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1791 },
1792 ],
1793 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1794 # user-facing error message should be localized and sent in the
1795 # google.rpc.Status.details field, or localized by the client.
1796 },
1797 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1798 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1799 },
1800 },
1801 },
1802 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1803 # This value is inRFC3339
1804 # text format.
1805 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1806 # following:
1807 # `PENDING`, `RUNNING`, or `DONE`.
1808 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1809 # operation.
1810 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1811 # of the target resource.
1812 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1813 # operations related to creating a snapshot, this points to the disk
1814 # that the snapshot was created from.
1815 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1816 # `[email protected]` or
1817 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1818 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1819 # operation, this field will be populated.
1820 {
1821 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1822 # Engine returns NO_RESULTS_ON_PAGE if there
1823 # are no results in the response.
1824 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1825 # value format. For example:
1826 #
1827 # &quot;data&quot;: [
1828 # {
1829 # &quot;key&quot;: &quot;scope&quot;,
1830 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1831 # }
1832 {
1833 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1834 # returned. For example, for warnings where there are no results in a list
1835 # request for a particular zone, this key might be scope and
1836 # the key value might be the zone name. Other examples might be a key
1837 # indicating a deprecated resource and a suggested replacement, or a
1838 # warning about invalid network settings (for example, if an instance
1839 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1840 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1841 },
1842 ],
1843 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1844 },
1845 ],
1846 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1847 # applicable when performing per-zone operations.
1848 }</pre>
1849 </div>
1850
1851 <div class="method">
1852 <code class="details" id="get">get(securityPolicy, x__xgafv=None)</code>
1853 <pre>List all of the ordered rules present in a single specified policy.
1854
1855 Use this API to read Cloud Armor policies. Previously, alpha and beta
1856 versions of this API were used to read firewall policies. This usage is now
1857 disabled for most organizations. Use firewallPolicies.get instead.
1858
1859 Args:
1860 securityPolicy: string, Name of the security policy to get. (required)
1861 x__xgafv: string, V1 error format.
1862 Allowed values
1863 1 - v1 error format
1864 2 - v2 error format
1865
1866 Returns:
1867 An object of the form:
1868
1869 { # Represents a Google Cloud Armor security policy resource.
1870 #
1871 # Only external backend services that use load balancers can
1872 # reference a security policy. For more information, see
1873 # Google Cloud Armor security policy overview.
1874 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
1875 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
1876 &quot;confidenceThreshold&quot;: 3.14,
1877 &quot;expirationSec&quot;: 42,
1878 &quot;impactedBaselineThreshold&quot;: 3.14,
1879 &quot;loadThreshold&quot;: 3.14,
1880 },
1881 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
1882 # This field is only supported in Global Security Policies of type
1883 # CLOUD_ARMOR.
1884 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
1885 # This field is only supported in Global Security Policies of type
1886 # CLOUD_ARMOR.
1887 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
1888 # STANDARD - opaque rules. (default)
1889 # PREMIUM - transparent rules.
1890 # This field is only supported in Global Security Policies of type
1891 # CLOUD_ARMOR.
1892 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
1893 # customizable thresholds.
1894 {
1895 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
1896 &quot;autoDeployExpirationSec&quot;: 42,
1897 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
1898 &quot;autoDeployLoadThreshold&quot;: 3.14,
1899 &quot;detectionAbsoluteQps&quot;: 3.14,
1900 &quot;detectionLoadThreshold&quot;: 3.14,
1901 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
1902 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
1903 # The name must be unique within the security policy.
1904 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
1905 # on specified granular traffic units.
1906 { # Configurations to specifc granular traffic units processed by
1907 # Adaptive Protection.
1908 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
1909 # type constitutes a separate traffic unit.
1910 # It can only be set to true if `value` is empty.
1911 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
1912 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
1913 },
1914 ],
1915 },
1916 ],
1917 },
1918 },
1919 &quot;advancedOptionsConfig&quot;: {
1920 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
1921 # json_parsing is set to STANDARD.
1922 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
1923 #
1924 # As per RFC 1341, a Content-Type header value has the following format:
1925 #
1926 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
1927 #
1928 # When configuring a custom Content-Type header value, only the
1929 # type/subtype needs to be specified, and the parameters should be
1930 # excluded.
1931 &quot;A String&quot;,
1932 ],
1933 },
1934 &quot;jsonParsing&quot;: &quot;A String&quot;,
1935 &quot;logLevel&quot;: &quot;A String&quot;,
1936 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
1937 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
1938 # Values are case insensitive.
1939 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
1940 # resolving the callers client IP address.
1941 &quot;A String&quot;,
1942 ],
1943 },
1944 &quot;associations&quot;: [ # A list of associations that belong to this policy.
1945 {
1946 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1947 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
1948 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
1949 &quot;A String&quot;,
1950 ],
1951 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
1952 &quot;A String&quot;,
1953 ],
1954 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1955 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
1956 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
1957 },
1958 ],
1959 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
1960 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
1961 },
1962 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1963 # text format.
1964 &quot;ddosProtectionConfig&quot;: {
1965 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
1966 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
1967 # builds DDoS mitigations that minimize collateral damage. It quantifies
1968 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
1969 # blocked.
1970 #
1971 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
1972 # not be deployed. Using a lower value will prioritize keeping collateral
1973 # damage low, possibly at the cost of its effectiveness in rate limiting
1974 # some or all of the attack. It should typically be unset, so Advanced DDoS
1975 # (and Adaptive Protection) uses the best mitigation it can find. Setting
1976 # the threshold is advised if there are logs for false positive detections
1977 # with high collateral damage, and will cause Advanced DDoS to attempt to
1978 # find a less aggressive rule that satisfies the constraint. If a suitable
1979 # rule cannot be found, the system falls back to either no mitigation for
1980 # smaller attacks or broader network throttles for larger ones.
1981 &quot;ddosProtection&quot;: &quot;A String&quot;,
1982 },
1983 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1984 # create the resource.
1985 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
1986 # unique in the organization in which the security policy is created. This
1987 # should only be used when SecurityPolicyType is FIREWALL.
1988 # The name must be 1-63 characters long, and comply with
1989 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
1990 # characters long and match the regular expression
1991 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
1992 # lowercase letter, and all following characters must be a dash, lowercase
1993 # letter, or digit, except the last character, which cannot be a dash.
1994 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
1995 # the metadata&#x27;s contents and used for optimistic locking. The
1996 # fingerprint is initially generated by Compute Engine and changes after
1997 # every request to modify or update metadata. You must always provide an
1998 # up-to-date fingerprint hash in order to update or change metadata,
1999 # otherwise the request will fail with error412 conditionNotMet.
2000 #
2001 # To see the latest fingerprint, make get() request to the
2002 # security policy.
2003 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
2004 # defined by the server.
2005 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
2006 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
2007 # is essentially a hash of the labels set used for optimistic locking. The
2008 # fingerprint is initially generated by Compute Engine and changes after
2009 # every request to modify or update labels. You must always provide an
2010 # up-to-date fingerprint hash in order to update or change labels.
2011 #
2012 # To see the latest fingerprint, make get() request to the
2013 # security policy.
2014 &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.
2015 # Label values may be empty.
2016 &quot;a_key&quot;: &quot;A String&quot;,
2017 },
2018 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
2019 # The name must be 1-63 characters long, and comply withRFC1035.
2020 # Specifically, the name must be 1-63 characters long and match the regular
2021 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
2022 # character must be a lowercase letter, and all following characters must
2023 # be a dash, lowercase letter, or digit, except the last character, which
2024 # cannot be a dash.
2025 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
2026 &quot;recaptchaOptionsConfig&quot;: {
2027 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
2028 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
2029 # the security policy. The specified site key needs to be created from the
2030 # reCAPTCHA API. The user is responsible for the validity of the specified
2031 # site key. If not specified, a Google-managed site key is used.
2032 # This field is only supported in Global Security Policies of type
2033 # CLOUD_ARMOR.
2034 },
2035 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
2036 # resides. This field is not applicable to global security policies.
2037 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
2038 # policy can not exceed a set number of tuples.
2039 &quot;rules&quot;: [ # A list of rules that belong to this policy.
2040 # There must always be a default rule which is a rule with priority
2041 # 2147483647 and match all condition (for the match condition this means
2042 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
2043 # must be either match &quot;*&quot; or not set). If no rules are provided when
2044 # creating a security policy, a default rule with action &quot;allow&quot; will be
2045 # added.
2046 { # Represents a rule that describes one or more match conditions along with
2047 # the action to be taken when traffic matches this condition (allow or deny).
2048 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2049 # The following are the valid actions:
2050 #
2051 # - allow: allow access to target.
2052 # - deny(STATUS): deny access to target, returns the
2053 # HTTP response code specified. Valid values for `STATUS`
2054 # are 403, 404, and 502.
2055 # - rate_based_ban: limit client traffic to the configured
2056 # threshold and ban the client if the traffic exceeds the threshold.
2057 # Configure parameters for this action in RateLimitOptions. Requires
2058 # rate_limit_options to be set.
2059 # - redirect: redirect to a different target. This can
2060 # either be an internal reCAPTCHA redirect, or an external URL-based
2061 # redirect via a 302 response. Parameters for this action can be configured
2062 # via redirectOptions. This action is only supported in Global Security
2063 # Policies of type CLOUD_ARMOR.
2064 # - throttle: limit
2065 # client traffic to the configured threshold. Configure parameters for this
2066 # action in rateLimitOptions. Requires rate_limit_options to be set for
2067 # this.
2068 # - fairshare (preview only): when traffic reaches the
2069 # threshold limit, requests from the clients matching this rule begin to be
2070 # rate-limited using the Fair Share algorithm. This action is only allowed
2071 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2072 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2073 # create the resource.
2074 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
2075 # specified when versioned_expr is set to FIREWALL.
2076 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
2077 # enabled, logs will be exported to the configured export destination in
2078 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
2079 # cannot enable logging on &quot;goto_next&quot; rules.
2080 #
2081 # This field may only be specified when the versioned_expr is set to
2082 # FIREWALL.
2083 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2084 # This field is only supported in Global Security Policies of type
2085 # CLOUD_ARMOR.
2086 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2087 # present.
2088 {
2089 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2090 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2091 },
2092 ],
2093 },
2094 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2095 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2096 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2097 # Exactly one field must be specified.
2098 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2099 # This field must be specified if versioned_expr is specified and cannot
2100 # be specified if versioned_expr is not specified.
2101 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2102 #
2103 # This field may only be specified when versioned_expr is set to
2104 # FIREWALL.
2105 &quot;A String&quot;,
2106 ],
2107 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2108 #
2109 # This field may only be specified when versioned_expr is set to
2110 # FIREWALL.
2111 {
2112 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2113 # required when creating a firewall rule. This value can either be
2114 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2115 # protocol number.
2116 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2117 # only applicable for UDP or TCP protocol. Each entry must be either
2118 # an integer or a range. If not specified, this rule applies to
2119 # connections through any port.
2120 #
2121 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2122 #
2123 # This field may only be specified when versioned_expr is set to
2124 # FIREWALL.
2125 &quot;A String&quot;,
2126 ],
2127 },
2128 ],
2129 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2130 #
2131 # This field may only be specified when versioned_expr is set to
2132 # FIREWALL.
2133 {
2134 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2135 # required when creating a firewall rule. This value can either be
2136 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2137 # protocol number.
2138 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2139 # only applicable for UDP or TCP protocol. Each entry must be either
2140 # an integer or a range. If not specified, this rule applies to
2141 # connections through any port.
2142 #
2143 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2144 #
2145 # This field may only be specified when versioned_expr is set to
2146 # FIREWALL.
2147 &quot;A String&quot;,
2148 ],
2149 },
2150 ],
2151 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2152 # Maximum number of src_ip_ranges allowed is 10.
2153 &quot;A String&quot;,
2154 ],
2155 },
2156 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
2157 # A CEVAL expression is used to specify match criteria such as origin.ip,
2158 # source.region_code and contents in the request header.
2159 # Expressions containing `evaluateThreatIntelligence` require a Cloud
2160 # Armor Enterprise subscription and are not supported in Edge Policies
2161 # nor in Regional Policies. Expressions containing
2162 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
2163 # Enterprise subscription and are only supported in Global Security
2164 # Policies.
2165 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2166 # are documented at https://github.com/google/cel-spec.
2167 #
2168 # Example (Comparison):
2169 #
2170 # title: &quot;Summary size limit&quot;
2171 # description: &quot;Determines if a summary is less than 100 chars&quot;
2172 # expression: &quot;document.summary.size() &lt; 100&quot;
2173 #
2174 # Example (Equality):
2175 #
2176 # title: &quot;Requestor is owner&quot;
2177 # description: &quot;Determines if requestor is the document owner&quot;
2178 # expression: &quot;document.owner == request.auth.claims.email&quot;
2179 #
2180 # Example (Logic):
2181 #
2182 # title: &quot;Public documents&quot;
2183 # description: &quot;Determine whether the document should be publicly visible&quot;
2184 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2185 #
2186 # Example (Data Manipulation):
2187 #
2188 # title: &quot;Notification string&quot;
2189 # description: &quot;Create a notification string with a timestamp.&quot;
2190 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2191 #
2192 # The exact variables and functions that may be referenced within an expression
2193 # are determined by the service that evaluates it. See the service
2194 # documentation for additional information.
2195 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2196 # describes the expression, e.g. when hovered over it in a UI.
2197 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2198 # syntax.
2199 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2200 # reporting, e.g. a file name and a position in the file.
2201 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2202 # its purpose. This can be used e.g. in UIs which allow to enter the
2203 # expression.
2204 },
2205 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2206 # CEVAL expression (i.e., &#x27;expr&#x27;).
2207 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2208 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2209 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2210 # action-tokens. The provided site keys need to be created from
2211 # reCAPTCHA API under the same project where the security policy is
2212 # created.
2213 &quot;A String&quot;,
2214 ],
2215 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2216 # session-tokens. The provided site keys need to be created from
2217 # reCAPTCHA API under the same project where the security policy is
2218 # created.
2219 &quot;A String&quot;,
2220 ],
2221 },
2222 },
2223 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2224 # If this field is specified, config must also be specified.
2225 # Available preconfigured expressions along with their requirements are:
2226 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2227 # config.
2228 },
2229 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2230 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2231 # &#x27;action&#x27; is enforced.
2232 #
2233 # The match criteria for a rule consists of built-in match fields (like
2234 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2235 # (&#x27;userDefinedFields&#x27;).
2236 #
2237 # Field values may be extracted directly from the packet or derived from it
2238 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
2239 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
2240 # header is found in the packet and the entire field is in bounds.
2241 #
2242 # Each match field may specify which values can match it, listing one or
2243 # more ranges, prefixes, or exact values that are considered a match for
2244 # the field. A field value must be present in order to match a specified
2245 # match field. If no match values are specified for a match field, then any
2246 # field value is considered to match it, and it&#x27;s not required to be
2247 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
2248 #
2249 # For a packet to match a rule, all specified match fields must match the
2250 # corresponding field values derived from the packet.
2251 #
2252 # Example:
2253 #
2254 # networkMatch:
2255 # srcIpRanges:
2256 # - &quot;192.0.2.0/24&quot;
2257 # - &quot;198.51.100.0/24&quot;
2258 # userDefinedFields:
2259 # - name: &quot;ipv4_fragment_offset&quot;
2260 # values:
2261 # - &quot;1-0x1fff&quot;
2262 #
2263 # The above match condition matches packets with a source IP in
2264 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
2265 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
2266 # against.
2267 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
2268 # format.
2269 &quot;A String&quot;,
2270 ],
2271 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2272 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2273 &quot;A String&quot;,
2274 ],
2275 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
2276 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
2277 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
2278 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
2279 &quot;A String&quot;,
2280 ],
2281 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
2282 42,
2283 ],
2284 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
2285 &quot;A String&quot;,
2286 ],
2287 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2288 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2289 &quot;A String&quot;,
2290 ],
2291 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
2292 # IP address.
2293 &quot;A String&quot;,
2294 ],
2295 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
2296 # matching values for that field.
2297 {
2298 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
2299 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
2300 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
2301 # range (e.g. &quot;0x400-0x7ff&quot;).
2302 &quot;A String&quot;,
2303 ],
2304 },
2305 ],
2306 },
2307 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
2308 # does not evaluate preconfigured WAF rules, i.e., if
2309 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
2310 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
2311 {
2312 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
2313 # preconfigured WAF evaluation.
2314 {
2315 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2316 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2317 },
2318 ],
2319 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
2320 # inspection during preconfigured WAF evaluation.
2321 {
2322 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2323 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2324 },
2325 ],
2326 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
2327 # inspection during preconfigured WAF evaluation.
2328 {
2329 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2330 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2331 },
2332 ],
2333 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
2334 # from inspection during preconfigured WAF evaluation. Note that the
2335 # parameter can be in the query string or in the POST body.
2336 {
2337 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2338 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2339 },
2340 ],
2341 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
2342 # inspection during preconfigured WAF evaluation. When specifying this
2343 # field, the query or fragment part should be excluded.
2344 {
2345 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2346 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2347 },
2348 ],
2349 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
2350 # preconfigured WAF exclusion. If omitted, it refers to all the rule
2351 # IDs under the WAF rule set.
2352 &quot;A String&quot;,
2353 ],
2354 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
2355 },
2356 ],
2357 },
2358 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2359 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
2360 # must be a positive value between 0 and 2147483647.
2361 # Rules are evaluated from highest to lowest priority where 0 is the
2362 # highest priority and 2147483647 is the lowest priority.
2363 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
2364 # &quot;fairshare&quot;. Cannot be specified for any other actions.
2365 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
2366 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
2367 # the traffic will continue to be banned by the rate limit after the
2368 # rate falls below the threshold.
2369 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
2370 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
2371 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
2372 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2373 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2374 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2375 },
2376 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
2377 # threshold. Valid option is &quot;allow&quot; only.
2378 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2379 # values are:
2380 #
2381 # - ALL: A single rate limit threshold is applied to all
2382 # the requests matching this rule. This is the default value if
2383 # &quot;enforceOnKey&quot; is not configured.
2384 # - IP: The source IP address of
2385 # the request is the key. Each IP has this limit enforced
2386 # separately.
2387 # - HTTP_HEADER: The value of the HTTP
2388 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2389 # value is truncated to the first 128 bytes of the header value. If no
2390 # such header is present in the request, the key type defaults toALL.
2391 # - XFF_IP: The first IP address (i.e. the
2392 # originating client IP address) specified in the list of IPs under
2393 # X-Forwarded-For HTTP header. If no such header is present or the value
2394 # is not a valid IP, the key defaults to the source IP address of
2395 # the request i.e. key type IP.
2396 # - HTTP_COOKIE: The value of the HTTP
2397 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2398 # value is truncated to the first 128 bytes of the cookie value. If no
2399 # such cookie is present in the request, the key type defaults toALL.
2400 # - HTTP_PATH: The URL path of the HTTP request. The key
2401 # value is truncated to the first 128 bytes.
2402 # - SNI: Server name indication in the TLS session of the
2403 # HTTPS request. The key value is truncated to the first 128 bytes. The
2404 # key type defaults to ALL on a HTTP session.
2405 # - REGION_CODE: The country/region from which the request
2406 # originates.
2407 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2408 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2409 # key type defaults to ALL.
2410 # - USER_IP: The IP address of the originating client,
2411 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2412 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
2413 # an IP address cannot be resolved from it, the key type defaults toIP.
2414 #
2415 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2416 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2417 # key type defaults to ALL.
2418 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
2419 # limit threshold is enforced for all the requests matching the rule.
2420 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
2421 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
2422 # ratelimit threshold/action is enforced. You can specify up to 3
2423 # enforce_on_key_configs. If enforce_on_key_configs is specified,
2424 # enforce_on_key must not be specified.
2425 {
2426 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2427 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
2428 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
2429 # taken as the key value.
2430 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2431 # values are:
2432 #
2433 # - ALL: A single rate limit threshold is applied to all
2434 # the requests matching this rule. This is the default value if
2435 # &quot;enforceOnKeyConfigs&quot; is not configured.
2436 # - IP: The source IP address of
2437 # the request is the key. Each IP has this limit enforced
2438 # separately.
2439 # - HTTP_HEADER: The value of the HTTP
2440 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2441 # value is truncated to the first 128 bytes of the header value. If no
2442 # such header is present in the request, the key type defaults toALL.
2443 # - XFF_IP: The first IP address (i.e. the
2444 # originating client IP address) specified in the list of IPs under
2445 # X-Forwarded-For HTTP header. If no such header is present or the
2446 # value is not a valid IP, the key defaults to the source IP address of
2447 # the request i.e. key type IP.
2448 # - HTTP_COOKIE: The value of the HTTP
2449 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2450 # value is truncated to the first 128 bytes of the cookie value. If no
2451 # such cookie is present in the request, the key type defaults toALL.
2452 # - HTTP_PATH: The URL path of the HTTP request. The key
2453 # value is truncated to the first 128 bytes.
2454 # - SNI: Server name indication in the TLS session of
2455 # the HTTPS request. The key value is truncated to the first 128 bytes.
2456 # The key type defaults to ALL on a HTTP session.
2457 # - REGION_CODE: The country/region from which the
2458 # request originates.
2459 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2460 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2461 # key type defaults to ALL.
2462 # - USER_IP: The IP address of the originating client,
2463 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2464 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
2465 # or an IP address cannot be resolved from it, the key type defaults toIP.
2466 #
2467 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2468 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2469 # key type defaults to ALL.
2470 },
2471 ],
2472 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2473 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
2474 # value.
2475 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
2476 # value.
2477 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
2478 # threshold, to either deny with a specified HTTP response code, or
2479 # redirect to a different endpoint.
2480 # Valid options are `deny(STATUS)`, where valid values for
2481 # `STATUS` are 403, 404, 429, and 502, and
2482 # `redirect`, where the redirect parameters come from
2483 # `exceedRedirectOptions` below.
2484 # The `redirect` action is only supported in Global Security Policies of
2485 # type CLOUD_ARMOR.
2486 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
2487 # above the configured rate limit threshold
2488 &quot;code&quot;: 42, # The status code, which should be an enum value of
2489 # google.rpc.Code.
2490 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
2491 },
2492 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
2493 # action. Cannot be specified if the exceed action is not redirect.
2494 # This field is only supported in Global Security Policies of type
2495 # CLOUD_ARMOR.
2496 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2497 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2498 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2499 #
2500 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2501 # challenge assessment.
2502 # - EXTERNAL_302: redirect to a different URL via a 302
2503 # response.
2504 },
2505 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
2506 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2507 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2508 },
2509 },
2510 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
2511 # other actions.
2512 # This field is only supported in Global Security Policies of type
2513 # CLOUD_ARMOR.
2514 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2515 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2516 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2517 #
2518 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2519 # challenge assessment.
2520 # - EXTERNAL_302: redirect to a different URL via a 302
2521 # response.
2522 },
2523 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
2524 # other actions.
2525 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
2526 # rule.
2527 # [Deprecated] Use requiredManagedProtectionTiers instead.
2528 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
2529 # policy. This can only be set during rule creation, if rule number is not
2530 # specified it will be generated by the server.
2531 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
2532 # policy rule.
2533 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
2534 # allows you to control which network&#x27;s VMs get this rule. If this field
2535 # is left blank, all VMs within the organization will receive the rule.
2536 #
2537 # This field may only be specified when versioned_expr is set to FIREWALL.
2538 &quot;A String&quot;,
2539 ],
2540 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
2541 # applied with this rule.
2542 &quot;A String&quot;,
2543 ],
2544 },
2545 ],
2546 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
2547 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
2548 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
2549 # unique in the organization in which the security policy is created. This
2550 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
2551 # The name must be 1-63 characters long, and comply with
2552 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
2553 # characters long and match the regular expression
2554 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
2555 # lowercase letter, and all following characters must be a dash, lowercase
2556 # letter, or digit, except the last character, which cannot be a dash.
2557 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
2558 #
2559 # - CLOUD_ARMOR: Cloud Armor backend security policies can
2560 # be configured to filter incoming HTTP requests targeting backend services.
2561 # They filter requests before they hit the origin servers.
2562 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
2563 # be configured to filter incoming HTTP requests targeting backend services
2564 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
2565 # They filter requests before the request is served from Google&#x27;s cache.
2566 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
2567 # internal service policies can be configured to filter HTTP requests
2568 # targeting services managed by Traffic Director in a service mesh. They
2569 # filter requests before the request is served from the application.
2570 #
2571 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
2572 # can be configured to filter packets targeting network load balancing
2573 # resources such as backend services, target pools, target instances, and
2574 # instances with external IPs. They filter requests before the request is
2575 # served from the application.
2576 #
2577 #
2578 # This field can be set only at resource creation time.
2579 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
2580 # user-defined field consists of up to 4 bytes extracted from a fixed offset
2581 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
2582 # optional mask to select certain bits. Rules may then specify matching
2583 # values for these fields.
2584 #
2585 # Example:
2586 #
2587 # userDefinedFields:
2588 # - name: &quot;ipv4_fragment_offset&quot;
2589 # base: IPV4
2590 # offset: 6
2591 # size: 2
2592 # mask: &quot;0x1fff&quot;
2593 {
2594 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
2595 #
2596 # - IPV4: Points to the beginning of the IPv4 header.
2597 # - IPV6: Points to the beginning of the IPv6 header.
2598 # - TCP: Points to the beginning of the TCP header, skipping
2599 # over any IPv4 options or IPv6 extension headers. Not present for
2600 # non-first fragments.
2601 # - UDP: Points to the beginning of the UDP header, skipping
2602 # over any IPv4 options or IPv6 extension headers. Not present for
2603 # non-first fragments.
2604 #
2605 #
2606 # required
2607 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
2608 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
2609 # The last byte of the field (in network byte order) corresponds to the
2610 # least significant byte of the mask.
2611 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
2612 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
2613 # &#x27;base&#x27;.
2614 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
2615 },
2616 ],
2617 }</pre>
2618 </div>
2619
2620 <div class="method">
2621 <code class="details" id="getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</code>
2622 <pre>Gets an association with the specified name.
2623
2624 Use this API to read Cloud Armor policies. Previously, alpha and beta
2625 versions of this API were used to read firewall policies. This usage is
2626 now disabled for most organizations. Use firewallPolicies.getAssociation
2627 instead.
2628
2629 Args:
2630 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
2631 name: string, The name of the association to get from the security policy.
2632 x__xgafv: string, V1 error format.
2633 Allowed values
2634 1 - v1 error format
2635 2 - v2 error format
2636
2637 Returns:
2638 An object of the form:
2639
2640 {
2641 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
2642 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
2643 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
2644 &quot;A String&quot;,
2645 ],
2646 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
2647 &quot;A String&quot;,
2648 ],
2649 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
2650 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
2651 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
2652 }</pre>
2653 </div>
2654
2655 <div class="method">
2656 <code class="details" id="getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</code>
2657 <pre>Gets a rule at the specified priority.
2658
2659 Use this API to read Cloud Armor policies. Previously, alpha and beta
2660 versions of this API were used to read firewall policies. This usage is now
2661 disabled for most organizations. Use firewallPolicies.getRule instead.
2662
2663 Args:
2664 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
2665 priority: integer, The priority of the rule to get from the security policy.
2666 x__xgafv: string, V1 error format.
2667 Allowed values
2668 1 - v1 error format
2669 2 - v2 error format
2670
2671 Returns:
2672 An object of the form:
2673
2674 { # Represents a rule that describes one or more match conditions along with
2675 # the action to be taken when traffic matches this condition (allow or deny).
2676 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2677 # The following are the valid actions:
2678 #
2679 # - allow: allow access to target.
2680 # - deny(STATUS): deny access to target, returns the
2681 # HTTP response code specified. Valid values for `STATUS`
2682 # are 403, 404, and 502.
2683 # - rate_based_ban: limit client traffic to the configured
2684 # threshold and ban the client if the traffic exceeds the threshold.
2685 # Configure parameters for this action in RateLimitOptions. Requires
2686 # rate_limit_options to be set.
2687 # - redirect: redirect to a different target. This can
2688 # either be an internal reCAPTCHA redirect, or an external URL-based
2689 # redirect via a 302 response. Parameters for this action can be configured
2690 # via redirectOptions. This action is only supported in Global Security
2691 # Policies of type CLOUD_ARMOR.
2692 # - throttle: limit
2693 # client traffic to the configured threshold. Configure parameters for this
2694 # action in rateLimitOptions. Requires rate_limit_options to be set for
2695 # this.
2696 # - fairshare (preview only): when traffic reaches the
2697 # threshold limit, requests from the clients matching this rule begin to be
2698 # rate-limited using the Fair Share algorithm. This action is only allowed
2699 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2700 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2701 # create the resource.
2702 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
2703 # specified when versioned_expr is set to FIREWALL.
2704 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
2705 # enabled, logs will be exported to the configured export destination in
2706 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
2707 # cannot enable logging on &quot;goto_next&quot; rules.
2708 #
2709 # This field may only be specified when the versioned_expr is set to
2710 # FIREWALL.
2711 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2712 # This field is only supported in Global Security Policies of type
2713 # CLOUD_ARMOR.
2714 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2715 # present.
2716 {
2717 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2718 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2719 },
2720 ],
2721 },
2722 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2723 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2724 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2725 # Exactly one field must be specified.
2726 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2727 # This field must be specified if versioned_expr is specified and cannot
2728 # be specified if versioned_expr is not specified.
2729 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2730 #
2731 # This field may only be specified when versioned_expr is set to
2732 # FIREWALL.
2733 &quot;A String&quot;,
2734 ],
2735 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2736 #
2737 # This field may only be specified when versioned_expr is set to
2738 # FIREWALL.
2739 {
2740 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2741 # required when creating a firewall rule. This value can either be
2742 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2743 # protocol number.
2744 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2745 # only applicable for UDP or TCP protocol. Each entry must be either
2746 # an integer or a range. If not specified, this rule applies to
2747 # connections through any port.
2748 #
2749 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2750 #
2751 # This field may only be specified when versioned_expr is set to
2752 # FIREWALL.
2753 &quot;A String&quot;,
2754 ],
2755 },
2756 ],
2757 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2758 #
2759 # This field may only be specified when versioned_expr is set to
2760 # FIREWALL.
2761 {
2762 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2763 # required when creating a firewall rule. This value can either be
2764 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2765 # protocol number.
2766 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2767 # only applicable for UDP or TCP protocol. Each entry must be either
2768 # an integer or a range. If not specified, this rule applies to
2769 # connections through any port.
2770 #
2771 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2772 #
2773 # This field may only be specified when versioned_expr is set to
2774 # FIREWALL.
2775 &quot;A String&quot;,
2776 ],
2777 },
2778 ],
2779 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2780 # Maximum number of src_ip_ranges allowed is 10.
2781 &quot;A String&quot;,
2782 ],
2783 },
2784 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
2785 # A CEVAL expression is used to specify match criteria such as origin.ip,
2786 # source.region_code and contents in the request header.
2787 # Expressions containing `evaluateThreatIntelligence` require a Cloud
2788 # Armor Enterprise subscription and are not supported in Edge Policies
2789 # nor in Regional Policies. Expressions containing
2790 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
2791 # Enterprise subscription and are only supported in Global Security
2792 # Policies.
2793 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2794 # are documented at https://github.com/google/cel-spec.
2795 #
2796 # Example (Comparison):
2797 #
2798 # title: &quot;Summary size limit&quot;
2799 # description: &quot;Determines if a summary is less than 100 chars&quot;
2800 # expression: &quot;document.summary.size() &lt; 100&quot;
2801 #
2802 # Example (Equality):
2803 #
2804 # title: &quot;Requestor is owner&quot;
2805 # description: &quot;Determines if requestor is the document owner&quot;
2806 # expression: &quot;document.owner == request.auth.claims.email&quot;
2807 #
2808 # Example (Logic):
2809 #
2810 # title: &quot;Public documents&quot;
2811 # description: &quot;Determine whether the document should be publicly visible&quot;
2812 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2813 #
2814 # Example (Data Manipulation):
2815 #
2816 # title: &quot;Notification string&quot;
2817 # description: &quot;Create a notification string with a timestamp.&quot;
2818 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2819 #
2820 # The exact variables and functions that may be referenced within an expression
2821 # are determined by the service that evaluates it. See the service
2822 # documentation for additional information.
2823 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2824 # describes the expression, e.g. when hovered over it in a UI.
2825 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2826 # syntax.
2827 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2828 # reporting, e.g. a file name and a position in the file.
2829 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2830 # its purpose. This can be used e.g. in UIs which allow to enter the
2831 # expression.
2832 },
2833 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2834 # CEVAL expression (i.e., &#x27;expr&#x27;).
2835 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2836 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2837 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2838 # action-tokens. The provided site keys need to be created from
2839 # reCAPTCHA API under the same project where the security policy is
2840 # created.
2841 &quot;A String&quot;,
2842 ],
2843 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2844 # session-tokens. The provided site keys need to be created from
2845 # reCAPTCHA API under the same project where the security policy is
2846 # created.
2847 &quot;A String&quot;,
2848 ],
2849 },
2850 },
2851 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2852 # If this field is specified, config must also be specified.
2853 # Available preconfigured expressions along with their requirements are:
2854 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2855 # config.
2856 },
2857 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2858 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2859 # &#x27;action&#x27; is enforced.
2860 #
2861 # The match criteria for a rule consists of built-in match fields (like
2862 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2863 # (&#x27;userDefinedFields&#x27;).
2864 #
2865 # Field values may be extracted directly from the packet or derived from it
2866 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
2867 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
2868 # header is found in the packet and the entire field is in bounds.
2869 #
2870 # Each match field may specify which values can match it, listing one or
2871 # more ranges, prefixes, or exact values that are considered a match for
2872 # the field. A field value must be present in order to match a specified
2873 # match field. If no match values are specified for a match field, then any
2874 # field value is considered to match it, and it&#x27;s not required to be
2875 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
2876 #
2877 # For a packet to match a rule, all specified match fields must match the
2878 # corresponding field values derived from the packet.
2879 #
2880 # Example:
2881 #
2882 # networkMatch:
2883 # srcIpRanges:
2884 # - &quot;192.0.2.0/24&quot;
2885 # - &quot;198.51.100.0/24&quot;
2886 # userDefinedFields:
2887 # - name: &quot;ipv4_fragment_offset&quot;
2888 # values:
2889 # - &quot;1-0x1fff&quot;
2890 #
2891 # The above match condition matches packets with a source IP in
2892 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
2893 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
2894 # against.
2895 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
2896 # format.
2897 &quot;A String&quot;,
2898 ],
2899 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2900 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2901 &quot;A String&quot;,
2902 ],
2903 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
2904 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
2905 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
2906 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
2907 &quot;A String&quot;,
2908 ],
2909 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
2910 42,
2911 ],
2912 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
2913 &quot;A String&quot;,
2914 ],
2915 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2916 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2917 &quot;A String&quot;,
2918 ],
2919 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
2920 # IP address.
2921 &quot;A String&quot;,
2922 ],
2923 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
2924 # matching values for that field.
2925 {
2926 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
2927 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
2928 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
2929 # range (e.g. &quot;0x400-0x7ff&quot;).
2930 &quot;A String&quot;,
2931 ],
2932 },
2933 ],
2934 },
2935 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
2936 # does not evaluate preconfigured WAF rules, i.e., if
2937 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
2938 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
2939 {
2940 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
2941 # preconfigured WAF evaluation.
2942 {
2943 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2944 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2945 },
2946 ],
2947 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
2948 # inspection during preconfigured WAF evaluation.
2949 {
2950 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2951 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2952 },
2953 ],
2954 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
2955 # inspection during preconfigured WAF evaluation.
2956 {
2957 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2958 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2959 },
2960 ],
2961 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
2962 # from inspection during preconfigured WAF evaluation. Note that the
2963 # parameter can be in the query string or in the POST body.
2964 {
2965 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2966 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2967 },
2968 ],
2969 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
2970 # inspection during preconfigured WAF evaluation. When specifying this
2971 # field, the query or fragment part should be excluded.
2972 {
2973 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2974 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2975 },
2976 ],
2977 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
2978 # preconfigured WAF exclusion. If omitted, it refers to all the rule
2979 # IDs under the WAF rule set.
2980 &quot;A String&quot;,
2981 ],
2982 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
2983 },
2984 ],
2985 },
2986 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2987 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
2988 # must be a positive value between 0 and 2147483647.
2989 # Rules are evaluated from highest to lowest priority where 0 is the
2990 # highest priority and 2147483647 is the lowest priority.
2991 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
2992 # &quot;fairshare&quot;. Cannot be specified for any other actions.
2993 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
2994 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
2995 # the traffic will continue to be banned by the rate limit after the
2996 # rate falls below the threshold.
2997 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
2998 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
2999 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
3000 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
3001 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3002 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3003 },
3004 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
3005 # threshold. Valid option is &quot;allow&quot; only.
3006 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3007 # values are:
3008 #
3009 # - ALL: A single rate limit threshold is applied to all
3010 # the requests matching this rule. This is the default value if
3011 # &quot;enforceOnKey&quot; is not configured.
3012 # - IP: The source IP address of
3013 # the request is the key. Each IP has this limit enforced
3014 # separately.
3015 # - HTTP_HEADER: The value of the HTTP
3016 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3017 # value is truncated to the first 128 bytes of the header value. If no
3018 # such header is present in the request, the key type defaults toALL.
3019 # - XFF_IP: The first IP address (i.e. the
3020 # originating client IP address) specified in the list of IPs under
3021 # X-Forwarded-For HTTP header. If no such header is present or the value
3022 # is not a valid IP, the key defaults to the source IP address of
3023 # the request i.e. key type IP.
3024 # - HTTP_COOKIE: The value of the HTTP
3025 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3026 # value is truncated to the first 128 bytes of the cookie value. If no
3027 # such cookie is present in the request, the key type defaults toALL.
3028 # - HTTP_PATH: The URL path of the HTTP request. The key
3029 # value is truncated to the first 128 bytes.
3030 # - SNI: Server name indication in the TLS session of the
3031 # HTTPS request. The key value is truncated to the first 128 bytes. The
3032 # key type defaults to ALL on a HTTP session.
3033 # - REGION_CODE: The country/region from which the request
3034 # originates.
3035 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3036 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3037 # key type defaults to ALL.
3038 # - USER_IP: The IP address of the originating client,
3039 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3040 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
3041 # an IP address cannot be resolved from it, the key type defaults toIP.
3042 #
3043 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3044 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3045 # key type defaults to ALL.
3046 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
3047 # limit threshold is enforced for all the requests matching the rule.
3048 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
3049 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
3050 # ratelimit threshold/action is enforced. You can specify up to 3
3051 # enforce_on_key_configs. If enforce_on_key_configs is specified,
3052 # enforce_on_key must not be specified.
3053 {
3054 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3055 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
3056 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
3057 # taken as the key value.
3058 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3059 # values are:
3060 #
3061 # - ALL: A single rate limit threshold is applied to all
3062 # the requests matching this rule. This is the default value if
3063 # &quot;enforceOnKeyConfigs&quot; is not configured.
3064 # - IP: The source IP address of
3065 # the request is the key. Each IP has this limit enforced
3066 # separately.
3067 # - HTTP_HEADER: The value of the HTTP
3068 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3069 # value is truncated to the first 128 bytes of the header value. If no
3070 # such header is present in the request, the key type defaults toALL.
3071 # - XFF_IP: The first IP address (i.e. the
3072 # originating client IP address) specified in the list of IPs under
3073 # X-Forwarded-For HTTP header. If no such header is present or the
3074 # value is not a valid IP, the key defaults to the source IP address of
3075 # the request i.e. key type IP.
3076 # - HTTP_COOKIE: The value of the HTTP
3077 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3078 # value is truncated to the first 128 bytes of the cookie value. If no
3079 # such cookie is present in the request, the key type defaults toALL.
3080 # - HTTP_PATH: The URL path of the HTTP request. The key
3081 # value is truncated to the first 128 bytes.
3082 # - SNI: Server name indication in the TLS session of
3083 # the HTTPS request. The key value is truncated to the first 128 bytes.
3084 # The key type defaults to ALL on a HTTP session.
3085 # - REGION_CODE: The country/region from which the
3086 # request originates.
3087 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3088 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3089 # key type defaults to ALL.
3090 # - USER_IP: The IP address of the originating client,
3091 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3092 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
3093 # or an IP address cannot be resolved from it, the key type defaults toIP.
3094 #
3095 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3096 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3097 # key type defaults to ALL.
3098 },
3099 ],
3100 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3101 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
3102 # value.
3103 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
3104 # value.
3105 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
3106 # threshold, to either deny with a specified HTTP response code, or
3107 # redirect to a different endpoint.
3108 # Valid options are `deny(STATUS)`, where valid values for
3109 # `STATUS` are 403, 404, 429, and 502, and
3110 # `redirect`, where the redirect parameters come from
3111 # `exceedRedirectOptions` below.
3112 # The `redirect` action is only supported in Global Security Policies of
3113 # type CLOUD_ARMOR.
3114 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
3115 # above the configured rate limit threshold
3116 &quot;code&quot;: 42, # The status code, which should be an enum value of
3117 # google.rpc.Code.
3118 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
3119 },
3120 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
3121 # action. Cannot be specified if the exceed action is not redirect.
3122 # This field is only supported in Global Security Policies of type
3123 # CLOUD_ARMOR.
3124 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3125 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3126 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3127 #
3128 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3129 # challenge assessment.
3130 # - EXTERNAL_302: redirect to a different URL via a 302
3131 # response.
3132 },
3133 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
3134 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3135 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3136 },
3137 },
3138 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
3139 # other actions.
3140 # This field is only supported in Global Security Policies of type
3141 # CLOUD_ARMOR.
3142 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3143 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3144 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3145 #
3146 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3147 # challenge assessment.
3148 # - EXTERNAL_302: redirect to a different URL via a 302
3149 # response.
3150 },
3151 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
3152 # other actions.
3153 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
3154 # rule.
3155 # [Deprecated] Use requiredManagedProtectionTiers instead.
3156 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
3157 # policy. This can only be set during rule creation, if rule number is not
3158 # specified it will be generated by the server.
3159 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
3160 # policy rule.
3161 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
3162 # allows you to control which network&#x27;s VMs get this rule. If this field
3163 # is left blank, all VMs within the organization will receive the rule.
3164 #
3165 # This field may only be specified when versioned_expr is set to FIREWALL.
3166 &quot;A String&quot;,
3167 ],
3168 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
3169 # applied with this rule.
3170 &quot;A String&quot;,
3171 ],
3172 }</pre>
3173 </div>
3174
3175 <div class="method">
3176 <code class="details" id="insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</code>
3177 <pre>Creates a new policy in the specified organization using the data included
3178 in the request.
3179
3180 Use this API to add Cloud Armor policies. Previously, alpha and beta
3181 versions of this API were used to add firewall policies. This usage is now
3182 disabled for most organizations. Use firewallPolicies.insert instead.
3183
3184 Args:
3185 body: object, The request body.
3186 The object takes the form of:
3187
3188 { # Represents a Google Cloud Armor security policy resource.
3189 #
3190 # Only external backend services that use load balancers can
3191 # reference a security policy. For more information, see
3192 # Google Cloud Armor security policy overview.
3193 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
3194 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
3195 &quot;confidenceThreshold&quot;: 3.14,
3196 &quot;expirationSec&quot;: 42,
3197 &quot;impactedBaselineThreshold&quot;: 3.14,
3198 &quot;loadThreshold&quot;: 3.14,
3199 },
3200 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
3201 # This field is only supported in Global Security Policies of type
3202 # CLOUD_ARMOR.
3203 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
3204 # This field is only supported in Global Security Policies of type
3205 # CLOUD_ARMOR.
3206 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
3207 # STANDARD - opaque rules. (default)
3208 # PREMIUM - transparent rules.
3209 # This field is only supported in Global Security Policies of type
3210 # CLOUD_ARMOR.
3211 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
3212 # customizable thresholds.
3213 {
3214 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
3215 &quot;autoDeployExpirationSec&quot;: 42,
3216 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
3217 &quot;autoDeployLoadThreshold&quot;: 3.14,
3218 &quot;detectionAbsoluteQps&quot;: 3.14,
3219 &quot;detectionLoadThreshold&quot;: 3.14,
3220 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
3221 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
3222 # The name must be unique within the security policy.
3223 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
3224 # on specified granular traffic units.
3225 { # Configurations to specifc granular traffic units processed by
3226 # Adaptive Protection.
3227 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
3228 # type constitutes a separate traffic unit.
3229 # It can only be set to true if `value` is empty.
3230 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
3231 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
3232 },
3233 ],
3234 },
3235 ],
3236 },
3237 },
3238 &quot;advancedOptionsConfig&quot;: {
3239 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
3240 # json_parsing is set to STANDARD.
3241 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
3242 #
3243 # As per RFC 1341, a Content-Type header value has the following format:
3244 #
3245 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
3246 #
3247 # When configuring a custom Content-Type header value, only the
3248 # type/subtype needs to be specified, and the parameters should be
3249 # excluded.
3250 &quot;A String&quot;,
3251 ],
3252 },
3253 &quot;jsonParsing&quot;: &quot;A String&quot;,
3254 &quot;logLevel&quot;: &quot;A String&quot;,
3255 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
3256 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
3257 # Values are case insensitive.
3258 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
3259 # resolving the callers client IP address.
3260 &quot;A String&quot;,
3261 ],
3262 },
3263 &quot;associations&quot;: [ # A list of associations that belong to this policy.
3264 {
3265 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
3266 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
3267 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
3268 &quot;A String&quot;,
3269 ],
3270 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
3271 &quot;A String&quot;,
3272 ],
3273 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
3274 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
3275 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
3276 },
3277 ],
3278 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
3279 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
3280 },
3281 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
3282 # text format.
3283 &quot;ddosProtectionConfig&quot;: {
3284 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
3285 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
3286 # builds DDoS mitigations that minimize collateral damage. It quantifies
3287 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
3288 # blocked.
3289 #
3290 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
3291 # not be deployed. Using a lower value will prioritize keeping collateral
3292 # damage low, possibly at the cost of its effectiveness in rate limiting
3293 # some or all of the attack. It should typically be unset, so Advanced DDoS
3294 # (and Adaptive Protection) uses the best mitigation it can find. Setting
3295 # the threshold is advised if there are logs for false positive detections
3296 # with high collateral damage, and will cause Advanced DDoS to attempt to
3297 # find a less aggressive rule that satisfies the constraint. If a suitable
3298 # rule cannot be found, the system falls back to either no mitigation for
3299 # smaller attacks or broader network throttles for larger ones.
3300 &quot;ddosProtection&quot;: &quot;A String&quot;,
3301 },
3302 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3303 # create the resource.
3304 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
3305 # unique in the organization in which the security policy is created. This
3306 # should only be used when SecurityPolicyType is FIREWALL.
3307 # The name must be 1-63 characters long, and comply with
3308 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
3309 # characters long and match the regular expression
3310 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
3311 # lowercase letter, and all following characters must be a dash, lowercase
3312 # letter, or digit, except the last character, which cannot be a dash.
3313 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
3314 # the metadata&#x27;s contents and used for optimistic locking. The
3315 # fingerprint is initially generated by Compute Engine and changes after
3316 # every request to modify or update metadata. You must always provide an
3317 # up-to-date fingerprint hash in order to update or change metadata,
3318 # otherwise the request will fail with error412 conditionNotMet.
3319 #
3320 # To see the latest fingerprint, make get() request to the
3321 # security policy.
3322 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
3323 # defined by the server.
3324 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
3325 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
3326 # is essentially a hash of the labels set used for optimistic locking. The
3327 # fingerprint is initially generated by Compute Engine and changes after
3328 # every request to modify or update labels. You must always provide an
3329 # up-to-date fingerprint hash in order to update or change labels.
3330 #
3331 # To see the latest fingerprint, make get() request to the
3332 # security policy.
3333 &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.
3334 # Label values may be empty.
3335 &quot;a_key&quot;: &quot;A String&quot;,
3336 },
3337 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
3338 # The name must be 1-63 characters long, and comply withRFC1035.
3339 # Specifically, the name must be 1-63 characters long and match the regular
3340 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
3341 # character must be a lowercase letter, and all following characters must
3342 # be a dash, lowercase letter, or digit, except the last character, which
3343 # cannot be a dash.
3344 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
3345 &quot;recaptchaOptionsConfig&quot;: {
3346 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
3347 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
3348 # the security policy. The specified site key needs to be created from the
3349 # reCAPTCHA API. The user is responsible for the validity of the specified
3350 # site key. If not specified, a Google-managed site key is used.
3351 # This field is only supported in Global Security Policies of type
3352 # CLOUD_ARMOR.
3353 },
3354 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
3355 # resides. This field is not applicable to global security policies.
3356 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
3357 # policy can not exceed a set number of tuples.
3358 &quot;rules&quot;: [ # A list of rules that belong to this policy.
3359 # There must always be a default rule which is a rule with priority
3360 # 2147483647 and match all condition (for the match condition this means
3361 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
3362 # must be either match &quot;*&quot; or not set). If no rules are provided when
3363 # creating a security policy, a default rule with action &quot;allow&quot; will be
3364 # added.
3365 { # Represents a rule that describes one or more match conditions along with
3366 # the action to be taken when traffic matches this condition (allow or deny).
3367 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
3368 # The following are the valid actions:
3369 #
3370 # - allow: allow access to target.
3371 # - deny(STATUS): deny access to target, returns the
3372 # HTTP response code specified. Valid values for `STATUS`
3373 # are 403, 404, and 502.
3374 # - rate_based_ban: limit client traffic to the configured
3375 # threshold and ban the client if the traffic exceeds the threshold.
3376 # Configure parameters for this action in RateLimitOptions. Requires
3377 # rate_limit_options to be set.
3378 # - redirect: redirect to a different target. This can
3379 # either be an internal reCAPTCHA redirect, or an external URL-based
3380 # redirect via a 302 response. Parameters for this action can be configured
3381 # via redirectOptions. This action is only supported in Global Security
3382 # Policies of type CLOUD_ARMOR.
3383 # - throttle: limit
3384 # client traffic to the configured threshold. Configure parameters for this
3385 # action in rateLimitOptions. Requires rate_limit_options to be set for
3386 # this.
3387 # - fairshare (preview only): when traffic reaches the
3388 # threshold limit, requests from the clients matching this rule begin to be
3389 # rate-limited using the Fair Share algorithm. This action is only allowed
3390 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
3391 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3392 # create the resource.
3393 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
3394 # specified when versioned_expr is set to FIREWALL.
3395 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
3396 # enabled, logs will be exported to the configured export destination in
3397 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
3398 # cannot enable logging on &quot;goto_next&quot; rules.
3399 #
3400 # This field may only be specified when the versioned_expr is set to
3401 # FIREWALL.
3402 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
3403 # This field is only supported in Global Security Policies of type
3404 # CLOUD_ARMOR.
3405 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
3406 # present.
3407 {
3408 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
3409 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
3410 },
3411 ],
3412 },
3413 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
3414 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
3415 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
3416 # Exactly one field must be specified.
3417 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
3418 # This field must be specified if versioned_expr is specified and cannot
3419 # be specified if versioned_expr is not specified.
3420 &quot;destIpRanges&quot;: [ # CIDR IP address range.
3421 #
3422 # This field may only be specified when versioned_expr is set to
3423 # FIREWALL.
3424 &quot;A String&quot;,
3425 ],
3426 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
3427 #
3428 # This field may only be specified when versioned_expr is set to
3429 # FIREWALL.
3430 {
3431 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
3432 # required when creating a firewall rule. This value can either be
3433 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
3434 # protocol number.
3435 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
3436 # only applicable for UDP or TCP protocol. Each entry must be either
3437 # an integer or a range. If not specified, this rule applies to
3438 # connections through any port.
3439 #
3440 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
3441 #
3442 # This field may only be specified when versioned_expr is set to
3443 # FIREWALL.
3444 &quot;A String&quot;,
3445 ],
3446 },
3447 ],
3448 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
3449 #
3450 # This field may only be specified when versioned_expr is set to
3451 # FIREWALL.
3452 {
3453 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
3454 # required when creating a firewall rule. This value can either be
3455 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
3456 # protocol number.
3457 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
3458 # only applicable for UDP or TCP protocol. Each entry must be either
3459 # an integer or a range. If not specified, this rule applies to
3460 # connections through any port.
3461 #
3462 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
3463 #
3464 # This field may only be specified when versioned_expr is set to
3465 # FIREWALL.
3466 &quot;A String&quot;,
3467 ],
3468 },
3469 ],
3470 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
3471 # Maximum number of src_ip_ranges allowed is 10.
3472 &quot;A String&quot;,
3473 ],
3474 },
3475 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
3476 # A CEVAL expression is used to specify match criteria such as origin.ip,
3477 # source.region_code and contents in the request header.
3478 # Expressions containing `evaluateThreatIntelligence` require a Cloud
3479 # Armor Enterprise subscription and are not supported in Edge Policies
3480 # nor in Regional Policies. Expressions containing
3481 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
3482 # Enterprise subscription and are only supported in Global Security
3483 # Policies.
3484 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3485 # are documented at https://github.com/google/cel-spec.
3486 #
3487 # Example (Comparison):
3488 #
3489 # title: &quot;Summary size limit&quot;
3490 # description: &quot;Determines if a summary is less than 100 chars&quot;
3491 # expression: &quot;document.summary.size() &lt; 100&quot;
3492 #
3493 # Example (Equality):
3494 #
3495 # title: &quot;Requestor is owner&quot;
3496 # description: &quot;Determines if requestor is the document owner&quot;
3497 # expression: &quot;document.owner == request.auth.claims.email&quot;
3498 #
3499 # Example (Logic):
3500 #
3501 # title: &quot;Public documents&quot;
3502 # description: &quot;Determine whether the document should be publicly visible&quot;
3503 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3504 #
3505 # Example (Data Manipulation):
3506 #
3507 # title: &quot;Notification string&quot;
3508 # description: &quot;Create a notification string with a timestamp.&quot;
3509 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3510 #
3511 # The exact variables and functions that may be referenced within an expression
3512 # are determined by the service that evaluates it. See the service
3513 # documentation for additional information.
3514 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3515 # describes the expression, e.g. when hovered over it in a UI.
3516 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3517 # syntax.
3518 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3519 # reporting, e.g. a file name and a position in the file.
3520 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3521 # its purpose. This can be used e.g. in UIs which allow to enter the
3522 # expression.
3523 },
3524 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
3525 # CEVAL expression (i.e., &#x27;expr&#x27;).
3526 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
3527 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
3528 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3529 # action-tokens. The provided site keys need to be created from
3530 # reCAPTCHA API under the same project where the security policy is
3531 # created.
3532 &quot;A String&quot;,
3533 ],
3534 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3535 # session-tokens. The provided site keys need to be created from
3536 # reCAPTCHA API under the same project where the security policy is
3537 # created.
3538 &quot;A String&quot;,
3539 ],
3540 },
3541 },
3542 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
3543 # If this field is specified, config must also be specified.
3544 # Available preconfigured expressions along with their requirements are:
3545 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
3546 # config.
3547 },
3548 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
3549 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
3550 # &#x27;action&#x27; is enforced.
3551 #
3552 # The match criteria for a rule consists of built-in match fields (like
3553 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
3554 # (&#x27;userDefinedFields&#x27;).
3555 #
3556 # Field values may be extracted directly from the packet or derived from it
3557 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
3558 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
3559 # header is found in the packet and the entire field is in bounds.
3560 #
3561 # Each match field may specify which values can match it, listing one or
3562 # more ranges, prefixes, or exact values that are considered a match for
3563 # the field. A field value must be present in order to match a specified
3564 # match field. If no match values are specified for a match field, then any
3565 # field value is considered to match it, and it&#x27;s not required to be
3566 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
3567 #
3568 # For a packet to match a rule, all specified match fields must match the
3569 # corresponding field values derived from the packet.
3570 #
3571 # Example:
3572 #
3573 # networkMatch:
3574 # srcIpRanges:
3575 # - &quot;192.0.2.0/24&quot;
3576 # - &quot;198.51.100.0/24&quot;
3577 # userDefinedFields:
3578 # - name: &quot;ipv4_fragment_offset&quot;
3579 # values:
3580 # - &quot;1-0x1fff&quot;
3581 #
3582 # The above match condition matches packets with a source IP in
3583 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
3584 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
3585 # against.
3586 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
3587 # format.
3588 &quot;A String&quot;,
3589 ],
3590 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3591 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3592 &quot;A String&quot;,
3593 ],
3594 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
3595 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
3596 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
3597 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
3598 &quot;A String&quot;,
3599 ],
3600 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
3601 42,
3602 ],
3603 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
3604 &quot;A String&quot;,
3605 ],
3606 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3607 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3608 &quot;A String&quot;,
3609 ],
3610 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
3611 # IP address.
3612 &quot;A String&quot;,
3613 ],
3614 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
3615 # matching values for that field.
3616 {
3617 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
3618 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
3619 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
3620 # range (e.g. &quot;0x400-0x7ff&quot;).
3621 &quot;A String&quot;,
3622 ],
3623 },
3624 ],
3625 },
3626 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
3627 # does not evaluate preconfigured WAF rules, i.e., if
3628 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
3629 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
3630 {
3631 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
3632 # preconfigured WAF evaluation.
3633 {
3634 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3635 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3636 },
3637 ],
3638 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
3639 # inspection during preconfigured WAF evaluation.
3640 {
3641 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3642 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3643 },
3644 ],
3645 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
3646 # inspection during preconfigured WAF evaluation.
3647 {
3648 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3649 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3650 },
3651 ],
3652 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
3653 # from inspection during preconfigured WAF evaluation. Note that the
3654 # parameter can be in the query string or in the POST body.
3655 {
3656 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3657 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3658 },
3659 ],
3660 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
3661 # inspection during preconfigured WAF evaluation. When specifying this
3662 # field, the query or fragment part should be excluded.
3663 {
3664 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3665 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3666 },
3667 ],
3668 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
3669 # preconfigured WAF exclusion. If omitted, it refers to all the rule
3670 # IDs under the WAF rule set.
3671 &quot;A String&quot;,
3672 ],
3673 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
3674 },
3675 ],
3676 },
3677 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
3678 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
3679 # must be a positive value between 0 and 2147483647.
3680 # Rules are evaluated from highest to lowest priority where 0 is the
3681 # highest priority and 2147483647 is the lowest priority.
3682 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
3683 # &quot;fairshare&quot;. Cannot be specified for any other actions.
3684 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
3685 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
3686 # the traffic will continue to be banned by the rate limit after the
3687 # rate falls below the threshold.
3688 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
3689 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
3690 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
3691 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
3692 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3693 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3694 },
3695 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
3696 # threshold. Valid option is &quot;allow&quot; only.
3697 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3698 # values are:
3699 #
3700 # - ALL: A single rate limit threshold is applied to all
3701 # the requests matching this rule. This is the default value if
3702 # &quot;enforceOnKey&quot; is not configured.
3703 # - IP: The source IP address of
3704 # the request is the key. Each IP has this limit enforced
3705 # separately.
3706 # - HTTP_HEADER: The value of the HTTP
3707 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3708 # value is truncated to the first 128 bytes of the header value. If no
3709 # such header is present in the request, the key type defaults toALL.
3710 # - XFF_IP: The first IP address (i.e. the
3711 # originating client IP address) specified in the list of IPs under
3712 # X-Forwarded-For HTTP header. If no such header is present or the value
3713 # is not a valid IP, the key defaults to the source IP address of
3714 # the request i.e. key type IP.
3715 # - HTTP_COOKIE: The value of the HTTP
3716 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3717 # value is truncated to the first 128 bytes of the cookie value. If no
3718 # such cookie is present in the request, the key type defaults toALL.
3719 # - HTTP_PATH: The URL path of the HTTP request. The key
3720 # value is truncated to the first 128 bytes.
3721 # - SNI: Server name indication in the TLS session of the
3722 # HTTPS request. The key value is truncated to the first 128 bytes. The
3723 # key type defaults to ALL on a HTTP session.
3724 # - REGION_CODE: The country/region from which the request
3725 # originates.
3726 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3727 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3728 # key type defaults to ALL.
3729 # - USER_IP: The IP address of the originating client,
3730 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3731 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
3732 # an IP address cannot be resolved from it, the key type defaults toIP.
3733 #
3734 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3735 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3736 # key type defaults to ALL.
3737 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
3738 # limit threshold is enforced for all the requests matching the rule.
3739 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
3740 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
3741 # ratelimit threshold/action is enforced. You can specify up to 3
3742 # enforce_on_key_configs. If enforce_on_key_configs is specified,
3743 # enforce_on_key must not be specified.
3744 {
3745 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3746 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
3747 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
3748 # taken as the key value.
3749 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3750 # values are:
3751 #
3752 # - ALL: A single rate limit threshold is applied to all
3753 # the requests matching this rule. This is the default value if
3754 # &quot;enforceOnKeyConfigs&quot; is not configured.
3755 # - IP: The source IP address of
3756 # the request is the key. Each IP has this limit enforced
3757 # separately.
3758 # - HTTP_HEADER: The value of the HTTP
3759 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3760 # value is truncated to the first 128 bytes of the header value. If no
3761 # such header is present in the request, the key type defaults toALL.
3762 # - XFF_IP: The first IP address (i.e. the
3763 # originating client IP address) specified in the list of IPs under
3764 # X-Forwarded-For HTTP header. If no such header is present or the
3765 # value is not a valid IP, the key defaults to the source IP address of
3766 # the request i.e. key type IP.
3767 # - HTTP_COOKIE: The value of the HTTP
3768 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3769 # value is truncated to the first 128 bytes of the cookie value. If no
3770 # such cookie is present in the request, the key type defaults toALL.
3771 # - HTTP_PATH: The URL path of the HTTP request. The key
3772 # value is truncated to the first 128 bytes.
3773 # - SNI: Server name indication in the TLS session of
3774 # the HTTPS request. The key value is truncated to the first 128 bytes.
3775 # The key type defaults to ALL on a HTTP session.
3776 # - REGION_CODE: The country/region from which the
3777 # request originates.
3778 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3779 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3780 # key type defaults to ALL.
3781 # - USER_IP: The IP address of the originating client,
3782 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3783 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
3784 # or an IP address cannot be resolved from it, the key type defaults toIP.
3785 #
3786 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3787 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3788 # key type defaults to ALL.
3789 },
3790 ],
3791 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3792 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
3793 # value.
3794 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
3795 # value.
3796 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
3797 # threshold, to either deny with a specified HTTP response code, or
3798 # redirect to a different endpoint.
3799 # Valid options are `deny(STATUS)`, where valid values for
3800 # `STATUS` are 403, 404, 429, and 502, and
3801 # `redirect`, where the redirect parameters come from
3802 # `exceedRedirectOptions` below.
3803 # The `redirect` action is only supported in Global Security Policies of
3804 # type CLOUD_ARMOR.
3805 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
3806 # above the configured rate limit threshold
3807 &quot;code&quot;: 42, # The status code, which should be an enum value of
3808 # google.rpc.Code.
3809 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
3810 },
3811 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
3812 # action. Cannot be specified if the exceed action is not redirect.
3813 # This field is only supported in Global Security Policies of type
3814 # CLOUD_ARMOR.
3815 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3816 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3817 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3818 #
3819 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3820 # challenge assessment.
3821 # - EXTERNAL_302: redirect to a different URL via a 302
3822 # response.
3823 },
3824 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
3825 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3826 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3827 },
3828 },
3829 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
3830 # other actions.
3831 # This field is only supported in Global Security Policies of type
3832 # CLOUD_ARMOR.
3833 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3834 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3835 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3836 #
3837 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3838 # challenge assessment.
3839 # - EXTERNAL_302: redirect to a different URL via a 302
3840 # response.
3841 },
3842 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
3843 # other actions.
3844 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
3845 # rule.
3846 # [Deprecated] Use requiredManagedProtectionTiers instead.
3847 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
3848 # policy. This can only be set during rule creation, if rule number is not
3849 # specified it will be generated by the server.
3850 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
3851 # policy rule.
3852 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
3853 # allows you to control which network&#x27;s VMs get this rule. If this field
3854 # is left blank, all VMs within the organization will receive the rule.
3855 #
3856 # This field may only be specified when versioned_expr is set to FIREWALL.
3857 &quot;A String&quot;,
3858 ],
3859 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
3860 # applied with this rule.
3861 &quot;A String&quot;,
3862 ],
3863 },
3864 ],
3865 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
3866 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
3867 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
3868 # unique in the organization in which the security policy is created. This
3869 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
3870 # The name must be 1-63 characters long, and comply with
3871 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
3872 # characters long and match the regular expression
3873 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
3874 # lowercase letter, and all following characters must be a dash, lowercase
3875 # letter, or digit, except the last character, which cannot be a dash.
3876 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
3877 #
3878 # - CLOUD_ARMOR: Cloud Armor backend security policies can
3879 # be configured to filter incoming HTTP requests targeting backend services.
3880 # They filter requests before they hit the origin servers.
3881 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
3882 # be configured to filter incoming HTTP requests targeting backend services
3883 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
3884 # They filter requests before the request is served from Google&#x27;s cache.
3885 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
3886 # internal service policies can be configured to filter HTTP requests
3887 # targeting services managed by Traffic Director in a service mesh. They
3888 # filter requests before the request is served from the application.
3889 #
3890 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
3891 # can be configured to filter packets targeting network load balancing
3892 # resources such as backend services, target pools, target instances, and
3893 # instances with external IPs. They filter requests before the request is
3894 # served from the application.
3895 #
3896 #
3897 # This field can be set only at resource creation time.
3898 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
3899 # user-defined field consists of up to 4 bytes extracted from a fixed offset
3900 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
3901 # optional mask to select certain bits. Rules may then specify matching
3902 # values for these fields.
3903 #
3904 # Example:
3905 #
3906 # userDefinedFields:
3907 # - name: &quot;ipv4_fragment_offset&quot;
3908 # base: IPV4
3909 # offset: 6
3910 # size: 2
3911 # mask: &quot;0x1fff&quot;
3912 {
3913 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
3914 #
3915 # - IPV4: Points to the beginning of the IPv4 header.
3916 # - IPV6: Points to the beginning of the IPv6 header.
3917 # - TCP: Points to the beginning of the TCP header, skipping
3918 # over any IPv4 options or IPv6 extension headers. Not present for
3919 # non-first fragments.
3920 # - UDP: Points to the beginning of the UDP header, skipping
3921 # over any IPv4 options or IPv6 extension headers. Not present for
3922 # non-first fragments.
3923 #
3924 #
3925 # required
3926 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
3927 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
3928 # The last byte of the field (in network byte order) corresponds to the
3929 # least significant byte of the mask.
3930 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
3931 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
3932 # &#x27;base&#x27;.
3933 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
3934 },
3935 ],
3936 }
3937
3938 parentId: string, Parent ID for this request. The ID can be either be &quot;folders/[FOLDER_ID]&quot;
3939 if the parent is a folder or &quot;organizations/[ORGANIZATION_ID]&quot; if the
3940 parent is an organization.
3941 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
3942 that if you must retry your request, the server will know to ignore the
3943 request if it has already been completed.
3944
3945 For example, consider a situation where you make an initial request and
3946 the request times out. If you make the request again with the same
3947 request ID, the server can check if original operation with the same
3948 request ID was received, and if so, will ignore the second request. This
3949 prevents clients from accidentally creating duplicate commitments.
3950
3951 The request ID must be
3952 a valid UUID with the exception that zero UUID is not supported
3953 (00000000-0000-0000-0000-000000000000).
3954 x__xgafv: string, V1 error format.
3955 Allowed values
3956 1 - v1 error format
3957 2 - v2 error format
3958
3959 Returns:
3960 An object of the form:
3961
3962 { # Represents an Operation resource.
3963 #
3964 # Google Compute Engine has three Operation resources:
3965 #
3966 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
3967 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
3968 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
3969 #
3970 # You can use an operation resource to manage asynchronous API requests.
3971 # For more information, readHandling
3972 # API responses.
3973 #
3974 # Operations can be global, regional or zonal.
3975 #
3976 # - For global operations, use the `globalOperations`
3977 # resource.
3978 # - For regional operations, use the
3979 # `regionOperations` resource.
3980 # - For zonal operations, use
3981 # the `zoneOperations` resource.
3982 #
3983 #
3984 #
3985 # For more information, read
3986 # Global, Regional, and Zonal Resources.
3987 #
3988 # Note that completed Operation resources have a limited
3989 # retention period.
3990 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
3991 # Not present otherwise.
3992 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3993 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
3994 # set when the operation is created.
3995 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
3996 # text format.
3997 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
3998 # this field will be populated.
3999 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
4000 # operation.
4001 {
4002 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4003 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
4004 # details. There is a set of defined message types to use for providing
4005 # details.The syntax depends on the error code. For example,
4006 # QuotaExceededInfo will have details when the error code is
4007 # QUOTA_EXCEEDED.
4008 {
4009 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
4010 #
4011 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
4012 # is not enabled:
4013 #
4014 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
4015 # &quot;domain&quot;: &quot;googleapis.com&quot;
4016 # &quot;metadata&quot;: {
4017 # &quot;resource&quot;: &quot;projects/123&quot;,
4018 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
4019 # }
4020 # }
4021 #
4022 # This response indicates that the pubsub.googleapis.com API is not enabled.
4023 #
4024 # Example of an error that is returned when attempting to create a Spanner
4025 # instance in a region that is out of stock:
4026 #
4027 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
4028 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
4029 # &quot;metadata&quot;: {
4030 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
4031 # }
4032 # }
4033 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
4034 # is typically the registered service name of the tool or product that
4035 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
4036 # generated by some common infrastructure, the error domain must be a
4037 # globally unique value that identifies the infrastructure. For Google API
4038 # infrastructure, the error domain is &quot;googleapis.com&quot;.
4039 &quot;metadatas&quot;: { # Additional structured details about this error.
4040 #
4041 # Keys must match a regular expression of `a-z+` but should
4042 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
4043 # length. When identifying the current value of an exceeded limit, the units
4044 # should be contained in the key, not the value. For example, rather than
4045 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
4046 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
4047 # instances that can be created in a single (batch) request.
4048 &quot;a_key&quot;: &quot;A String&quot;,
4049 },
4050 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
4051 # proximate cause of the error. Error reasons are unique within a particular
4052 # domain of errors. This should be at most 63 characters and match a
4053 # regular expression of `A-Z+[A-Z0-9]`, which represents
4054 # UPPER_SNAKE_CASE.
4055 },
4056 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
4057 #
4058 # For example, if a quota check failed with an error indicating the calling
4059 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
4060 # directly to the right place in the developer console to flip the bit.
4061 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
4062 { # Describes a URL link.
4063 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
4064 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
4065 },
4066 ],
4067 },
4068 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
4069 # which can be attached to an RPC error.
4070 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
4071 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
4072 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
4073 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
4074 },
4075 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
4076 &quot;dimensions&quot;: { # The map holding related quota dimensions.
4077 &quot;a_key&quot;: &quot;A String&quot;,
4078 },
4079 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
4080 # type or metric.
4081 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
4082 # or metric.
4083 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
4084 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
4085 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
4086 },
4087 },
4088 ],
4089 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
4090 # This property is optional.
4091 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4092 },
4093 ],
4094 },
4095 &quot;getVersionOperationMetadata&quot;: {
4096 &quot;inlineSbomInfo&quot;: {
4097 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
4098 # appropriate identifiers.
4099 &quot;a_key&quot;: &quot;A String&quot;,
4100 },
4101 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
4102 # identifiers.
4103 &quot;a_key&quot;: &quot;A String&quot;,
4104 },
4105 },
4106 },
4107 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
4108 # message that was returned, such as `NOT FOUND`.
4109 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
4110 # status code that was returned. For example, a `404` means the
4111 # resource was not found.
4112 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
4113 # defined by the server.
4114 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
4115 # This value is inRFC3339
4116 # text format.
4117 &quot;instancesBulkInsertOperationMetadata&quot;: {
4118 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
4119 # Example key: zones/us-central1-a
4120 &quot;a_key&quot;: {
4121 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
4122 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
4123 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
4124 # error.
4125 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
4126 # if the flow is rolling forward or rolling back.
4127 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
4128 },
4129 },
4130 },
4131 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
4132 # Operation resources.
4133 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4134 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
4135 # group of operations results from a `bulkInsert` API request.
4136 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
4137 # `update`, or `delete`, and so on.
4138 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
4139 # There is no requirement that this be linear or support any granularity of
4140 # operations. This should not be used to guess when the operation will be
4141 # complete. This number should monotonically increase as the operation
4142 # progresses.
4143 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
4144 # applicable when performing regional operations.
4145 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4146 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
4147 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
4148 # this field will contain information on all underlying zonal actions and
4149 # their state.
4150 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
4151 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
4152 # Example key: zones/us-central1-a
4153 &quot;a_key&quot;: {
4154 &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
4155 # populated.
4156 # different programming environments, including REST APIs and RPC APIs. It is
4157 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
4158 # three pieces of data: error code, error message, and error details.
4159 #
4160 # You can find out more about this error model and how to work with it in the
4161 # [API Design Guide](https://cloud.google.com/apis/design/errors).
4162 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
4163 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
4164 # message types for APIs to use.
4165 {
4166 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
4167 },
4168 ],
4169 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
4170 # user-facing error message should be localized and sent in the
4171 # google.rpc.Status.details field, or localized by the client.
4172 },
4173 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
4174 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
4175 },
4176 },
4177 },
4178 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
4179 # This value is inRFC3339
4180 # text format.
4181 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
4182 # following:
4183 # `PENDING`, `RUNNING`, or `DONE`.
4184 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
4185 # operation.
4186 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
4187 # of the target resource.
4188 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
4189 # operations related to creating a snapshot, this points to the disk
4190 # that the snapshot was created from.
4191 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
4192 # `[email protected]` or
4193 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
4194 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
4195 # operation, this field will be populated.
4196 {
4197 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
4198 # Engine returns NO_RESULTS_ON_PAGE if there
4199 # are no results in the response.
4200 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
4201 # value format. For example:
4202 #
4203 # &quot;data&quot;: [
4204 # {
4205 # &quot;key&quot;: &quot;scope&quot;,
4206 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
4207 # }
4208 {
4209 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
4210 # returned. For example, for warnings where there are no results in a list
4211 # request for a particular zone, this key might be scope and
4212 # the key value might be the zone name. Other examples might be a key
4213 # indicating a deprecated resource and a suggested replacement, or a
4214 # warning about invalid network settings (for example, if an instance
4215 # attempts to perform IP forwarding but is not enabled for IP forwarding).
4216 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4217 },
4218 ],
4219 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4220 },
4221 ],
4222 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
4223 # applicable when performing per-zone operations.
4224 }</pre>
4225 </div>
4226
4227 <div class="method">
4228 <code class="details" id="list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
4229 <pre>List all the policies that have been configured for the specified
4230 organization.
4231
4232 Use this API to read Cloud Armor policies. Previously, alpha and beta
4233 versions of this API were used to read firewall policies. This usage is now
4234 disabled for most organizations. Use firewallPolicies.list instead.
4235
4236 Args:
4237 filter: string, A filter expression that filters resources listed in the response. Most
4238 Compute resources support two types of filter expressions:
4239 expressions that support regular expressions and expressions that follow
4240 API improvement proposal AIP-160.
4241 These two types of filter expressions cannot be mixed in one request.
4242
4243 If you want to use AIP-160, your expression must specify the field name, an
4244 operator, and the value that you want to use for filtering. The value
4245 must be a string, a number, or a boolean. The operator
4246 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
4247
4248 For example, if you are filtering Compute Engine instances, you can
4249 exclude instances named `example-instance` by specifying
4250 `name != example-instance`.
4251
4252 The `:*` comparison can be used to test whether a key has been defined.
4253 For example, to find all objects with `owner` label use:
4254 ```
4255 labels.owner:*
4256 ```
4257
4258 You can also filter nested fields. For example, you could specify
4259 `scheduling.automaticRestart = false` to include instances only
4260 if they are not scheduled for automatic restarts. You can use filtering
4261 on nested fields to filter based onresource labels.
4262
4263 To filter on multiple expressions, provide each separate expression within
4264 parentheses. For example:
4265 ```
4266 (scheduling.automaticRestart = true)
4267 (cpuPlatform = &quot;Intel Skylake&quot;)
4268 ```
4269 By default, each expression is an `AND` expression. However, you
4270 can include `AND` and `OR` expressions explicitly.
4271 For example:
4272 ```
4273 (cpuPlatform = &quot;Intel Skylake&quot;) OR
4274 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
4275 (scheduling.automaticRestart = true)
4276 ```
4277
4278 If you want to use a regular expression, use the `eq` (equal) or `ne`
4279 (not equal) operator against a single un-parenthesized expression with or
4280 without quotes or against multiple parenthesized expressions. Examples:
4281
4282 `fieldname eq unquoted literal`
4283 `fieldname eq &#x27;single quoted literal&#x27;`
4284 `fieldname eq &quot;double quoted literal&quot;`
4285 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
4286
4287 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
4288 The literal value must match the entire field.
4289
4290 For example, to filter for instances that do not end with name &quot;instance&quot;,
4291 you would use `name ne .*instance`.
4292
4293 You cannot combine constraints on multiple fields using regular
4294 expressions.
4295 maxResults: integer, The maximum number of results per page that should be returned.
4296 If the number of available results is larger than `maxResults`,
4297 Compute Engine returns a `nextPageToken` that can be used to get
4298 the next page of results in subsequent list requests. Acceptable values are
4299 `0` to `500`, inclusive. (Default: `500`)
4300 orderBy: string, Sorts list results by a certain order. By default, results
4301 are returned in alphanumerical order based on the resource name.
4302
4303 You can also sort results in descending order based on the creation
4304 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
4305 results based on the `creationTimestamp` field in
4306 reverse chronological order (newest result first). Use this to sort
4307 resources like operations so that the newest operation is returned first.
4308
4309 Currently, only sorting by `name` or
4310 `creationTimestamp desc` is supported.
4311 pageToken: string, Specifies a page token to use. Set `pageToken` to the
4312 `nextPageToken` returned by a previous list request to get
4313 the next page of results.
4314 parentId: string, Parent ID for this request.
4315 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
4316 of failure. The default value is false.
4317
4318 For example, when partial success behavior is enabled, aggregatedList for a
4319 single zone scope either returns all resources in the zone or no resources,
4320 with an error code.
4321 x__xgafv: string, V1 error format.
4322 Allowed values
4323 1 - v1 error format
4324 2 - v2 error format
4325
4326 Returns:
4327 An object of the form:
4328
4329 {
4330 &quot;etag&quot;: &quot;A String&quot;,
4331 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
4332 &quot;items&quot;: [ # A list of SecurityPolicy resources.
4333 { # Represents a Google Cloud Armor security policy resource.
4334 #
4335 # Only external backend services that use load balancers can
4336 # reference a security policy. For more information, see
4337 # Google Cloud Armor security policy overview.
4338 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
4339 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
4340 &quot;confidenceThreshold&quot;: 3.14,
4341 &quot;expirationSec&quot;: 42,
4342 &quot;impactedBaselineThreshold&quot;: 3.14,
4343 &quot;loadThreshold&quot;: 3.14,
4344 },
4345 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
4346 # This field is only supported in Global Security Policies of type
4347 # CLOUD_ARMOR.
4348 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
4349 # This field is only supported in Global Security Policies of type
4350 # CLOUD_ARMOR.
4351 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
4352 # STANDARD - opaque rules. (default)
4353 # PREMIUM - transparent rules.
4354 # This field is only supported in Global Security Policies of type
4355 # CLOUD_ARMOR.
4356 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
4357 # customizable thresholds.
4358 {
4359 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
4360 &quot;autoDeployExpirationSec&quot;: 42,
4361 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
4362 &quot;autoDeployLoadThreshold&quot;: 3.14,
4363 &quot;detectionAbsoluteQps&quot;: 3.14,
4364 &quot;detectionLoadThreshold&quot;: 3.14,
4365 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
4366 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
4367 # The name must be unique within the security policy.
4368 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
4369 # on specified granular traffic units.
4370 { # Configurations to specifc granular traffic units processed by
4371 # Adaptive Protection.
4372 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
4373 # type constitutes a separate traffic unit.
4374 # It can only be set to true if `value` is empty.
4375 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
4376 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
4377 },
4378 ],
4379 },
4380 ],
4381 },
4382 },
4383 &quot;advancedOptionsConfig&quot;: {
4384 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
4385 # json_parsing is set to STANDARD.
4386 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
4387 #
4388 # As per RFC 1341, a Content-Type header value has the following format:
4389 #
4390 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
4391 #
4392 # When configuring a custom Content-Type header value, only the
4393 # type/subtype needs to be specified, and the parameters should be
4394 # excluded.
4395 &quot;A String&quot;,
4396 ],
4397 },
4398 &quot;jsonParsing&quot;: &quot;A String&quot;,
4399 &quot;logLevel&quot;: &quot;A String&quot;,
4400 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
4401 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
4402 # Values are case insensitive.
4403 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
4404 # resolving the callers client IP address.
4405 &quot;A String&quot;,
4406 ],
4407 },
4408 &quot;associations&quot;: [ # A list of associations that belong to this policy.
4409 {
4410 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
4411 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
4412 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
4413 &quot;A String&quot;,
4414 ],
4415 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
4416 &quot;A String&quot;,
4417 ],
4418 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
4419 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
4420 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
4421 },
4422 ],
4423 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
4424 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
4425 },
4426 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
4427 # text format.
4428 &quot;ddosProtectionConfig&quot;: {
4429 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
4430 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
4431 # builds DDoS mitigations that minimize collateral damage. It quantifies
4432 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
4433 # blocked.
4434 #
4435 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
4436 # not be deployed. Using a lower value will prioritize keeping collateral
4437 # damage low, possibly at the cost of its effectiveness in rate limiting
4438 # some or all of the attack. It should typically be unset, so Advanced DDoS
4439 # (and Adaptive Protection) uses the best mitigation it can find. Setting
4440 # the threshold is advised if there are logs for false positive detections
4441 # with high collateral damage, and will cause Advanced DDoS to attempt to
4442 # find a less aggressive rule that satisfies the constraint. If a suitable
4443 # rule cannot be found, the system falls back to either no mitigation for
4444 # smaller attacks or broader network throttles for larger ones.
4445 &quot;ddosProtection&quot;: &quot;A String&quot;,
4446 },
4447 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4448 # create the resource.
4449 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
4450 # unique in the organization in which the security policy is created. This
4451 # should only be used when SecurityPolicyType is FIREWALL.
4452 # The name must be 1-63 characters long, and comply with
4453 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
4454 # characters long and match the regular expression
4455 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
4456 # lowercase letter, and all following characters must be a dash, lowercase
4457 # letter, or digit, except the last character, which cannot be a dash.
4458 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
4459 # the metadata&#x27;s contents and used for optimistic locking. The
4460 # fingerprint is initially generated by Compute Engine and changes after
4461 # every request to modify or update metadata. You must always provide an
4462 # up-to-date fingerprint hash in order to update or change metadata,
4463 # otherwise the request will fail with error412 conditionNotMet.
4464 #
4465 # To see the latest fingerprint, make get() request to the
4466 # security policy.
4467 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
4468 # defined by the server.
4469 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
4470 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
4471 # is essentially a hash of the labels set used for optimistic locking. The
4472 # fingerprint is initially generated by Compute Engine and changes after
4473 # every request to modify or update labels. You must always provide an
4474 # up-to-date fingerprint hash in order to update or change labels.
4475 #
4476 # To see the latest fingerprint, make get() request to the
4477 # security policy.
4478 &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.
4479 # Label values may be empty.
4480 &quot;a_key&quot;: &quot;A String&quot;,
4481 },
4482 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
4483 # The name must be 1-63 characters long, and comply withRFC1035.
4484 # Specifically, the name must be 1-63 characters long and match the regular
4485 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
4486 # character must be a lowercase letter, and all following characters must
4487 # be a dash, lowercase letter, or digit, except the last character, which
4488 # cannot be a dash.
4489 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
4490 &quot;recaptchaOptionsConfig&quot;: {
4491 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
4492 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
4493 # the security policy. The specified site key needs to be created from the
4494 # reCAPTCHA API. The user is responsible for the validity of the specified
4495 # site key. If not specified, a Google-managed site key is used.
4496 # This field is only supported in Global Security Policies of type
4497 # CLOUD_ARMOR.
4498 },
4499 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
4500 # resides. This field is not applicable to global security policies.
4501 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
4502 # policy can not exceed a set number of tuples.
4503 &quot;rules&quot;: [ # A list of rules that belong to this policy.
4504 # There must always be a default rule which is a rule with priority
4505 # 2147483647 and match all condition (for the match condition this means
4506 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
4507 # must be either match &quot;*&quot; or not set). If no rules are provided when
4508 # creating a security policy, a default rule with action &quot;allow&quot; will be
4509 # added.
4510 { # Represents a rule that describes one or more match conditions along with
4511 # the action to be taken when traffic matches this condition (allow or deny).
4512 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
4513 # The following are the valid actions:
4514 #
4515 # - allow: allow access to target.
4516 # - deny(STATUS): deny access to target, returns the
4517 # HTTP response code specified. Valid values for `STATUS`
4518 # are 403, 404, and 502.
4519 # - rate_based_ban: limit client traffic to the configured
4520 # threshold and ban the client if the traffic exceeds the threshold.
4521 # Configure parameters for this action in RateLimitOptions. Requires
4522 # rate_limit_options to be set.
4523 # - redirect: redirect to a different target. This can
4524 # either be an internal reCAPTCHA redirect, or an external URL-based
4525 # redirect via a 302 response. Parameters for this action can be configured
4526 # via redirectOptions. This action is only supported in Global Security
4527 # Policies of type CLOUD_ARMOR.
4528 # - throttle: limit
4529 # client traffic to the configured threshold. Configure parameters for this
4530 # action in rateLimitOptions. Requires rate_limit_options to be set for
4531 # this.
4532 # - fairshare (preview only): when traffic reaches the
4533 # threshold limit, requests from the clients matching this rule begin to be
4534 # rate-limited using the Fair Share algorithm. This action is only allowed
4535 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
4536 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4537 # create the resource.
4538 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
4539 # specified when versioned_expr is set to FIREWALL.
4540 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
4541 # enabled, logs will be exported to the configured export destination in
4542 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
4543 # cannot enable logging on &quot;goto_next&quot; rules.
4544 #
4545 # This field may only be specified when the versioned_expr is set to
4546 # FIREWALL.
4547 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
4548 # This field is only supported in Global Security Policies of type
4549 # CLOUD_ARMOR.
4550 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
4551 # present.
4552 {
4553 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
4554 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
4555 },
4556 ],
4557 },
4558 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
4559 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
4560 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
4561 # Exactly one field must be specified.
4562 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
4563 # This field must be specified if versioned_expr is specified and cannot
4564 # be specified if versioned_expr is not specified.
4565 &quot;destIpRanges&quot;: [ # CIDR IP address range.
4566 #
4567 # This field may only be specified when versioned_expr is set to
4568 # FIREWALL.
4569 &quot;A String&quot;,
4570 ],
4571 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
4572 #
4573 # This field may only be specified when versioned_expr is set to
4574 # FIREWALL.
4575 {
4576 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
4577 # required when creating a firewall rule. This value can either be
4578 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
4579 # protocol number.
4580 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
4581 # only applicable for UDP or TCP protocol. Each entry must be either
4582 # an integer or a range. If not specified, this rule applies to
4583 # connections through any port.
4584 #
4585 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
4586 #
4587 # This field may only be specified when versioned_expr is set to
4588 # FIREWALL.
4589 &quot;A String&quot;,
4590 ],
4591 },
4592 ],
4593 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
4594 #
4595 # This field may only be specified when versioned_expr is set to
4596 # FIREWALL.
4597 {
4598 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
4599 # required when creating a firewall rule. This value can either be
4600 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
4601 # protocol number.
4602 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
4603 # only applicable for UDP or TCP protocol. Each entry must be either
4604 # an integer or a range. If not specified, this rule applies to
4605 # connections through any port.
4606 #
4607 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
4608 #
4609 # This field may only be specified when versioned_expr is set to
4610 # FIREWALL.
4611 &quot;A String&quot;,
4612 ],
4613 },
4614 ],
4615 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
4616 # Maximum number of src_ip_ranges allowed is 10.
4617 &quot;A String&quot;,
4618 ],
4619 },
4620 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
4621 # A CEVAL expression is used to specify match criteria such as origin.ip,
4622 # source.region_code and contents in the request header.
4623 # Expressions containing `evaluateThreatIntelligence` require a Cloud
4624 # Armor Enterprise subscription and are not supported in Edge Policies
4625 # nor in Regional Policies. Expressions containing
4626 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
4627 # Enterprise subscription and are only supported in Global Security
4628 # Policies.
4629 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4630 # are documented at https://github.com/google/cel-spec.
4631 #
4632 # Example (Comparison):
4633 #
4634 # title: &quot;Summary size limit&quot;
4635 # description: &quot;Determines if a summary is less than 100 chars&quot;
4636 # expression: &quot;document.summary.size() &lt; 100&quot;
4637 #
4638 # Example (Equality):
4639 #
4640 # title: &quot;Requestor is owner&quot;
4641 # description: &quot;Determines if requestor is the document owner&quot;
4642 # expression: &quot;document.owner == request.auth.claims.email&quot;
4643 #
4644 # Example (Logic):
4645 #
4646 # title: &quot;Public documents&quot;
4647 # description: &quot;Determine whether the document should be publicly visible&quot;
4648 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4649 #
4650 # Example (Data Manipulation):
4651 #
4652 # title: &quot;Notification string&quot;
4653 # description: &quot;Create a notification string with a timestamp.&quot;
4654 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4655 #
4656 # The exact variables and functions that may be referenced within an expression
4657 # are determined by the service that evaluates it. See the service
4658 # documentation for additional information.
4659 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4660 # describes the expression, e.g. when hovered over it in a UI.
4661 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4662 # syntax.
4663 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4664 # reporting, e.g. a file name and a position in the file.
4665 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4666 # its purpose. This can be used e.g. in UIs which allow to enter the
4667 # expression.
4668 },
4669 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
4670 # CEVAL expression (i.e., &#x27;expr&#x27;).
4671 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
4672 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
4673 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4674 # action-tokens. The provided site keys need to be created from
4675 # reCAPTCHA API under the same project where the security policy is
4676 # created.
4677 &quot;A String&quot;,
4678 ],
4679 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4680 # session-tokens. The provided site keys need to be created from
4681 # reCAPTCHA API under the same project where the security policy is
4682 # created.
4683 &quot;A String&quot;,
4684 ],
4685 },
4686 },
4687 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
4688 # If this field is specified, config must also be specified.
4689 # Available preconfigured expressions along with their requirements are:
4690 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
4691 # config.
4692 },
4693 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
4694 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
4695 # &#x27;action&#x27; is enforced.
4696 #
4697 # The match criteria for a rule consists of built-in match fields (like
4698 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
4699 # (&#x27;userDefinedFields&#x27;).
4700 #
4701 # Field values may be extracted directly from the packet or derived from it
4702 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
4703 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
4704 # header is found in the packet and the entire field is in bounds.
4705 #
4706 # Each match field may specify which values can match it, listing one or
4707 # more ranges, prefixes, or exact values that are considered a match for
4708 # the field. A field value must be present in order to match a specified
4709 # match field. If no match values are specified for a match field, then any
4710 # field value is considered to match it, and it&#x27;s not required to be
4711 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
4712 #
4713 # For a packet to match a rule, all specified match fields must match the
4714 # corresponding field values derived from the packet.
4715 #
4716 # Example:
4717 #
4718 # networkMatch:
4719 # srcIpRanges:
4720 # - &quot;192.0.2.0/24&quot;
4721 # - &quot;198.51.100.0/24&quot;
4722 # userDefinedFields:
4723 # - name: &quot;ipv4_fragment_offset&quot;
4724 # values:
4725 # - &quot;1-0x1fff&quot;
4726 #
4727 # The above match condition matches packets with a source IP in
4728 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
4729 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
4730 # against.
4731 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
4732 # format.
4733 &quot;A String&quot;,
4734 ],
4735 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4736 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4737 &quot;A String&quot;,
4738 ],
4739 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
4740 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
4741 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
4742 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
4743 &quot;A String&quot;,
4744 ],
4745 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
4746 42,
4747 ],
4748 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
4749 &quot;A String&quot;,
4750 ],
4751 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4752 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4753 &quot;A String&quot;,
4754 ],
4755 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
4756 # IP address.
4757 &quot;A String&quot;,
4758 ],
4759 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
4760 # matching values for that field.
4761 {
4762 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
4763 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
4764 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
4765 # range (e.g. &quot;0x400-0x7ff&quot;).
4766 &quot;A String&quot;,
4767 ],
4768 },
4769 ],
4770 },
4771 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
4772 # does not evaluate preconfigured WAF rules, i.e., if
4773 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
4774 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
4775 {
4776 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
4777 # preconfigured WAF evaluation.
4778 {
4779 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4780 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4781 },
4782 ],
4783 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
4784 # inspection during preconfigured WAF evaluation.
4785 {
4786 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4787 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4788 },
4789 ],
4790 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
4791 # inspection during preconfigured WAF evaluation.
4792 {
4793 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4794 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4795 },
4796 ],
4797 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
4798 # from inspection during preconfigured WAF evaluation. Note that the
4799 # parameter can be in the query string or in the POST body.
4800 {
4801 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4802 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4803 },
4804 ],
4805 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
4806 # inspection during preconfigured WAF evaluation. When specifying this
4807 # field, the query or fragment part should be excluded.
4808 {
4809 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4810 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4811 },
4812 ],
4813 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
4814 # preconfigured WAF exclusion. If omitted, it refers to all the rule
4815 # IDs under the WAF rule set.
4816 &quot;A String&quot;,
4817 ],
4818 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
4819 },
4820 ],
4821 },
4822 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
4823 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
4824 # must be a positive value between 0 and 2147483647.
4825 # Rules are evaluated from highest to lowest priority where 0 is the
4826 # highest priority and 2147483647 is the lowest priority.
4827 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
4828 # &quot;fairshare&quot;. Cannot be specified for any other actions.
4829 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
4830 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
4831 # the traffic will continue to be banned by the rate limit after the
4832 # rate falls below the threshold.
4833 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
4834 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
4835 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
4836 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
4837 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
4838 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
4839 },
4840 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
4841 # threshold. Valid option is &quot;allow&quot; only.
4842 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4843 # values are:
4844 #
4845 # - ALL: A single rate limit threshold is applied to all
4846 # the requests matching this rule. This is the default value if
4847 # &quot;enforceOnKey&quot; is not configured.
4848 # - IP: The source IP address of
4849 # the request is the key. Each IP has this limit enforced
4850 # separately.
4851 # - HTTP_HEADER: The value of the HTTP
4852 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4853 # value is truncated to the first 128 bytes of the header value. If no
4854 # such header is present in the request, the key type defaults toALL.
4855 # - XFF_IP: The first IP address (i.e. the
4856 # originating client IP address) specified in the list of IPs under
4857 # X-Forwarded-For HTTP header. If no such header is present or the value
4858 # is not a valid IP, the key defaults to the source IP address of
4859 # the request i.e. key type IP.
4860 # - HTTP_COOKIE: The value of the HTTP
4861 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4862 # value is truncated to the first 128 bytes of the cookie value. If no
4863 # such cookie is present in the request, the key type defaults toALL.
4864 # - HTTP_PATH: The URL path of the HTTP request. The key
4865 # value is truncated to the first 128 bytes.
4866 # - SNI: Server name indication in the TLS session of the
4867 # HTTPS request. The key value is truncated to the first 128 bytes. The
4868 # key type defaults to ALL on a HTTP session.
4869 # - REGION_CODE: The country/region from which the request
4870 # originates.
4871 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4872 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4873 # key type defaults to ALL.
4874 # - USER_IP: The IP address of the originating client,
4875 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4876 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
4877 # an IP address cannot be resolved from it, the key type defaults toIP.
4878 #
4879 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4880 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4881 # key type defaults to ALL.
4882 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
4883 # limit threshold is enforced for all the requests matching the rule.
4884 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
4885 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
4886 # ratelimit threshold/action is enforced. You can specify up to 3
4887 # enforce_on_key_configs. If enforce_on_key_configs is specified,
4888 # enforce_on_key must not be specified.
4889 {
4890 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4891 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
4892 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
4893 # taken as the key value.
4894 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4895 # values are:
4896 #
4897 # - ALL: A single rate limit threshold is applied to all
4898 # the requests matching this rule. This is the default value if
4899 # &quot;enforceOnKeyConfigs&quot; is not configured.
4900 # - IP: The source IP address of
4901 # the request is the key. Each IP has this limit enforced
4902 # separately.
4903 # - HTTP_HEADER: The value of the HTTP
4904 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4905 # value is truncated to the first 128 bytes of the header value. If no
4906 # such header is present in the request, the key type defaults toALL.
4907 # - XFF_IP: The first IP address (i.e. the
4908 # originating client IP address) specified in the list of IPs under
4909 # X-Forwarded-For HTTP header. If no such header is present or the
4910 # value is not a valid IP, the key defaults to the source IP address of
4911 # the request i.e. key type IP.
4912 # - HTTP_COOKIE: The value of the HTTP
4913 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4914 # value is truncated to the first 128 bytes of the cookie value. If no
4915 # such cookie is present in the request, the key type defaults toALL.
4916 # - HTTP_PATH: The URL path of the HTTP request. The key
4917 # value is truncated to the first 128 bytes.
4918 # - SNI: Server name indication in the TLS session of
4919 # the HTTPS request. The key value is truncated to the first 128 bytes.
4920 # The key type defaults to ALL on a HTTP session.
4921 # - REGION_CODE: The country/region from which the
4922 # request originates.
4923 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4924 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4925 # key type defaults to ALL.
4926 # - USER_IP: The IP address of the originating client,
4927 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4928 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
4929 # or an IP address cannot be resolved from it, the key type defaults toIP.
4930 #
4931 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4932 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4933 # key type defaults to ALL.
4934 },
4935 ],
4936 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4937 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
4938 # value.
4939 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
4940 # value.
4941 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
4942 # threshold, to either deny with a specified HTTP response code, or
4943 # redirect to a different endpoint.
4944 # Valid options are `deny(STATUS)`, where valid values for
4945 # `STATUS` are 403, 404, 429, and 502, and
4946 # `redirect`, where the redirect parameters come from
4947 # `exceedRedirectOptions` below.
4948 # The `redirect` action is only supported in Global Security Policies of
4949 # type CLOUD_ARMOR.
4950 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
4951 # above the configured rate limit threshold
4952 &quot;code&quot;: 42, # The status code, which should be an enum value of
4953 # google.rpc.Code.
4954 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
4955 },
4956 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
4957 # action. Cannot be specified if the exceed action is not redirect.
4958 # This field is only supported in Global Security Policies of type
4959 # CLOUD_ARMOR.
4960 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
4961 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
4962 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
4963 #
4964 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
4965 # challenge assessment.
4966 # - EXTERNAL_302: redirect to a different URL via a 302
4967 # response.
4968 },
4969 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
4970 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
4971 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
4972 },
4973 },
4974 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
4975 # other actions.
4976 # This field is only supported in Global Security Policies of type
4977 # CLOUD_ARMOR.
4978 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
4979 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
4980 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
4981 #
4982 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
4983 # challenge assessment.
4984 # - EXTERNAL_302: redirect to a different URL via a 302
4985 # response.
4986 },
4987 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
4988 # other actions.
4989 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
4990 # rule.
4991 # [Deprecated] Use requiredManagedProtectionTiers instead.
4992 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
4993 # policy. This can only be set during rule creation, if rule number is not
4994 # specified it will be generated by the server.
4995 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
4996 # policy rule.
4997 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
4998 # allows you to control which network&#x27;s VMs get this rule. If this field
4999 # is left blank, all VMs within the organization will receive the rule.
5000 #
5001 # This field may only be specified when versioned_expr is set to FIREWALL.
5002 &quot;A String&quot;,
5003 ],
5004 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
5005 # applied with this rule.
5006 &quot;A String&quot;,
5007 ],
5008 },
5009 ],
5010 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
5011 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
5012 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5013 # unique in the organization in which the security policy is created. This
5014 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
5015 # The name must be 1-63 characters long, and comply with
5016 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5017 # characters long and match the regular expression
5018 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5019 # lowercase letter, and all following characters must be a dash, lowercase
5020 # letter, or digit, except the last character, which cannot be a dash.
5021 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
5022 #
5023 # - CLOUD_ARMOR: Cloud Armor backend security policies can
5024 # be configured to filter incoming HTTP requests targeting backend services.
5025 # They filter requests before they hit the origin servers.
5026 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
5027 # be configured to filter incoming HTTP requests targeting backend services
5028 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
5029 # They filter requests before the request is served from Google&#x27;s cache.
5030 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
5031 # internal service policies can be configured to filter HTTP requests
5032 # targeting services managed by Traffic Director in a service mesh. They
5033 # filter requests before the request is served from the application.
5034 #
5035 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
5036 # can be configured to filter packets targeting network load balancing
5037 # resources such as backend services, target pools, target instances, and
5038 # instances with external IPs. They filter requests before the request is
5039 # served from the application.
5040 #
5041 #
5042 # This field can be set only at resource creation time.
5043 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
5044 # user-defined field consists of up to 4 bytes extracted from a fixed offset
5045 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
5046 # optional mask to select certain bits. Rules may then specify matching
5047 # values for these fields.
5048 #
5049 # Example:
5050 #
5051 # userDefinedFields:
5052 # - name: &quot;ipv4_fragment_offset&quot;
5053 # base: IPV4
5054 # offset: 6
5055 # size: 2
5056 # mask: &quot;0x1fff&quot;
5057 {
5058 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
5059 #
5060 # - IPV4: Points to the beginning of the IPv4 header.
5061 # - IPV6: Points to the beginning of the IPv6 header.
5062 # - TCP: Points to the beginning of the TCP header, skipping
5063 # over any IPv4 options or IPv6 extension headers. Not present for
5064 # non-first fragments.
5065 # - UDP: Points to the beginning of the UDP header, skipping
5066 # over any IPv4 options or IPv6 extension headers. Not present for
5067 # non-first fragments.
5068 #
5069 #
5070 # required
5071 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
5072 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
5073 # The last byte of the field (in network byte order) corresponds to the
5074 # least significant byte of the mask.
5075 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
5076 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
5077 # &#x27;base&#x27;.
5078 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
5079 },
5080 ],
5081 },
5082 ],
5083 &quot;kind&quot;: &quot;compute#securityPolicyList&quot;, # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyList for listsof securityPolicies
5084 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
5085 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
5086 # the query parameter pageToken in the next list request.
5087 # Subsequent list requests will have their own nextPageToken to
5088 # continue paging through the results.
5089 &quot;unreachables&quot;: [ # Output only. [Output Only] Unreachable resources.
5090 &quot;A String&quot;,
5091 ],
5092 &quot;warning&quot;: { # [Output Only] Informational warning message.
5093 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
5094 # Engine returns NO_RESULTS_ON_PAGE if there
5095 # are no results in the response.
5096 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
5097 # value format. For example:
5098 #
5099 # &quot;data&quot;: [
5100 # {
5101 # &quot;key&quot;: &quot;scope&quot;,
5102 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
5103 # }
5104 {
5105 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
5106 # returned. For example, for warnings where there are no results in a list
5107 # request for a particular zone, this key might be scope and
5108 # the key value might be the zone name. Other examples might be a key
5109 # indicating a deprecated resource and a suggested replacement, or a
5110 # warning about invalid network settings (for example, if an instance
5111 # attempts to perform IP forwarding but is not enabled for IP forwarding).
5112 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5113 },
5114 ],
5115 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5116 },
5117 }</pre>
5118 </div>
5119
5120 <div class="method">
5121 <code class="details" id="listAssociations">listAssociations(targetResource=None, x__xgafv=None)</code>
5122 <pre>Lists associations of a specified target, i.e., organization or folder.
5123
5124 Use this API to read Cloud Armor policies. Previously, alpha and beta
5125 versions of this API were used to read firewall policies. This usage is
5126 now disabled for most organizations. Use firewallPolicies.listAssociations
5127 instead.
5128
5129 Args:
5130 targetResource: string, The target resource to list associations. It is an organization, or a
5131 folder.
5132 x__xgafv: string, V1 error format.
5133 Allowed values
5134 1 - v1 error format
5135 2 - v2 error format
5136
5137 Returns:
5138 An object of the form:
5139
5140 {
5141 &quot;associations&quot;: [ # A list of associations.
5142 {
5143 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
5144 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
5145 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
5146 &quot;A String&quot;,
5147 ],
5148 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
5149 &quot;A String&quot;,
5150 ],
5151 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
5152 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
5153 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
5154 },
5155 ],
5156 &quot;kind&quot;: &quot;compute#organizationSecurityPoliciesListAssociationsResponse&quot;, # Output only. [Output Only] Type of securityPolicy associations. Alwayscompute#organizationSecurityPoliciesListAssociations for lists
5157 # of securityPolicy associations.
5158 }</pre>
5159 </div>
5160
5161 <div class="method">
5162 <code class="details" id="listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
5163 <pre>Gets the current list of preconfigured Web Application Firewall (WAF)
5164 expressions.
5165
5166 Args:
5167 filter: string, A filter expression that filters resources listed in the response. Most
5168 Compute resources support two types of filter expressions:
5169 expressions that support regular expressions and expressions that follow
5170 API improvement proposal AIP-160.
5171 These two types of filter expressions cannot be mixed in one request.
5172
5173 If you want to use AIP-160, your expression must specify the field name, an
5174 operator, and the value that you want to use for filtering. The value
5175 must be a string, a number, or a boolean. The operator
5176 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
5177
5178 For example, if you are filtering Compute Engine instances, you can
5179 exclude instances named `example-instance` by specifying
5180 `name != example-instance`.
5181
5182 The `:*` comparison can be used to test whether a key has been defined.
5183 For example, to find all objects with `owner` label use:
5184 ```
5185 labels.owner:*
5186 ```
5187
5188 You can also filter nested fields. For example, you could specify
5189 `scheduling.automaticRestart = false` to include instances only
5190 if they are not scheduled for automatic restarts. You can use filtering
5191 on nested fields to filter based onresource labels.
5192
5193 To filter on multiple expressions, provide each separate expression within
5194 parentheses. For example:
5195 ```
5196 (scheduling.automaticRestart = true)
5197 (cpuPlatform = &quot;Intel Skylake&quot;)
5198 ```
5199 By default, each expression is an `AND` expression. However, you
5200 can include `AND` and `OR` expressions explicitly.
5201 For example:
5202 ```
5203 (cpuPlatform = &quot;Intel Skylake&quot;) OR
5204 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
5205 (scheduling.automaticRestart = true)
5206 ```
5207
5208 If you want to use a regular expression, use the `eq` (equal) or `ne`
5209 (not equal) operator against a single un-parenthesized expression with or
5210 without quotes or against multiple parenthesized expressions. Examples:
5211
5212 `fieldname eq unquoted literal`
5213 `fieldname eq &#x27;single quoted literal&#x27;`
5214 `fieldname eq &quot;double quoted literal&quot;`
5215 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
5216
5217 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
5218 The literal value must match the entire field.
5219
5220 For example, to filter for instances that do not end with name &quot;instance&quot;,
5221 you would use `name ne .*instance`.
5222
5223 You cannot combine constraints on multiple fields using regular
5224 expressions.
5225 maxResults: integer, The maximum number of results per page that should be returned.
5226 If the number of available results is larger than `maxResults`,
5227 Compute Engine returns a `nextPageToken` that can be used to get
5228 the next page of results in subsequent list requests. Acceptable values are
5229 `0` to `500`, inclusive. (Default: `500`)
5230 orderBy: string, Sorts list results by a certain order. By default, results
5231 are returned in alphanumerical order based on the resource name.
5232
5233 You can also sort results in descending order based on the creation
5234 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
5235 results based on the `creationTimestamp` field in
5236 reverse chronological order (newest result first). Use this to sort
5237 resources like operations so that the newest operation is returned first.
5238
5239 Currently, only sorting by `name` or
5240 `creationTimestamp desc` is supported.
5241 pageToken: string, Specifies a page token to use. Set `pageToken` to the
5242 `nextPageToken` returned by a previous list request to get
5243 the next page of results.
5244 parentId: string, Parent ID for this request.
5245 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
5246 of failure. The default value is false.
5247
5248 For example, when partial success behavior is enabled, aggregatedList for a
5249 single zone scope either returns all resources in the zone or no resources,
5250 with an error code.
5251 x__xgafv: string, V1 error format.
5252 Allowed values
5253 1 - v1 error format
5254 2 - v2 error format
5255
5256 Returns:
5257 An object of the form:
5258
5259 {
5260 &quot;preconfiguredExpressionSets&quot;: {
5261 &quot;wafRules&quot;: {
5262 &quot;expressionSets&quot;: [ # List of entities that are currently supported for WAF rules.
5263 {
5264 &quot;aliases&quot;: [ # A list of alternate IDs. The format should be:
5265 # - E.g. XSS-stable
5266 # Generic suffix like &quot;stable&quot; is particularly useful if a policy
5267 # likes to avail newer set of expressions without having to change
5268 # the policy.
5269 # A given alias name can&#x27;t be used for more than one entity set.
5270 &quot;A String&quot;,
5271 ],
5272 &quot;expressions&quot;: [ # List of available expressions.
5273 {
5274 &quot;id&quot;: &quot;A String&quot;, # Expression ID should uniquely identify the origin of the expression.
5275 # E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
5276 # version 2.9.1 rule id 973337.
5277 # The ID could be used to determine the individual attack definition
5278 # that has been detected. It could also be used to exclude it from
5279 # the policy in case of false positive.
5280 # required
5281 &quot;sensitivity&quot;: 42, # The sensitivity value associated with the WAF rule ID. This corresponds
5282 # to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
5283 # opt-in only rules.
5284 },
5285 ],
5286 &quot;id&quot;: &quot;A String&quot;, # Google specified expression set ID. The format should be:
5287 # - E.g. XSS-20170329
5288 # required
5289 },
5290 ],
5291 },
5292 },
5293 }</pre>
5294 </div>
5295
5296 <div class="method">
5297 <code class="details" id="list_next">list_next()</code>
5298 <pre>Retrieves the next page of results.
5299
5300 Args:
5301 previous_request: The request for the previous page. (required)
5302 previous_response: The response from the request for the previous page. (required)
5303
5304 Returns:
5305 A request object that you can call &#x27;execute()&#x27; on to request the next
5306 page. Returns None if there are no more items in the collection.
5307 </pre>
5308 </div>
5309
5310 <div class="method">
5311 <code class="details" id="move">move(securityPolicy, parentId=None, requestId=None, x__xgafv=None)</code>
5312 <pre>Moves the specified security policy.
5313
5314 Use this API to modify Cloud Armor policies. Previously, alpha and beta
5315 versions of this API were used to modify firewall policies. This usage is
5316 now disabled for most organizations. Use firewallPolicies.move instead.
5317
5318 Args:
5319 securityPolicy: string, Name of the security policy to update. (required)
5320 parentId: string, The new parent of the security policy.
5321 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
5322 that if you must retry your request, the server will know to ignore the
5323 request if it has already been completed.
5324
5325 For example, consider a situation where you make an initial request and
5326 the request times out. If you make the request again with the same
5327 request ID, the server can check if original operation with the same
5328 request ID was received, and if so, will ignore the second request. This
5329 prevents clients from accidentally creating duplicate commitments.
5330
5331 The request ID must be
5332 a valid UUID with the exception that zero UUID is not supported
5333 (00000000-0000-0000-0000-000000000000).
5334 x__xgafv: string, V1 error format.
5335 Allowed values
5336 1 - v1 error format
5337 2 - v2 error format
5338
5339 Returns:
5340 An object of the form:
5341
5342 { # Represents an Operation resource.
5343 #
5344 # Google Compute Engine has three Operation resources:
5345 #
5346 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
5347 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
5348 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
5349 #
5350 # You can use an operation resource to manage asynchronous API requests.
5351 # For more information, readHandling
5352 # API responses.
5353 #
5354 # Operations can be global, regional or zonal.
5355 #
5356 # - For global operations, use the `globalOperations`
5357 # resource.
5358 # - For regional operations, use the
5359 # `regionOperations` resource.
5360 # - For zonal operations, use
5361 # the `zoneOperations` resource.
5362 #
5363 #
5364 #
5365 # For more information, read
5366 # Global, Regional, and Zonal Resources.
5367 #
5368 # Note that completed Operation resources have a limited
5369 # retention period.
5370 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
5371 # Not present otherwise.
5372 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5373 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
5374 # set when the operation is created.
5375 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
5376 # text format.
5377 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
5378 # this field will be populated.
5379 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
5380 # operation.
5381 {
5382 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5383 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
5384 # details. There is a set of defined message types to use for providing
5385 # details.The syntax depends on the error code. For example,
5386 # QuotaExceededInfo will have details when the error code is
5387 # QUOTA_EXCEEDED.
5388 {
5389 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
5390 #
5391 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
5392 # is not enabled:
5393 #
5394 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
5395 # &quot;domain&quot;: &quot;googleapis.com&quot;
5396 # &quot;metadata&quot;: {
5397 # &quot;resource&quot;: &quot;projects/123&quot;,
5398 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
5399 # }
5400 # }
5401 #
5402 # This response indicates that the pubsub.googleapis.com API is not enabled.
5403 #
5404 # Example of an error that is returned when attempting to create a Spanner
5405 # instance in a region that is out of stock:
5406 #
5407 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
5408 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
5409 # &quot;metadata&quot;: {
5410 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
5411 # }
5412 # }
5413 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
5414 # is typically the registered service name of the tool or product that
5415 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
5416 # generated by some common infrastructure, the error domain must be a
5417 # globally unique value that identifies the infrastructure. For Google API
5418 # infrastructure, the error domain is &quot;googleapis.com&quot;.
5419 &quot;metadatas&quot;: { # Additional structured details about this error.
5420 #
5421 # Keys must match a regular expression of `a-z+` but should
5422 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
5423 # length. When identifying the current value of an exceeded limit, the units
5424 # should be contained in the key, not the value. For example, rather than
5425 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
5426 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
5427 # instances that can be created in a single (batch) request.
5428 &quot;a_key&quot;: &quot;A String&quot;,
5429 },
5430 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
5431 # proximate cause of the error. Error reasons are unique within a particular
5432 # domain of errors. This should be at most 63 characters and match a
5433 # regular expression of `A-Z+[A-Z0-9]`, which represents
5434 # UPPER_SNAKE_CASE.
5435 },
5436 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
5437 #
5438 # For example, if a quota check failed with an error indicating the calling
5439 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
5440 # directly to the right place in the developer console to flip the bit.
5441 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
5442 { # Describes a URL link.
5443 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
5444 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
5445 },
5446 ],
5447 },
5448 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
5449 # which can be attached to an RPC error.
5450 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
5451 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
5452 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
5453 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
5454 },
5455 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
5456 &quot;dimensions&quot;: { # The map holding related quota dimensions.
5457 &quot;a_key&quot;: &quot;A String&quot;,
5458 },
5459 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
5460 # type or metric.
5461 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
5462 # or metric.
5463 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
5464 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
5465 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
5466 },
5467 },
5468 ],
5469 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
5470 # This property is optional.
5471 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
5472 },
5473 ],
5474 },
5475 &quot;getVersionOperationMetadata&quot;: {
5476 &quot;inlineSbomInfo&quot;: {
5477 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
5478 # appropriate identifiers.
5479 &quot;a_key&quot;: &quot;A String&quot;,
5480 },
5481 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
5482 # identifiers.
5483 &quot;a_key&quot;: &quot;A String&quot;,
5484 },
5485 },
5486 },
5487 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
5488 # message that was returned, such as `NOT FOUND`.
5489 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
5490 # status code that was returned. For example, a `404` means the
5491 # resource was not found.
5492 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
5493 # defined by the server.
5494 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
5495 # This value is inRFC3339
5496 # text format.
5497 &quot;instancesBulkInsertOperationMetadata&quot;: {
5498 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
5499 # Example key: zones/us-central1-a
5500 &quot;a_key&quot;: {
5501 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
5502 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
5503 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
5504 # error.
5505 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
5506 # if the flow is rolling forward or rolling back.
5507 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
5508 },
5509 },
5510 },
5511 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
5512 # Operation resources.
5513 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5514 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
5515 # group of operations results from a `bulkInsert` API request.
5516 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
5517 # `update`, or `delete`, and so on.
5518 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
5519 # There is no requirement that this be linear or support any granularity of
5520 # operations. This should not be used to guess when the operation will be
5521 # complete. This number should monotonically increase as the operation
5522 # progresses.
5523 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
5524 # applicable when performing regional operations.
5525 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5526 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
5527 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
5528 # this field will contain information on all underlying zonal actions and
5529 # their state.
5530 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
5531 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
5532 # Example key: zones/us-central1-a
5533 &quot;a_key&quot;: {
5534 &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
5535 # populated.
5536 # different programming environments, including REST APIs and RPC APIs. It is
5537 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
5538 # three pieces of data: error code, error message, and error details.
5539 #
5540 # You can find out more about this error model and how to work with it in the
5541 # [API Design Guide](https://cloud.google.com/apis/design/errors).
5542 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
5543 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
5544 # message types for APIs to use.
5545 {
5546 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
5547 },
5548 ],
5549 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
5550 # user-facing error message should be localized and sent in the
5551 # google.rpc.Status.details field, or localized by the client.
5552 },
5553 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
5554 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
5555 },
5556 },
5557 },
5558 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
5559 # This value is inRFC3339
5560 # text format.
5561 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
5562 # following:
5563 # `PENDING`, `RUNNING`, or `DONE`.
5564 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
5565 # operation.
5566 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
5567 # of the target resource.
5568 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
5569 # operations related to creating a snapshot, this points to the disk
5570 # that the snapshot was created from.
5571 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
5572 # `[email protected]` or
5573 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
5574 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
5575 # operation, this field will be populated.
5576 {
5577 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
5578 # Engine returns NO_RESULTS_ON_PAGE if there
5579 # are no results in the response.
5580 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
5581 # value format. For example:
5582 #
5583 # &quot;data&quot;: [
5584 # {
5585 # &quot;key&quot;: &quot;scope&quot;,
5586 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
5587 # }
5588 {
5589 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
5590 # returned. For example, for warnings where there are no results in a list
5591 # request for a particular zone, this key might be scope and
5592 # the key value might be the zone name. Other examples might be a key
5593 # indicating a deprecated resource and a suggested replacement, or a
5594 # warning about invalid network settings (for example, if an instance
5595 # attempts to perform IP forwarding but is not enabled for IP forwarding).
5596 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5597 },
5598 ],
5599 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5600 },
5601 ],
5602 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
5603 # applicable when performing per-zone operations.
5604 }</pre>
5605 </div>
5606
5607 <div class="method">
5608 <code class="details" id="patch">patch(securityPolicy, body=None, requestId=None, updateMask=None, x__xgafv=None)</code>
5609 <pre>Patches the specified policy with the data included in the request.
5610
5611 Use this API to modify Cloud Armor policies. Previously, alpha and beta
5612 versions of this API were used to modify firewall policies. This usage is
5613 now disabled for most organizations. Use firewallPolicies.patch instead.
5614
5615 Args:
5616 securityPolicy: string, Name of the security policy to update. (required)
5617 body: object, The request body.
5618 The object takes the form of:
5619
5620 { # Represents a Google Cloud Armor security policy resource.
5621 #
5622 # Only external backend services that use load balancers can
5623 # reference a security policy. For more information, see
5624 # Google Cloud Armor security policy overview.
5625 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
5626 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
5627 &quot;confidenceThreshold&quot;: 3.14,
5628 &quot;expirationSec&quot;: 42,
5629 &quot;impactedBaselineThreshold&quot;: 3.14,
5630 &quot;loadThreshold&quot;: 3.14,
5631 },
5632 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
5633 # This field is only supported in Global Security Policies of type
5634 # CLOUD_ARMOR.
5635 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
5636 # This field is only supported in Global Security Policies of type
5637 # CLOUD_ARMOR.
5638 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
5639 # STANDARD - opaque rules. (default)
5640 # PREMIUM - transparent rules.
5641 # This field is only supported in Global Security Policies of type
5642 # CLOUD_ARMOR.
5643 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
5644 # customizable thresholds.
5645 {
5646 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
5647 &quot;autoDeployExpirationSec&quot;: 42,
5648 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
5649 &quot;autoDeployLoadThreshold&quot;: 3.14,
5650 &quot;detectionAbsoluteQps&quot;: 3.14,
5651 &quot;detectionLoadThreshold&quot;: 3.14,
5652 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
5653 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
5654 # The name must be unique within the security policy.
5655 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
5656 # on specified granular traffic units.
5657 { # Configurations to specifc granular traffic units processed by
5658 # Adaptive Protection.
5659 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
5660 # type constitutes a separate traffic unit.
5661 # It can only be set to true if `value` is empty.
5662 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
5663 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
5664 },
5665 ],
5666 },
5667 ],
5668 },
5669 },
5670 &quot;advancedOptionsConfig&quot;: {
5671 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
5672 # json_parsing is set to STANDARD.
5673 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
5674 #
5675 # As per RFC 1341, a Content-Type header value has the following format:
5676 #
5677 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
5678 #
5679 # When configuring a custom Content-Type header value, only the
5680 # type/subtype needs to be specified, and the parameters should be
5681 # excluded.
5682 &quot;A String&quot;,
5683 ],
5684 },
5685 &quot;jsonParsing&quot;: &quot;A String&quot;,
5686 &quot;logLevel&quot;: &quot;A String&quot;,
5687 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
5688 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
5689 # Values are case insensitive.
5690 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
5691 # resolving the callers client IP address.
5692 &quot;A String&quot;,
5693 ],
5694 },
5695 &quot;associations&quot;: [ # A list of associations that belong to this policy.
5696 {
5697 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
5698 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
5699 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
5700 &quot;A String&quot;,
5701 ],
5702 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
5703 &quot;A String&quot;,
5704 ],
5705 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
5706 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
5707 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
5708 },
5709 ],
5710 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
5711 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
5712 },
5713 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
5714 # text format.
5715 &quot;ddosProtectionConfig&quot;: {
5716 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
5717 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
5718 # builds DDoS mitigations that minimize collateral damage. It quantifies
5719 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
5720 # blocked.
5721 #
5722 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
5723 # not be deployed. Using a lower value will prioritize keeping collateral
5724 # damage low, possibly at the cost of its effectiveness in rate limiting
5725 # some or all of the attack. It should typically be unset, so Advanced DDoS
5726 # (and Adaptive Protection) uses the best mitigation it can find. Setting
5727 # the threshold is advised if there are logs for false positive detections
5728 # with high collateral damage, and will cause Advanced DDoS to attempt to
5729 # find a less aggressive rule that satisfies the constraint. If a suitable
5730 # rule cannot be found, the system falls back to either no mitigation for
5731 # smaller attacks or broader network throttles for larger ones.
5732 &quot;ddosProtection&quot;: &quot;A String&quot;,
5733 },
5734 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5735 # create the resource.
5736 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5737 # unique in the organization in which the security policy is created. This
5738 # should only be used when SecurityPolicyType is FIREWALL.
5739 # The name must be 1-63 characters long, and comply with
5740 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5741 # characters long and match the regular expression
5742 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5743 # lowercase letter, and all following characters must be a dash, lowercase
5744 # letter, or digit, except the last character, which cannot be a dash.
5745 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
5746 # the metadata&#x27;s contents and used for optimistic locking. The
5747 # fingerprint is initially generated by Compute Engine and changes after
5748 # every request to modify or update metadata. You must always provide an
5749 # up-to-date fingerprint hash in order to update or change metadata,
5750 # otherwise the request will fail with error412 conditionNotMet.
5751 #
5752 # To see the latest fingerprint, make get() request to the
5753 # security policy.
5754 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
5755 # defined by the server.
5756 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
5757 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
5758 # is essentially a hash of the labels set used for optimistic locking. The
5759 # fingerprint is initially generated by Compute Engine and changes after
5760 # every request to modify or update labels. You must always provide an
5761 # up-to-date fingerprint hash in order to update or change labels.
5762 #
5763 # To see the latest fingerprint, make get() request to the
5764 # security policy.
5765 &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.
5766 # Label values may be empty.
5767 &quot;a_key&quot;: &quot;A String&quot;,
5768 },
5769 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
5770 # The name must be 1-63 characters long, and comply withRFC1035.
5771 # Specifically, the name must be 1-63 characters long and match the regular
5772 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
5773 # character must be a lowercase letter, and all following characters must
5774 # be a dash, lowercase letter, or digit, except the last character, which
5775 # cannot be a dash.
5776 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
5777 &quot;recaptchaOptionsConfig&quot;: {
5778 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
5779 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
5780 # the security policy. The specified site key needs to be created from the
5781 # reCAPTCHA API. The user is responsible for the validity of the specified
5782 # site key. If not specified, a Google-managed site key is used.
5783 # This field is only supported in Global Security Policies of type
5784 # CLOUD_ARMOR.
5785 },
5786 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
5787 # resides. This field is not applicable to global security policies.
5788 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
5789 # policy can not exceed a set number of tuples.
5790 &quot;rules&quot;: [ # A list of rules that belong to this policy.
5791 # There must always be a default rule which is a rule with priority
5792 # 2147483647 and match all condition (for the match condition this means
5793 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
5794 # must be either match &quot;*&quot; or not set). If no rules are provided when
5795 # creating a security policy, a default rule with action &quot;allow&quot; will be
5796 # added.
5797 { # Represents a rule that describes one or more match conditions along with
5798 # the action to be taken when traffic matches this condition (allow or deny).
5799 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
5800 # The following are the valid actions:
5801 #
5802 # - allow: allow access to target.
5803 # - deny(STATUS): deny access to target, returns the
5804 # HTTP response code specified. Valid values for `STATUS`
5805 # are 403, 404, and 502.
5806 # - rate_based_ban: limit client traffic to the configured
5807 # threshold and ban the client if the traffic exceeds the threshold.
5808 # Configure parameters for this action in RateLimitOptions. Requires
5809 # rate_limit_options to be set.
5810 # - redirect: redirect to a different target. This can
5811 # either be an internal reCAPTCHA redirect, or an external URL-based
5812 # redirect via a 302 response. Parameters for this action can be configured
5813 # via redirectOptions. This action is only supported in Global Security
5814 # Policies of type CLOUD_ARMOR.
5815 # - throttle: limit
5816 # client traffic to the configured threshold. Configure parameters for this
5817 # action in rateLimitOptions. Requires rate_limit_options to be set for
5818 # this.
5819 # - fairshare (preview only): when traffic reaches the
5820 # threshold limit, requests from the clients matching this rule begin to be
5821 # rate-limited using the Fair Share algorithm. This action is only allowed
5822 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
5823 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5824 # create the resource.
5825 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
5826 # specified when versioned_expr is set to FIREWALL.
5827 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
5828 # enabled, logs will be exported to the configured export destination in
5829 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
5830 # cannot enable logging on &quot;goto_next&quot; rules.
5831 #
5832 # This field may only be specified when the versioned_expr is set to
5833 # FIREWALL.
5834 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
5835 # This field is only supported in Global Security Policies of type
5836 # CLOUD_ARMOR.
5837 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
5838 # present.
5839 {
5840 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
5841 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
5842 },
5843 ],
5844 },
5845 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
5846 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
5847 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
5848 # Exactly one field must be specified.
5849 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
5850 # This field must be specified if versioned_expr is specified and cannot
5851 # be specified if versioned_expr is not specified.
5852 &quot;destIpRanges&quot;: [ # CIDR IP address range.
5853 #
5854 # This field may only be specified when versioned_expr is set to
5855 # FIREWALL.
5856 &quot;A String&quot;,
5857 ],
5858 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
5859 #
5860 # This field may only be specified when versioned_expr is set to
5861 # FIREWALL.
5862 {
5863 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
5864 # required when creating a firewall rule. This value can either be
5865 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
5866 # protocol number.
5867 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
5868 # only applicable for UDP or TCP protocol. Each entry must be either
5869 # an integer or a range. If not specified, this rule applies to
5870 # connections through any port.
5871 #
5872 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
5873 #
5874 # This field may only be specified when versioned_expr is set to
5875 # FIREWALL.
5876 &quot;A String&quot;,
5877 ],
5878 },
5879 ],
5880 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
5881 #
5882 # This field may only be specified when versioned_expr is set to
5883 # FIREWALL.
5884 {
5885 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
5886 # required when creating a firewall rule. This value can either be
5887 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
5888 # protocol number.
5889 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
5890 # only applicable for UDP or TCP protocol. Each entry must be either
5891 # an integer or a range. If not specified, this rule applies to
5892 # connections through any port.
5893 #
5894 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
5895 #
5896 # This field may only be specified when versioned_expr is set to
5897 # FIREWALL.
5898 &quot;A String&quot;,
5899 ],
5900 },
5901 ],
5902 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
5903 # Maximum number of src_ip_ranges allowed is 10.
5904 &quot;A String&quot;,
5905 ],
5906 },
5907 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
5908 # A CEVAL expression is used to specify match criteria such as origin.ip,
5909 # source.region_code and contents in the request header.
5910 # Expressions containing `evaluateThreatIntelligence` require a Cloud
5911 # Armor Enterprise subscription and are not supported in Edge Policies
5912 # nor in Regional Policies. Expressions containing
5913 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
5914 # Enterprise subscription and are only supported in Global Security
5915 # Policies.
5916 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
5917 # are documented at https://github.com/google/cel-spec.
5918 #
5919 # Example (Comparison):
5920 #
5921 # title: &quot;Summary size limit&quot;
5922 # description: &quot;Determines if a summary is less than 100 chars&quot;
5923 # expression: &quot;document.summary.size() &lt; 100&quot;
5924 #
5925 # Example (Equality):
5926 #
5927 # title: &quot;Requestor is owner&quot;
5928 # description: &quot;Determines if requestor is the document owner&quot;
5929 # expression: &quot;document.owner == request.auth.claims.email&quot;
5930 #
5931 # Example (Logic):
5932 #
5933 # title: &quot;Public documents&quot;
5934 # description: &quot;Determine whether the document should be publicly visible&quot;
5935 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
5936 #
5937 # Example (Data Manipulation):
5938 #
5939 # title: &quot;Notification string&quot;
5940 # description: &quot;Create a notification string with a timestamp.&quot;
5941 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
5942 #
5943 # The exact variables and functions that may be referenced within an expression
5944 # are determined by the service that evaluates it. See the service
5945 # documentation for additional information.
5946 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
5947 # describes the expression, e.g. when hovered over it in a UI.
5948 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
5949 # syntax.
5950 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
5951 # reporting, e.g. a file name and a position in the file.
5952 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
5953 # its purpose. This can be used e.g. in UIs which allow to enter the
5954 # expression.
5955 },
5956 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
5957 # CEVAL expression (i.e., &#x27;expr&#x27;).
5958 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
5959 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
5960 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5961 # action-tokens. The provided site keys need to be created from
5962 # reCAPTCHA API under the same project where the security policy is
5963 # created.
5964 &quot;A String&quot;,
5965 ],
5966 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5967 # session-tokens. The provided site keys need to be created from
5968 # reCAPTCHA API under the same project where the security policy is
5969 # created.
5970 &quot;A String&quot;,
5971 ],
5972 },
5973 },
5974 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
5975 # If this field is specified, config must also be specified.
5976 # Available preconfigured expressions along with their requirements are:
5977 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
5978 # config.
5979 },
5980 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
5981 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
5982 # &#x27;action&#x27; is enforced.
5983 #
5984 # The match criteria for a rule consists of built-in match fields (like
5985 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
5986 # (&#x27;userDefinedFields&#x27;).
5987 #
5988 # Field values may be extracted directly from the packet or derived from it
5989 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
5990 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
5991 # header is found in the packet and the entire field is in bounds.
5992 #
5993 # Each match field may specify which values can match it, listing one or
5994 # more ranges, prefixes, or exact values that are considered a match for
5995 # the field. A field value must be present in order to match a specified
5996 # match field. If no match values are specified for a match field, then any
5997 # field value is considered to match it, and it&#x27;s not required to be
5998 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
5999 #
6000 # For a packet to match a rule, all specified match fields must match the
6001 # corresponding field values derived from the packet.
6002 #
6003 # Example:
6004 #
6005 # networkMatch:
6006 # srcIpRanges:
6007 # - &quot;192.0.2.0/24&quot;
6008 # - &quot;198.51.100.0/24&quot;
6009 # userDefinedFields:
6010 # - name: &quot;ipv4_fragment_offset&quot;
6011 # values:
6012 # - &quot;1-0x1fff&quot;
6013 #
6014 # The above match condition matches packets with a source IP in
6015 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
6016 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
6017 # against.
6018 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
6019 # format.
6020 &quot;A String&quot;,
6021 ],
6022 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6023 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6024 &quot;A String&quot;,
6025 ],
6026 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
6027 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
6028 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
6029 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
6030 &quot;A String&quot;,
6031 ],
6032 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
6033 42,
6034 ],
6035 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
6036 &quot;A String&quot;,
6037 ],
6038 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6039 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6040 &quot;A String&quot;,
6041 ],
6042 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
6043 # IP address.
6044 &quot;A String&quot;,
6045 ],
6046 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
6047 # matching values for that field.
6048 {
6049 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
6050 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
6051 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
6052 # range (e.g. &quot;0x400-0x7ff&quot;).
6053 &quot;A String&quot;,
6054 ],
6055 },
6056 ],
6057 },
6058 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
6059 # does not evaluate preconfigured WAF rules, i.e., if
6060 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
6061 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
6062 {
6063 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
6064 # preconfigured WAF evaluation.
6065 {
6066 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6067 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6068 },
6069 ],
6070 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
6071 # inspection during preconfigured WAF evaluation.
6072 {
6073 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6074 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6075 },
6076 ],
6077 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
6078 # inspection during preconfigured WAF evaluation.
6079 {
6080 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6081 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6082 },
6083 ],
6084 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
6085 # from inspection during preconfigured WAF evaluation. Note that the
6086 # parameter can be in the query string or in the POST body.
6087 {
6088 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6089 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6090 },
6091 ],
6092 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
6093 # inspection during preconfigured WAF evaluation. When specifying this
6094 # field, the query or fragment part should be excluded.
6095 {
6096 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6097 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6098 },
6099 ],
6100 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
6101 # preconfigured WAF exclusion. If omitted, it refers to all the rule
6102 # IDs under the WAF rule set.
6103 &quot;A String&quot;,
6104 ],
6105 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
6106 },
6107 ],
6108 },
6109 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
6110 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
6111 # must be a positive value between 0 and 2147483647.
6112 # Rules are evaluated from highest to lowest priority where 0 is the
6113 # highest priority and 2147483647 is the lowest priority.
6114 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
6115 # &quot;fairshare&quot;. Cannot be specified for any other actions.
6116 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
6117 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
6118 # the traffic will continue to be banned by the rate limit after the
6119 # rate falls below the threshold.
6120 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
6121 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
6122 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
6123 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
6124 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6125 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6126 },
6127 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
6128 # threshold. Valid option is &quot;allow&quot; only.
6129 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6130 # values are:
6131 #
6132 # - ALL: A single rate limit threshold is applied to all
6133 # the requests matching this rule. This is the default value if
6134 # &quot;enforceOnKey&quot; is not configured.
6135 # - IP: The source IP address of
6136 # the request is the key. Each IP has this limit enforced
6137 # separately.
6138 # - HTTP_HEADER: The value of the HTTP
6139 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6140 # value is truncated to the first 128 bytes of the header value. If no
6141 # such header is present in the request, the key type defaults toALL.
6142 # - XFF_IP: The first IP address (i.e. the
6143 # originating client IP address) specified in the list of IPs under
6144 # X-Forwarded-For HTTP header. If no such header is present or the value
6145 # is not a valid IP, the key defaults to the source IP address of
6146 # the request i.e. key type IP.
6147 # - HTTP_COOKIE: The value of the HTTP
6148 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6149 # value is truncated to the first 128 bytes of the cookie value. If no
6150 # such cookie is present in the request, the key type defaults toALL.
6151 # - HTTP_PATH: The URL path of the HTTP request. The key
6152 # value is truncated to the first 128 bytes.
6153 # - SNI: Server name indication in the TLS session of the
6154 # HTTPS request. The key value is truncated to the first 128 bytes. The
6155 # key type defaults to ALL on a HTTP session.
6156 # - REGION_CODE: The country/region from which the request
6157 # originates.
6158 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6159 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6160 # key type defaults to ALL.
6161 # - USER_IP: The IP address of the originating client,
6162 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6163 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
6164 # an IP address cannot be resolved from it, the key type defaults toIP.
6165 #
6166 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6167 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6168 # key type defaults to ALL.
6169 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
6170 # limit threshold is enforced for all the requests matching the rule.
6171 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
6172 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
6173 # ratelimit threshold/action is enforced. You can specify up to 3
6174 # enforce_on_key_configs. If enforce_on_key_configs is specified,
6175 # enforce_on_key must not be specified.
6176 {
6177 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6178 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
6179 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
6180 # taken as the key value.
6181 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6182 # values are:
6183 #
6184 # - ALL: A single rate limit threshold is applied to all
6185 # the requests matching this rule. This is the default value if
6186 # &quot;enforceOnKeyConfigs&quot; is not configured.
6187 # - IP: The source IP address of
6188 # the request is the key. Each IP has this limit enforced
6189 # separately.
6190 # - HTTP_HEADER: The value of the HTTP
6191 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6192 # value is truncated to the first 128 bytes of the header value. If no
6193 # such header is present in the request, the key type defaults toALL.
6194 # - XFF_IP: The first IP address (i.e. the
6195 # originating client IP address) specified in the list of IPs under
6196 # X-Forwarded-For HTTP header. If no such header is present or the
6197 # value is not a valid IP, the key defaults to the source IP address of
6198 # the request i.e. key type IP.
6199 # - HTTP_COOKIE: The value of the HTTP
6200 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6201 # value is truncated to the first 128 bytes of the cookie value. If no
6202 # such cookie is present in the request, the key type defaults toALL.
6203 # - HTTP_PATH: The URL path of the HTTP request. The key
6204 # value is truncated to the first 128 bytes.
6205 # - SNI: Server name indication in the TLS session of
6206 # the HTTPS request. The key value is truncated to the first 128 bytes.
6207 # The key type defaults to ALL on a HTTP session.
6208 # - REGION_CODE: The country/region from which the
6209 # request originates.
6210 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6211 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6212 # key type defaults to ALL.
6213 # - USER_IP: The IP address of the originating client,
6214 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6215 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
6216 # or an IP address cannot be resolved from it, the key type defaults toIP.
6217 #
6218 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6219 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6220 # key type defaults to ALL.
6221 },
6222 ],
6223 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6224 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
6225 # value.
6226 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
6227 # value.
6228 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
6229 # threshold, to either deny with a specified HTTP response code, or
6230 # redirect to a different endpoint.
6231 # Valid options are `deny(STATUS)`, where valid values for
6232 # `STATUS` are 403, 404, 429, and 502, and
6233 # `redirect`, where the redirect parameters come from
6234 # `exceedRedirectOptions` below.
6235 # The `redirect` action is only supported in Global Security Policies of
6236 # type CLOUD_ARMOR.
6237 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
6238 # above the configured rate limit threshold
6239 &quot;code&quot;: 42, # The status code, which should be an enum value of
6240 # google.rpc.Code.
6241 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
6242 },
6243 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
6244 # action. Cannot be specified if the exceed action is not redirect.
6245 # This field is only supported in Global Security Policies of type
6246 # CLOUD_ARMOR.
6247 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6248 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6249 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6250 #
6251 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6252 # challenge assessment.
6253 # - EXTERNAL_302: redirect to a different URL via a 302
6254 # response.
6255 },
6256 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
6257 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6258 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6259 },
6260 },
6261 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
6262 # other actions.
6263 # This field is only supported in Global Security Policies of type
6264 # CLOUD_ARMOR.
6265 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6266 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6267 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6268 #
6269 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6270 # challenge assessment.
6271 # - EXTERNAL_302: redirect to a different URL via a 302
6272 # response.
6273 },
6274 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
6275 # other actions.
6276 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
6277 # rule.
6278 # [Deprecated] Use requiredManagedProtectionTiers instead.
6279 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
6280 # policy. This can only be set during rule creation, if rule number is not
6281 # specified it will be generated by the server.
6282 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
6283 # policy rule.
6284 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
6285 # allows you to control which network&#x27;s VMs get this rule. If this field
6286 # is left blank, all VMs within the organization will receive the rule.
6287 #
6288 # This field may only be specified when versioned_expr is set to FIREWALL.
6289 &quot;A String&quot;,
6290 ],
6291 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
6292 # applied with this rule.
6293 &quot;A String&quot;,
6294 ],
6295 },
6296 ],
6297 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
6298 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
6299 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
6300 # unique in the organization in which the security policy is created. This
6301 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
6302 # The name must be 1-63 characters long, and comply with
6303 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
6304 # characters long and match the regular expression
6305 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
6306 # lowercase letter, and all following characters must be a dash, lowercase
6307 # letter, or digit, except the last character, which cannot be a dash.
6308 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
6309 #
6310 # - CLOUD_ARMOR: Cloud Armor backend security policies can
6311 # be configured to filter incoming HTTP requests targeting backend services.
6312 # They filter requests before they hit the origin servers.
6313 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
6314 # be configured to filter incoming HTTP requests targeting backend services
6315 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
6316 # They filter requests before the request is served from Google&#x27;s cache.
6317 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
6318 # internal service policies can be configured to filter HTTP requests
6319 # targeting services managed by Traffic Director in a service mesh. They
6320 # filter requests before the request is served from the application.
6321 #
6322 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
6323 # can be configured to filter packets targeting network load balancing
6324 # resources such as backend services, target pools, target instances, and
6325 # instances with external IPs. They filter requests before the request is
6326 # served from the application.
6327 #
6328 #
6329 # This field can be set only at resource creation time.
6330 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
6331 # user-defined field consists of up to 4 bytes extracted from a fixed offset
6332 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
6333 # optional mask to select certain bits. Rules may then specify matching
6334 # values for these fields.
6335 #
6336 # Example:
6337 #
6338 # userDefinedFields:
6339 # - name: &quot;ipv4_fragment_offset&quot;
6340 # base: IPV4
6341 # offset: 6
6342 # size: 2
6343 # mask: &quot;0x1fff&quot;
6344 {
6345 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
6346 #
6347 # - IPV4: Points to the beginning of the IPv4 header.
6348 # - IPV6: Points to the beginning of the IPv6 header.
6349 # - TCP: Points to the beginning of the TCP header, skipping
6350 # over any IPv4 options or IPv6 extension headers. Not present for
6351 # non-first fragments.
6352 # - UDP: Points to the beginning of the UDP header, skipping
6353 # over any IPv4 options or IPv6 extension headers. Not present for
6354 # non-first fragments.
6355 #
6356 #
6357 # required
6358 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
6359 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
6360 # The last byte of the field (in network byte order) corresponds to the
6361 # least significant byte of the mask.
6362 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
6363 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
6364 # &#x27;base&#x27;.
6365 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
6366 },
6367 ],
6368 }
6369
6370 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
6371 that if you must retry your request, the server will know to ignore the
6372 request if it has already been completed.
6373
6374 For example, consider a situation where you make an initial request and
6375 the request times out. If you make the request again with the same
6376 request ID, the server can check if original operation with the same
6377 request ID was received, and if so, will ignore the second request. This
6378 prevents clients from accidentally creating duplicate commitments.
6379
6380 The request ID must be
6381 a valid UUID with the exception that zero UUID is not supported
6382 (00000000-0000-0000-0000-000000000000).
6383 updateMask: string, Indicates fields to be cleared as part of this request.
6384 x__xgafv: string, V1 error format.
6385 Allowed values
6386 1 - v1 error format
6387 2 - v2 error format
6388
6389 Returns:
6390 An object of the form:
6391
6392 { # Represents an Operation resource.
6393 #
6394 # Google Compute Engine has three Operation resources:
6395 #
6396 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
6397 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
6398 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
6399 #
6400 # You can use an operation resource to manage asynchronous API requests.
6401 # For more information, readHandling
6402 # API responses.
6403 #
6404 # Operations can be global, regional or zonal.
6405 #
6406 # - For global operations, use the `globalOperations`
6407 # resource.
6408 # - For regional operations, use the
6409 # `regionOperations` resource.
6410 # - For zonal operations, use
6411 # the `zoneOperations` resource.
6412 #
6413 #
6414 #
6415 # For more information, read
6416 # Global, Regional, and Zonal Resources.
6417 #
6418 # Note that completed Operation resources have a limited
6419 # retention period.
6420 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
6421 # Not present otherwise.
6422 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6423 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
6424 # set when the operation is created.
6425 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
6426 # text format.
6427 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
6428 # this field will be populated.
6429 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
6430 # operation.
6431 {
6432 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6433 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
6434 # details. There is a set of defined message types to use for providing
6435 # details.The syntax depends on the error code. For example,
6436 # QuotaExceededInfo will have details when the error code is
6437 # QUOTA_EXCEEDED.
6438 {
6439 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
6440 #
6441 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
6442 # is not enabled:
6443 #
6444 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
6445 # &quot;domain&quot;: &quot;googleapis.com&quot;
6446 # &quot;metadata&quot;: {
6447 # &quot;resource&quot;: &quot;projects/123&quot;,
6448 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
6449 # }
6450 # }
6451 #
6452 # This response indicates that the pubsub.googleapis.com API is not enabled.
6453 #
6454 # Example of an error that is returned when attempting to create a Spanner
6455 # instance in a region that is out of stock:
6456 #
6457 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
6458 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
6459 # &quot;metadata&quot;: {
6460 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
6461 # }
6462 # }
6463 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
6464 # is typically the registered service name of the tool or product that
6465 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
6466 # generated by some common infrastructure, the error domain must be a
6467 # globally unique value that identifies the infrastructure. For Google API
6468 # infrastructure, the error domain is &quot;googleapis.com&quot;.
6469 &quot;metadatas&quot;: { # Additional structured details about this error.
6470 #
6471 # Keys must match a regular expression of `a-z+` but should
6472 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
6473 # length. When identifying the current value of an exceeded limit, the units
6474 # should be contained in the key, not the value. For example, rather than
6475 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
6476 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
6477 # instances that can be created in a single (batch) request.
6478 &quot;a_key&quot;: &quot;A String&quot;,
6479 },
6480 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
6481 # proximate cause of the error. Error reasons are unique within a particular
6482 # domain of errors. This should be at most 63 characters and match a
6483 # regular expression of `A-Z+[A-Z0-9]`, which represents
6484 # UPPER_SNAKE_CASE.
6485 },
6486 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
6487 #
6488 # For example, if a quota check failed with an error indicating the calling
6489 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
6490 # directly to the right place in the developer console to flip the bit.
6491 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
6492 { # Describes a URL link.
6493 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
6494 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
6495 },
6496 ],
6497 },
6498 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
6499 # which can be attached to an RPC error.
6500 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
6501 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
6502 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
6503 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
6504 },
6505 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
6506 &quot;dimensions&quot;: { # The map holding related quota dimensions.
6507 &quot;a_key&quot;: &quot;A String&quot;,
6508 },
6509 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
6510 # type or metric.
6511 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
6512 # or metric.
6513 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
6514 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
6515 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
6516 },
6517 },
6518 ],
6519 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
6520 # This property is optional.
6521 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
6522 },
6523 ],
6524 },
6525 &quot;getVersionOperationMetadata&quot;: {
6526 &quot;inlineSbomInfo&quot;: {
6527 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
6528 # appropriate identifiers.
6529 &quot;a_key&quot;: &quot;A String&quot;,
6530 },
6531 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
6532 # identifiers.
6533 &quot;a_key&quot;: &quot;A String&quot;,
6534 },
6535 },
6536 },
6537 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
6538 # message that was returned, such as `NOT FOUND`.
6539 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
6540 # status code that was returned. For example, a `404` means the
6541 # resource was not found.
6542 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
6543 # defined by the server.
6544 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
6545 # This value is inRFC3339
6546 # text format.
6547 &quot;instancesBulkInsertOperationMetadata&quot;: {
6548 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
6549 # Example key: zones/us-central1-a
6550 &quot;a_key&quot;: {
6551 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
6552 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
6553 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
6554 # error.
6555 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
6556 # if the flow is rolling forward or rolling back.
6557 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
6558 },
6559 },
6560 },
6561 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
6562 # Operation resources.
6563 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6564 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
6565 # group of operations results from a `bulkInsert` API request.
6566 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
6567 # `update`, or `delete`, and so on.
6568 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
6569 # There is no requirement that this be linear or support any granularity of
6570 # operations. This should not be used to guess when the operation will be
6571 # complete. This number should monotonically increase as the operation
6572 # progresses.
6573 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
6574 # applicable when performing regional operations.
6575 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6576 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
6577 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
6578 # this field will contain information on all underlying zonal actions and
6579 # their state.
6580 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
6581 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
6582 # Example key: zones/us-central1-a
6583 &quot;a_key&quot;: {
6584 &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
6585 # populated.
6586 # different programming environments, including REST APIs and RPC APIs. It is
6587 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
6588 # three pieces of data: error code, error message, and error details.
6589 #
6590 # You can find out more about this error model and how to work with it in the
6591 # [API Design Guide](https://cloud.google.com/apis/design/errors).
6592 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6593 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
6594 # message types for APIs to use.
6595 {
6596 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6597 },
6598 ],
6599 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
6600 # user-facing error message should be localized and sent in the
6601 # google.rpc.Status.details field, or localized by the client.
6602 },
6603 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
6604 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
6605 },
6606 },
6607 },
6608 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
6609 # This value is inRFC3339
6610 # text format.
6611 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
6612 # following:
6613 # `PENDING`, `RUNNING`, or `DONE`.
6614 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
6615 # operation.
6616 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
6617 # of the target resource.
6618 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
6619 # operations related to creating a snapshot, this points to the disk
6620 # that the snapshot was created from.
6621 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
6622 # `[email protected]` or
6623 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
6624 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
6625 # operation, this field will be populated.
6626 {
6627 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
6628 # Engine returns NO_RESULTS_ON_PAGE if there
6629 # are no results in the response.
6630 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
6631 # value format. For example:
6632 #
6633 # &quot;data&quot;: [
6634 # {
6635 # &quot;key&quot;: &quot;scope&quot;,
6636 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
6637 # }
6638 {
6639 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
6640 # returned. For example, for warnings where there are no results in a list
6641 # request for a particular zone, this key might be scope and
6642 # the key value might be the zone name. Other examples might be a key
6643 # indicating a deprecated resource and a suggested replacement, or a
6644 # warning about invalid network settings (for example, if an instance
6645 # attempts to perform IP forwarding but is not enabled for IP forwarding).
6646 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6647 },
6648 ],
6649 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6650 },
6651 ],
6652 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
6653 # applicable when performing per-zone operations.
6654 }</pre>
6655 </div>
6656
6657 <div class="method">
6658 <code class="details" id="patchRule">patchRule(securityPolicy, body=None, priority=None, requestId=None, updateMask=None, x__xgafv=None)</code>
6659 <pre>Patches a rule at the specified priority.
6660
6661 Use this API to modify Cloud Armor policies. Previously, alpha and beta
6662 versions of this API were used to modify firewall policies. This usage is
6663 now disabled for most organizations. Use firewallPolicies.patchRule
6664 instead.
6665
6666 Args:
6667 securityPolicy: string, Name of the security policy to update. (required)
6668 body: object, The request body.
6669 The object takes the form of:
6670
6671 { # Represents a rule that describes one or more match conditions along with
6672 # the action to be taken when traffic matches this condition (allow or deny).
6673 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
6674 # The following are the valid actions:
6675 #
6676 # - allow: allow access to target.
6677 # - deny(STATUS): deny access to target, returns the
6678 # HTTP response code specified. Valid values for `STATUS`
6679 # are 403, 404, and 502.
6680 # - rate_based_ban: limit client traffic to the configured
6681 # threshold and ban the client if the traffic exceeds the threshold.
6682 # Configure parameters for this action in RateLimitOptions. Requires
6683 # rate_limit_options to be set.
6684 # - redirect: redirect to a different target. This can
6685 # either be an internal reCAPTCHA redirect, or an external URL-based
6686 # redirect via a 302 response. Parameters for this action can be configured
6687 # via redirectOptions. This action is only supported in Global Security
6688 # Policies of type CLOUD_ARMOR.
6689 # - throttle: limit
6690 # client traffic to the configured threshold. Configure parameters for this
6691 # action in rateLimitOptions. Requires rate_limit_options to be set for
6692 # this.
6693 # - fairshare (preview only): when traffic reaches the
6694 # threshold limit, requests from the clients matching this rule begin to be
6695 # rate-limited using the Fair Share algorithm. This action is only allowed
6696 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
6697 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
6698 # create the resource.
6699 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
6700 # specified when versioned_expr is set to FIREWALL.
6701 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
6702 # enabled, logs will be exported to the configured export destination in
6703 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
6704 # cannot enable logging on &quot;goto_next&quot; rules.
6705 #
6706 # This field may only be specified when the versioned_expr is set to
6707 # FIREWALL.
6708 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
6709 # This field is only supported in Global Security Policies of type
6710 # CLOUD_ARMOR.
6711 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
6712 # present.
6713 {
6714 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
6715 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
6716 },
6717 ],
6718 },
6719 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
6720 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
6721 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
6722 # Exactly one field must be specified.
6723 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
6724 # This field must be specified if versioned_expr is specified and cannot
6725 # be specified if versioned_expr is not specified.
6726 &quot;destIpRanges&quot;: [ # CIDR IP address range.
6727 #
6728 # This field may only be specified when versioned_expr is set to
6729 # FIREWALL.
6730 &quot;A String&quot;,
6731 ],
6732 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
6733 #
6734 # This field may only be specified when versioned_expr is set to
6735 # FIREWALL.
6736 {
6737 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
6738 # required when creating a firewall rule. This value can either be
6739 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
6740 # protocol number.
6741 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
6742 # only applicable for UDP or TCP protocol. Each entry must be either
6743 # an integer or a range. If not specified, this rule applies to
6744 # connections through any port.
6745 #
6746 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
6747 #
6748 # This field may only be specified when versioned_expr is set to
6749 # FIREWALL.
6750 &quot;A String&quot;,
6751 ],
6752 },
6753 ],
6754 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
6755 #
6756 # This field may only be specified when versioned_expr is set to
6757 # FIREWALL.
6758 {
6759 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
6760 # required when creating a firewall rule. This value can either be
6761 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
6762 # protocol number.
6763 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
6764 # only applicable for UDP or TCP protocol. Each entry must be either
6765 # an integer or a range. If not specified, this rule applies to
6766 # connections through any port.
6767 #
6768 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
6769 #
6770 # This field may only be specified when versioned_expr is set to
6771 # FIREWALL.
6772 &quot;A String&quot;,
6773 ],
6774 },
6775 ],
6776 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
6777 # Maximum number of src_ip_ranges allowed is 10.
6778 &quot;A String&quot;,
6779 ],
6780 },
6781 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
6782 # A CEVAL expression is used to specify match criteria such as origin.ip,
6783 # source.region_code and contents in the request header.
6784 # Expressions containing `evaluateThreatIntelligence` require a Cloud
6785 # Armor Enterprise subscription and are not supported in Edge Policies
6786 # nor in Regional Policies. Expressions containing
6787 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
6788 # Enterprise subscription and are only supported in Global Security
6789 # Policies.
6790 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
6791 # are documented at https://github.com/google/cel-spec.
6792 #
6793 # Example (Comparison):
6794 #
6795 # title: &quot;Summary size limit&quot;
6796 # description: &quot;Determines if a summary is less than 100 chars&quot;
6797 # expression: &quot;document.summary.size() &lt; 100&quot;
6798 #
6799 # Example (Equality):
6800 #
6801 # title: &quot;Requestor is owner&quot;
6802 # description: &quot;Determines if requestor is the document owner&quot;
6803 # expression: &quot;document.owner == request.auth.claims.email&quot;
6804 #
6805 # Example (Logic):
6806 #
6807 # title: &quot;Public documents&quot;
6808 # description: &quot;Determine whether the document should be publicly visible&quot;
6809 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
6810 #
6811 # Example (Data Manipulation):
6812 #
6813 # title: &quot;Notification string&quot;
6814 # description: &quot;Create a notification string with a timestamp.&quot;
6815 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
6816 #
6817 # The exact variables and functions that may be referenced within an expression
6818 # are determined by the service that evaluates it. See the service
6819 # documentation for additional information.
6820 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
6821 # describes the expression, e.g. when hovered over it in a UI.
6822 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
6823 # syntax.
6824 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
6825 # reporting, e.g. a file name and a position in the file.
6826 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
6827 # its purpose. This can be used e.g. in UIs which allow to enter the
6828 # expression.
6829 },
6830 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
6831 # CEVAL expression (i.e., &#x27;expr&#x27;).
6832 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
6833 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
6834 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6835 # action-tokens. The provided site keys need to be created from
6836 # reCAPTCHA API under the same project where the security policy is
6837 # created.
6838 &quot;A String&quot;,
6839 ],
6840 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6841 # session-tokens. The provided site keys need to be created from
6842 # reCAPTCHA API under the same project where the security policy is
6843 # created.
6844 &quot;A String&quot;,
6845 ],
6846 },
6847 },
6848 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
6849 # If this field is specified, config must also be specified.
6850 # Available preconfigured expressions along with their requirements are:
6851 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
6852 # config.
6853 },
6854 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
6855 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
6856 # &#x27;action&#x27; is enforced.
6857 #
6858 # The match criteria for a rule consists of built-in match fields (like
6859 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
6860 # (&#x27;userDefinedFields&#x27;).
6861 #
6862 # Field values may be extracted directly from the packet or derived from it
6863 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
6864 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
6865 # header is found in the packet and the entire field is in bounds.
6866 #
6867 # Each match field may specify which values can match it, listing one or
6868 # more ranges, prefixes, or exact values that are considered a match for
6869 # the field. A field value must be present in order to match a specified
6870 # match field. If no match values are specified for a match field, then any
6871 # field value is considered to match it, and it&#x27;s not required to be
6872 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
6873 #
6874 # For a packet to match a rule, all specified match fields must match the
6875 # corresponding field values derived from the packet.
6876 #
6877 # Example:
6878 #
6879 # networkMatch:
6880 # srcIpRanges:
6881 # - &quot;192.0.2.0/24&quot;
6882 # - &quot;198.51.100.0/24&quot;
6883 # userDefinedFields:
6884 # - name: &quot;ipv4_fragment_offset&quot;
6885 # values:
6886 # - &quot;1-0x1fff&quot;
6887 #
6888 # The above match condition matches packets with a source IP in
6889 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
6890 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
6891 # against.
6892 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
6893 # format.
6894 &quot;A String&quot;,
6895 ],
6896 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6897 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6898 &quot;A String&quot;,
6899 ],
6900 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
6901 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
6902 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
6903 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
6904 &quot;A String&quot;,
6905 ],
6906 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
6907 42,
6908 ],
6909 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
6910 &quot;A String&quot;,
6911 ],
6912 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6913 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6914 &quot;A String&quot;,
6915 ],
6916 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
6917 # IP address.
6918 &quot;A String&quot;,
6919 ],
6920 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
6921 # matching values for that field.
6922 {
6923 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
6924 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
6925 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
6926 # range (e.g. &quot;0x400-0x7ff&quot;).
6927 &quot;A String&quot;,
6928 ],
6929 },
6930 ],
6931 },
6932 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
6933 # does not evaluate preconfigured WAF rules, i.e., if
6934 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
6935 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
6936 {
6937 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
6938 # preconfigured WAF evaluation.
6939 {
6940 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6941 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6942 },
6943 ],
6944 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
6945 # inspection during preconfigured WAF evaluation.
6946 {
6947 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6948 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6949 },
6950 ],
6951 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
6952 # inspection during preconfigured WAF evaluation.
6953 {
6954 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6955 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6956 },
6957 ],
6958 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
6959 # from inspection during preconfigured WAF evaluation. Note that the
6960 # parameter can be in the query string or in the POST body.
6961 {
6962 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6963 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6964 },
6965 ],
6966 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
6967 # inspection during preconfigured WAF evaluation. When specifying this
6968 # field, the query or fragment part should be excluded.
6969 {
6970 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6971 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6972 },
6973 ],
6974 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
6975 # preconfigured WAF exclusion. If omitted, it refers to all the rule
6976 # IDs under the WAF rule set.
6977 &quot;A String&quot;,
6978 ],
6979 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
6980 },
6981 ],
6982 },
6983 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
6984 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
6985 # must be a positive value between 0 and 2147483647.
6986 # Rules are evaluated from highest to lowest priority where 0 is the
6987 # highest priority and 2147483647 is the lowest priority.
6988 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
6989 # &quot;fairshare&quot;. Cannot be specified for any other actions.
6990 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
6991 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
6992 # the traffic will continue to be banned by the rate limit after the
6993 # rate falls below the threshold.
6994 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
6995 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
6996 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
6997 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
6998 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6999 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
7000 },
7001 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
7002 # threshold. Valid option is &quot;allow&quot; only.
7003 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
7004 # values are:
7005 #
7006 # - ALL: A single rate limit threshold is applied to all
7007 # the requests matching this rule. This is the default value if
7008 # &quot;enforceOnKey&quot; is not configured.
7009 # - IP: The source IP address of
7010 # the request is the key. Each IP has this limit enforced
7011 # separately.
7012 # - HTTP_HEADER: The value of the HTTP
7013 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
7014 # value is truncated to the first 128 bytes of the header value. If no
7015 # such header is present in the request, the key type defaults toALL.
7016 # - XFF_IP: The first IP address (i.e. the
7017 # originating client IP address) specified in the list of IPs under
7018 # X-Forwarded-For HTTP header. If no such header is present or the value
7019 # is not a valid IP, the key defaults to the source IP address of
7020 # the request i.e. key type IP.
7021 # - HTTP_COOKIE: The value of the HTTP
7022 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
7023 # value is truncated to the first 128 bytes of the cookie value. If no
7024 # such cookie is present in the request, the key type defaults toALL.
7025 # - HTTP_PATH: The URL path of the HTTP request. The key
7026 # value is truncated to the first 128 bytes.
7027 # - SNI: Server name indication in the TLS session of the
7028 # HTTPS request. The key value is truncated to the first 128 bytes. The
7029 # key type defaults to ALL on a HTTP session.
7030 # - REGION_CODE: The country/region from which the request
7031 # originates.
7032 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
7033 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
7034 # key type defaults to ALL.
7035 # - USER_IP: The IP address of the originating client,
7036 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
7037 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
7038 # an IP address cannot be resolved from it, the key type defaults toIP.
7039 #
7040 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
7041 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
7042 # key type defaults to ALL.
7043 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
7044 # limit threshold is enforced for all the requests matching the rule.
7045 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
7046 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
7047 # ratelimit threshold/action is enforced. You can specify up to 3
7048 # enforce_on_key_configs. If enforce_on_key_configs is specified,
7049 # enforce_on_key must not be specified.
7050 {
7051 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
7052 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
7053 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
7054 # taken as the key value.
7055 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
7056 # values are:
7057 #
7058 # - ALL: A single rate limit threshold is applied to all
7059 # the requests matching this rule. This is the default value if
7060 # &quot;enforceOnKeyConfigs&quot; is not configured.
7061 # - IP: The source IP address of
7062 # the request is the key. Each IP has this limit enforced
7063 # separately.
7064 # - HTTP_HEADER: The value of the HTTP
7065 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
7066 # value is truncated to the first 128 bytes of the header value. If no
7067 # such header is present in the request, the key type defaults toALL.
7068 # - XFF_IP: The first IP address (i.e. the
7069 # originating client IP address) specified in the list of IPs under
7070 # X-Forwarded-For HTTP header. If no such header is present or the
7071 # value is not a valid IP, the key defaults to the source IP address of
7072 # the request i.e. key type IP.
7073 # - HTTP_COOKIE: The value of the HTTP
7074 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
7075 # value is truncated to the first 128 bytes of the cookie value. If no
7076 # such cookie is present in the request, the key type defaults toALL.
7077 # - HTTP_PATH: The URL path of the HTTP request. The key
7078 # value is truncated to the first 128 bytes.
7079 # - SNI: Server name indication in the TLS session of
7080 # the HTTPS request. The key value is truncated to the first 128 bytes.
7081 # The key type defaults to ALL on a HTTP session.
7082 # - REGION_CODE: The country/region from which the
7083 # request originates.
7084 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
7085 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
7086 # key type defaults to ALL.
7087 # - USER_IP: The IP address of the originating client,
7088 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
7089 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
7090 # or an IP address cannot be resolved from it, the key type defaults toIP.
7091 #
7092 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
7093 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
7094 # key type defaults to ALL.
7095 },
7096 ],
7097 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
7098 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
7099 # value.
7100 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
7101 # value.
7102 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
7103 # threshold, to either deny with a specified HTTP response code, or
7104 # redirect to a different endpoint.
7105 # Valid options are `deny(STATUS)`, where valid values for
7106 # `STATUS` are 403, 404, 429, and 502, and
7107 # `redirect`, where the redirect parameters come from
7108 # `exceedRedirectOptions` below.
7109 # The `redirect` action is only supported in Global Security Policies of
7110 # type CLOUD_ARMOR.
7111 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
7112 # above the configured rate limit threshold
7113 &quot;code&quot;: 42, # The status code, which should be an enum value of
7114 # google.rpc.Code.
7115 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
7116 },
7117 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
7118 # action. Cannot be specified if the exceed action is not redirect.
7119 # This field is only supported in Global Security Policies of type
7120 # CLOUD_ARMOR.
7121 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
7122 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
7123 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
7124 #
7125 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
7126 # challenge assessment.
7127 # - EXTERNAL_302: redirect to a different URL via a 302
7128 # response.
7129 },
7130 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
7131 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
7132 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
7133 },
7134 },
7135 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
7136 # other actions.
7137 # This field is only supported in Global Security Policies of type
7138 # CLOUD_ARMOR.
7139 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
7140 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
7141 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
7142 #
7143 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
7144 # challenge assessment.
7145 # - EXTERNAL_302: redirect to a different URL via a 302
7146 # response.
7147 },
7148 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
7149 # other actions.
7150 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
7151 # rule.
7152 # [Deprecated] Use requiredManagedProtectionTiers instead.
7153 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
7154 # policy. This can only be set during rule creation, if rule number is not
7155 # specified it will be generated by the server.
7156 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
7157 # policy rule.
7158 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
7159 # allows you to control which network&#x27;s VMs get this rule. If this field
7160 # is left blank, all VMs within the organization will receive the rule.
7161 #
7162 # This field may only be specified when versioned_expr is set to FIREWALL.
7163 &quot;A String&quot;,
7164 ],
7165 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
7166 # applied with this rule.
7167 &quot;A String&quot;,
7168 ],
7169 }
7170
7171 priority: integer, The priority of the rule to patch.
7172 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
7173 that if you must retry your request, the server will know to ignore the
7174 request if it has already been completed.
7175
7176 For example, consider a situation where you make an initial request and
7177 the request times out. If you make the request again with the same
7178 request ID, the server can check if original operation with the same
7179 request ID was received, and if so, will ignore the second request. This
7180 prevents clients from accidentally creating duplicate commitments.
7181
7182 The request ID must be
7183 a valid UUID with the exception that zero UUID is not supported
7184 (00000000-0000-0000-0000-000000000000).
7185 updateMask: string, Indicates fields to be cleared as part of this request.
7186 x__xgafv: string, V1 error format.
7187 Allowed values
7188 1 - v1 error format
7189 2 - v2 error format
7190
7191 Returns:
7192 An object of the form:
7193
7194 { # Represents an Operation resource.
7195 #
7196 # Google Compute Engine has three Operation resources:
7197 #
7198 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
7199 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
7200 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
7201 #
7202 # You can use an operation resource to manage asynchronous API requests.
7203 # For more information, readHandling
7204 # API responses.
7205 #
7206 # Operations can be global, regional or zonal.
7207 #
7208 # - For global operations, use the `globalOperations`
7209 # resource.
7210 # - For regional operations, use the
7211 # `regionOperations` resource.
7212 # - For zonal operations, use
7213 # the `zoneOperations` resource.
7214 #
7215 #
7216 #
7217 # For more information, read
7218 # Global, Regional, and Zonal Resources.
7219 #
7220 # Note that completed Operation resources have a limited
7221 # retention period.
7222 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7223 # Not present otherwise.
7224 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7225 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7226 # set when the operation is created.
7227 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7228 # text format.
7229 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7230 # this field will be populated.
7231 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7232 # operation.
7233 {
7234 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7235 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7236 # details. There is a set of defined message types to use for providing
7237 # details.The syntax depends on the error code. For example,
7238 # QuotaExceededInfo will have details when the error code is
7239 # QUOTA_EXCEEDED.
7240 {
7241 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7242 #
7243 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7244 # is not enabled:
7245 #
7246 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7247 # &quot;domain&quot;: &quot;googleapis.com&quot;
7248 # &quot;metadata&quot;: {
7249 # &quot;resource&quot;: &quot;projects/123&quot;,
7250 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7251 # }
7252 # }
7253 #
7254 # This response indicates that the pubsub.googleapis.com API is not enabled.
7255 #
7256 # Example of an error that is returned when attempting to create a Spanner
7257 # instance in a region that is out of stock:
7258 #
7259 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7260 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7261 # &quot;metadata&quot;: {
7262 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7263 # }
7264 # }
7265 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7266 # is typically the registered service name of the tool or product that
7267 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7268 # generated by some common infrastructure, the error domain must be a
7269 # globally unique value that identifies the infrastructure. For Google API
7270 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7271 &quot;metadatas&quot;: { # Additional structured details about this error.
7272 #
7273 # Keys must match a regular expression of `a-z+` but should
7274 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7275 # length. When identifying the current value of an exceeded limit, the units
7276 # should be contained in the key, not the value. For example, rather than
7277 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7278 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7279 # instances that can be created in a single (batch) request.
7280 &quot;a_key&quot;: &quot;A String&quot;,
7281 },
7282 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7283 # proximate cause of the error. Error reasons are unique within a particular
7284 # domain of errors. This should be at most 63 characters and match a
7285 # regular expression of `A-Z+[A-Z0-9]`, which represents
7286 # UPPER_SNAKE_CASE.
7287 },
7288 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7289 #
7290 # For example, if a quota check failed with an error indicating the calling
7291 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7292 # directly to the right place in the developer console to flip the bit.
7293 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7294 { # Describes a URL link.
7295 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7296 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7297 },
7298 ],
7299 },
7300 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7301 # which can be attached to an RPC error.
7302 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7303 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7304 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7305 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7306 },
7307 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7308 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7309 &quot;a_key&quot;: &quot;A String&quot;,
7310 },
7311 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7312 # type or metric.
7313 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7314 # or metric.
7315 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7316 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7317 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7318 },
7319 },
7320 ],
7321 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7322 # This property is optional.
7323 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7324 },
7325 ],
7326 },
7327 &quot;getVersionOperationMetadata&quot;: {
7328 &quot;inlineSbomInfo&quot;: {
7329 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7330 # appropriate identifiers.
7331 &quot;a_key&quot;: &quot;A String&quot;,
7332 },
7333 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7334 # identifiers.
7335 &quot;a_key&quot;: &quot;A String&quot;,
7336 },
7337 },
7338 },
7339 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7340 # message that was returned, such as `NOT FOUND`.
7341 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7342 # status code that was returned. For example, a `404` means the
7343 # resource was not found.
7344 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7345 # defined by the server.
7346 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7347 # This value is inRFC3339
7348 # text format.
7349 &quot;instancesBulkInsertOperationMetadata&quot;: {
7350 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7351 # Example key: zones/us-central1-a
7352 &quot;a_key&quot;: {
7353 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7354 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7355 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7356 # error.
7357 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7358 # if the flow is rolling forward or rolling back.
7359 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7360 },
7361 },
7362 },
7363 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7364 # Operation resources.
7365 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7366 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7367 # group of operations results from a `bulkInsert` API request.
7368 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7369 # `update`, or `delete`, and so on.
7370 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7371 # There is no requirement that this be linear or support any granularity of
7372 # operations. This should not be used to guess when the operation will be
7373 # complete. This number should monotonically increase as the operation
7374 # progresses.
7375 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7376 # applicable when performing regional operations.
7377 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7378 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
7379 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7380 # this field will contain information on all underlying zonal actions and
7381 # their state.
7382 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7383 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7384 # Example key: zones/us-central1-a
7385 &quot;a_key&quot;: {
7386 &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
7387 # populated.
7388 # different programming environments, including REST APIs and RPC APIs. It is
7389 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7390 # three pieces of data: error code, error message, and error details.
7391 #
7392 # You can find out more about this error model and how to work with it in the
7393 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7394 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7395 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7396 # message types for APIs to use.
7397 {
7398 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7399 },
7400 ],
7401 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7402 # user-facing error message should be localized and sent in the
7403 # google.rpc.Status.details field, or localized by the client.
7404 },
7405 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7406 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7407 },
7408 },
7409 },
7410 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7411 # This value is inRFC3339
7412 # text format.
7413 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7414 # following:
7415 # `PENDING`, `RUNNING`, or `DONE`.
7416 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7417 # operation.
7418 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7419 # of the target resource.
7420 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7421 # operations related to creating a snapshot, this points to the disk
7422 # that the snapshot was created from.
7423 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7424 # `[email protected]` or
7425 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7426 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7427 # operation, this field will be populated.
7428 {
7429 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7430 # Engine returns NO_RESULTS_ON_PAGE if there
7431 # are no results in the response.
7432 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7433 # value format. For example:
7434 #
7435 # &quot;data&quot;: [
7436 # {
7437 # &quot;key&quot;: &quot;scope&quot;,
7438 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7439 # }
7440 {
7441 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7442 # returned. For example, for warnings where there are no results in a list
7443 # request for a particular zone, this key might be scope and
7444 # the key value might be the zone name. Other examples might be a key
7445 # indicating a deprecated resource and a suggested replacement, or a
7446 # warning about invalid network settings (for example, if an instance
7447 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7448 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7449 },
7450 ],
7451 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7452 },
7453 ],
7454 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7455 # applicable when performing per-zone operations.
7456 }</pre>
7457 </div>
7458
7459 <div class="method">
7460 <code class="details" id="removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None, x__xgafv=None)</code>
7461 <pre>Removes an association for the specified security policy.
7462
7463 Use this API to modify Cloud Armor policies. Previously, alpha and beta
7464 versions of this API were used to modify firewall policies. This usage is
7465 now disabled for most organizations. Use firewallPolicies.removeAssociation
7466 instead.
7467
7468 Args:
7469 securityPolicy: string, Name of the security policy to update. (required)
7470 name: string, Name for the attachment that will be removed.
7471 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
7472 that if you must retry your request, the server will know to ignore the
7473 request if it has already been completed.
7474
7475 For example, consider a situation where you make an initial request and
7476 the request times out. If you make the request again with the same
7477 request ID, the server can check if original operation with the same
7478 request ID was received, and if so, will ignore the second request. This
7479 prevents clients from accidentally creating duplicate commitments.
7480
7481 The request ID must be
7482 a valid UUID with the exception that zero UUID is not supported
7483 (00000000-0000-0000-0000-000000000000).
7484 x__xgafv: string, V1 error format.
7485 Allowed values
7486 1 - v1 error format
7487 2 - v2 error format
7488
7489 Returns:
7490 An object of the form:
7491
7492 { # Represents an Operation resource.
7493 #
7494 # Google Compute Engine has three Operation resources:
7495 #
7496 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
7497 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
7498 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
7499 #
7500 # You can use an operation resource to manage asynchronous API requests.
7501 # For more information, readHandling
7502 # API responses.
7503 #
7504 # Operations can be global, regional or zonal.
7505 #
7506 # - For global operations, use the `globalOperations`
7507 # resource.
7508 # - For regional operations, use the
7509 # `regionOperations` resource.
7510 # - For zonal operations, use
7511 # the `zoneOperations` resource.
7512 #
7513 #
7514 #
7515 # For more information, read
7516 # Global, Regional, and Zonal Resources.
7517 #
7518 # Note that completed Operation resources have a limited
7519 # retention period.
7520 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7521 # Not present otherwise.
7522 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7523 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7524 # set when the operation is created.
7525 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7526 # text format.
7527 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7528 # this field will be populated.
7529 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7530 # operation.
7531 {
7532 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7533 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7534 # details. There is a set of defined message types to use for providing
7535 # details.The syntax depends on the error code. For example,
7536 # QuotaExceededInfo will have details when the error code is
7537 # QUOTA_EXCEEDED.
7538 {
7539 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7540 #
7541 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7542 # is not enabled:
7543 #
7544 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7545 # &quot;domain&quot;: &quot;googleapis.com&quot;
7546 # &quot;metadata&quot;: {
7547 # &quot;resource&quot;: &quot;projects/123&quot;,
7548 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7549 # }
7550 # }
7551 #
7552 # This response indicates that the pubsub.googleapis.com API is not enabled.
7553 #
7554 # Example of an error that is returned when attempting to create a Spanner
7555 # instance in a region that is out of stock:
7556 #
7557 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7558 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7559 # &quot;metadata&quot;: {
7560 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7561 # }
7562 # }
7563 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7564 # is typically the registered service name of the tool or product that
7565 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7566 # generated by some common infrastructure, the error domain must be a
7567 # globally unique value that identifies the infrastructure. For Google API
7568 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7569 &quot;metadatas&quot;: { # Additional structured details about this error.
7570 #
7571 # Keys must match a regular expression of `a-z+` but should
7572 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7573 # length. When identifying the current value of an exceeded limit, the units
7574 # should be contained in the key, not the value. For example, rather than
7575 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7576 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7577 # instances that can be created in a single (batch) request.
7578 &quot;a_key&quot;: &quot;A String&quot;,
7579 },
7580 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7581 # proximate cause of the error. Error reasons are unique within a particular
7582 # domain of errors. This should be at most 63 characters and match a
7583 # regular expression of `A-Z+[A-Z0-9]`, which represents
7584 # UPPER_SNAKE_CASE.
7585 },
7586 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7587 #
7588 # For example, if a quota check failed with an error indicating the calling
7589 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7590 # directly to the right place in the developer console to flip the bit.
7591 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7592 { # Describes a URL link.
7593 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7594 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7595 },
7596 ],
7597 },
7598 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7599 # which can be attached to an RPC error.
7600 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7601 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7602 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7603 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7604 },
7605 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7606 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7607 &quot;a_key&quot;: &quot;A String&quot;,
7608 },
7609 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7610 # type or metric.
7611 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7612 # or metric.
7613 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7614 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7615 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7616 },
7617 },
7618 ],
7619 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7620 # This property is optional.
7621 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7622 },
7623 ],
7624 },
7625 &quot;getVersionOperationMetadata&quot;: {
7626 &quot;inlineSbomInfo&quot;: {
7627 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7628 # appropriate identifiers.
7629 &quot;a_key&quot;: &quot;A String&quot;,
7630 },
7631 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7632 # identifiers.
7633 &quot;a_key&quot;: &quot;A String&quot;,
7634 },
7635 },
7636 },
7637 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7638 # message that was returned, such as `NOT FOUND`.
7639 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7640 # status code that was returned. For example, a `404` means the
7641 # resource was not found.
7642 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7643 # defined by the server.
7644 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7645 # This value is inRFC3339
7646 # text format.
7647 &quot;instancesBulkInsertOperationMetadata&quot;: {
7648 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7649 # Example key: zones/us-central1-a
7650 &quot;a_key&quot;: {
7651 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7652 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7653 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7654 # error.
7655 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7656 # if the flow is rolling forward or rolling back.
7657 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7658 },
7659 },
7660 },
7661 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7662 # Operation resources.
7663 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7664 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7665 # group of operations results from a `bulkInsert` API request.
7666 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7667 # `update`, or `delete`, and so on.
7668 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7669 # There is no requirement that this be linear or support any granularity of
7670 # operations. This should not be used to guess when the operation will be
7671 # complete. This number should monotonically increase as the operation
7672 # progresses.
7673 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7674 # applicable when performing regional operations.
7675 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7676 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
7677 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7678 # this field will contain information on all underlying zonal actions and
7679 # their state.
7680 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7681 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7682 # Example key: zones/us-central1-a
7683 &quot;a_key&quot;: {
7684 &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
7685 # populated.
7686 # different programming environments, including REST APIs and RPC APIs. It is
7687 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7688 # three pieces of data: error code, error message, and error details.
7689 #
7690 # You can find out more about this error model and how to work with it in the
7691 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7692 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7693 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7694 # message types for APIs to use.
7695 {
7696 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7697 },
7698 ],
7699 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7700 # user-facing error message should be localized and sent in the
7701 # google.rpc.Status.details field, or localized by the client.
7702 },
7703 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7704 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7705 },
7706 },
7707 },
7708 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7709 # This value is inRFC3339
7710 # text format.
7711 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7712 # following:
7713 # `PENDING`, `RUNNING`, or `DONE`.
7714 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7715 # operation.
7716 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7717 # of the target resource.
7718 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7719 # operations related to creating a snapshot, this points to the disk
7720 # that the snapshot was created from.
7721 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7722 # `[email protected]` or
7723 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7724 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7725 # operation, this field will be populated.
7726 {
7727 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7728 # Engine returns NO_RESULTS_ON_PAGE if there
7729 # are no results in the response.
7730 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7731 # value format. For example:
7732 #
7733 # &quot;data&quot;: [
7734 # {
7735 # &quot;key&quot;: &quot;scope&quot;,
7736 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7737 # }
7738 {
7739 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7740 # returned. For example, for warnings where there are no results in a list
7741 # request for a particular zone, this key might be scope and
7742 # the key value might be the zone name. Other examples might be a key
7743 # indicating a deprecated resource and a suggested replacement, or a
7744 # warning about invalid network settings (for example, if an instance
7745 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7746 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7747 },
7748 ],
7749 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7750 },
7751 ],
7752 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7753 # applicable when performing per-zone operations.
7754 }</pre>
7755 </div>
7756
7757 <div class="method">
7758 <code class="details" id="removeRule">removeRule(securityPolicy, priority=None, requestId=None, x__xgafv=None)</code>
7759 <pre>Deletes a rule at the specified priority.
7760
7761 Use this API to modify Cloud Armor policies. Previously, alpha and beta
7762 versions of this API were used to modify firewall policies. This usage is
7763 now disabled for most organizations. Use firewallPolicies.removeRule
7764 instead.
7765
7766 Args:
7767 securityPolicy: string, Name of the security policy to update. (required)
7768 priority: integer, The priority of the rule to remove from the security policy.
7769 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
7770 that if you must retry your request, the server will know to ignore the
7771 request if it has already been completed.
7772
7773 For example, consider a situation where you make an initial request and
7774 the request times out. If you make the request again with the same
7775 request ID, the server can check if original operation with the same
7776 request ID was received, and if so, will ignore the second request. This
7777 prevents clients from accidentally creating duplicate commitments.
7778
7779 The request ID must be
7780 a valid UUID with the exception that zero UUID is not supported
7781 (00000000-0000-0000-0000-000000000000).
7782 x__xgafv: string, V1 error format.
7783 Allowed values
7784 1 - v1 error format
7785 2 - v2 error format
7786
7787 Returns:
7788 An object of the form:
7789
7790 { # Represents an Operation resource.
7791 #
7792 # Google Compute Engine has three Operation resources:
7793 #
7794 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
7795 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
7796 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
7797 #
7798 # You can use an operation resource to manage asynchronous API requests.
7799 # For more information, readHandling
7800 # API responses.
7801 #
7802 # Operations can be global, regional or zonal.
7803 #
7804 # - For global operations, use the `globalOperations`
7805 # resource.
7806 # - For regional operations, use the
7807 # `regionOperations` resource.
7808 # - For zonal operations, use
7809 # the `zoneOperations` resource.
7810 #
7811 #
7812 #
7813 # For more information, read
7814 # Global, Regional, and Zonal Resources.
7815 #
7816 # Note that completed Operation resources have a limited
7817 # retention period.
7818 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7819 # Not present otherwise.
7820 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7821 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7822 # set when the operation is created.
7823 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7824 # text format.
7825 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7826 # this field will be populated.
7827 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7828 # operation.
7829 {
7830 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7831 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7832 # details. There is a set of defined message types to use for providing
7833 # details.The syntax depends on the error code. For example,
7834 # QuotaExceededInfo will have details when the error code is
7835 # QUOTA_EXCEEDED.
7836 {
7837 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7838 #
7839 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7840 # is not enabled:
7841 #
7842 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7843 # &quot;domain&quot;: &quot;googleapis.com&quot;
7844 # &quot;metadata&quot;: {
7845 # &quot;resource&quot;: &quot;projects/123&quot;,
7846 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7847 # }
7848 # }
7849 #
7850 # This response indicates that the pubsub.googleapis.com API is not enabled.
7851 #
7852 # Example of an error that is returned when attempting to create a Spanner
7853 # instance in a region that is out of stock:
7854 #
7855 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7856 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7857 # &quot;metadata&quot;: {
7858 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7859 # }
7860 # }
7861 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7862 # is typically the registered service name of the tool or product that
7863 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7864 # generated by some common infrastructure, the error domain must be a
7865 # globally unique value that identifies the infrastructure. For Google API
7866 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7867 &quot;metadatas&quot;: { # Additional structured details about this error.
7868 #
7869 # Keys must match a regular expression of `a-z+` but should
7870 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7871 # length. When identifying the current value of an exceeded limit, the units
7872 # should be contained in the key, not the value. For example, rather than
7873 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7874 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7875 # instances that can be created in a single (batch) request.
7876 &quot;a_key&quot;: &quot;A String&quot;,
7877 },
7878 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7879 # proximate cause of the error. Error reasons are unique within a particular
7880 # domain of errors. This should be at most 63 characters and match a
7881 # regular expression of `A-Z+[A-Z0-9]`, which represents
7882 # UPPER_SNAKE_CASE.
7883 },
7884 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7885 #
7886 # For example, if a quota check failed with an error indicating the calling
7887 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7888 # directly to the right place in the developer console to flip the bit.
7889 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7890 { # Describes a URL link.
7891 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7892 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7893 },
7894 ],
7895 },
7896 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7897 # which can be attached to an RPC error.
7898 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7899 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7900 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7901 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7902 },
7903 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7904 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7905 &quot;a_key&quot;: &quot;A String&quot;,
7906 },
7907 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7908 # type or metric.
7909 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7910 # or metric.
7911 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7912 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7913 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7914 },
7915 },
7916 ],
7917 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7918 # This property is optional.
7919 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7920 },
7921 ],
7922 },
7923 &quot;getVersionOperationMetadata&quot;: {
7924 &quot;inlineSbomInfo&quot;: {
7925 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7926 # appropriate identifiers.
7927 &quot;a_key&quot;: &quot;A String&quot;,
7928 },
7929 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7930 # identifiers.
7931 &quot;a_key&quot;: &quot;A String&quot;,
7932 },
7933 },
7934 },
7935 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7936 # message that was returned, such as `NOT FOUND`.
7937 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7938 # status code that was returned. For example, a `404` means the
7939 # resource was not found.
7940 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7941 # defined by the server.
7942 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7943 # This value is inRFC3339
7944 # text format.
7945 &quot;instancesBulkInsertOperationMetadata&quot;: {
7946 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7947 # Example key: zones/us-central1-a
7948 &quot;a_key&quot;: {
7949 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7950 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7951 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7952 # error.
7953 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7954 # if the flow is rolling forward or rolling back.
7955 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7956 },
7957 },
7958 },
7959 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7960 # Operation resources.
7961 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7962 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7963 # group of operations results from a `bulkInsert` API request.
7964 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7965 # `update`, or `delete`, and so on.
7966 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7967 # There is no requirement that this be linear or support any granularity of
7968 # operations. This should not be used to guess when the operation will be
7969 # complete. This number should monotonically increase as the operation
7970 # progresses.
7971 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7972 # applicable when performing regional operations.
7973 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7974 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
7975 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7976 # this field will contain information on all underlying zonal actions and
7977 # their state.
7978 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7979 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7980 # Example key: zones/us-central1-a
7981 &quot;a_key&quot;: {
7982 &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
7983 # populated.
7984 # different programming environments, including REST APIs and RPC APIs. It is
7985 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7986 # three pieces of data: error code, error message, and error details.
7987 #
7988 # You can find out more about this error model and how to work with it in the
7989 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7990 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7991 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7992 # message types for APIs to use.
7993 {
7994 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7995 },
7996 ],
7997 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7998 # user-facing error message should be localized and sent in the
7999 # google.rpc.Status.details field, or localized by the client.
8000 },
8001 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
8002 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
8003 },
8004 },
8005 },
8006 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
8007 # This value is inRFC3339
8008 # text format.
8009 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
8010 # following:
8011 # `PENDING`, `RUNNING`, or `DONE`.
8012 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
8013 # operation.
8014 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
8015 # of the target resource.
8016 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
8017 # operations related to creating a snapshot, this points to the disk
8018 # that the snapshot was created from.
8019 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
8020 # `[email protected]` or
8021 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
8022 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
8023 # operation, this field will be populated.
8024 {
8025 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
8026 # Engine returns NO_RESULTS_ON_PAGE if there
8027 # are no results in the response.
8028 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
8029 # value format. For example:
8030 #
8031 # &quot;data&quot;: [
8032 # {
8033 # &quot;key&quot;: &quot;scope&quot;,
8034 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
8035 # }
8036 {
8037 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
8038 # returned. For example, for warnings where there are no results in a list
8039 # request for a particular zone, this key might be scope and
8040 # the key value might be the zone name. Other examples might be a key
8041 # indicating a deprecated resource and a suggested replacement, or a
8042 # warning about invalid network settings (for example, if an instance
8043 # attempts to perform IP forwarding but is not enabled for IP forwarding).
8044 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
8045 },
8046 ],
8047 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
8048 },
8049 ],
8050 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
8051 # applicable when performing per-zone operations.
8052 }</pre>
8053 </div>
8054
8055 </body></html>