Debian Codegraph @

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