Debian Codegraph @

docs/dyn/compute_beta.securityPolicies.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.securityPolicies.html">securityPolicies</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#addRule">addRule(project, 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="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, serviceProjectNumber=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Retrieves the list of all SecurityPolicy resources, regional and global,</p>
83 <p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next()</a></code></p>
85 <p class="firstline">Retrieves the next page of results.</p>
86 <p class="toc_element">
87 <code><a href="#close">close()</a></code></p>
88 <p class="firstline">Close httplib2 connections.</p>
89 <p class="toc_element">
90 <code><a href="#delete">delete(project, securityPolicy, requestId=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Deletes the specified policy.</p>
92 <p class="toc_element">
93 <code><a href="#get">get(project, securityPolicy, x__xgafv=None)</a></code></p>
94 <p class="firstline">List all of the ordered rules present in a single specified policy.</p>
95 <p class="toc_element">
96 <code><a href="#getRule">getRule(project, securityPolicy, priority=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Gets a rule at the specified priority.</p>
98 <p class="toc_element">
99 <code><a href="#insert">insert(project, body=None, requestId=None, validateOnly=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">Creates a new policy in the specified project using the data included in</p>
101 <p class="toc_element">
102 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
103 <p class="firstline">List all the policies that have been configured for the specified project.</p>
104 <p class="toc_element">
105 <code><a href="#listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
106 <p class="firstline">Gets the current list of preconfigured Web Application Firewall (WAF)</p>
107 <p class="toc_element">
108 <code><a href="#list_next">list_next()</a></code></p>
109 <p class="firstline">Retrieves the next page of results.</p>
110 <p class="toc_element">
111 <code><a href="#patch">patch(project, securityPolicy, body=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p>
112 <p class="firstline">Patches the specified policy with the data included in the request. To</p>
113 <p class="toc_element">
114 <code><a href="#patchRule">patchRule(project, securityPolicy, body=None, priority=None, updateMask=None, validateOnly=None, x__xgafv=None)</a></code></p>
115 <p class="firstline">Patches a rule at the specified priority. To clear fields in the rule,</p>
116 <p class="toc_element">
117 <code><a href="#removeRule">removeRule(project, securityPolicy, priority=None, x__xgafv=None)</a></code></p>
118 <p class="firstline">Deletes a rule at the specified priority.</p>
119 <p class="toc_element">
120 <code><a href="#setLabels">setLabels(project, resource, body=None, x__xgafv=None)</a></code></p>
121 <p class="firstline">Sets the labels on a security policy. To learn more about labels,</p>
122 <p class="toc_element">
123 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</a></code></p>
124 <p class="firstline">Returns permissions that a caller has on the specified resource.</p>
125 <h3>Method Details</h3>
126 <div class="method">
127 <code class="details" id="addRule">addRule(project, securityPolicy, body=None, validateOnly=None, x__xgafv=None)</code>
128 <pre>Inserts a rule into a security policy.
129
130 Args:
131 project: string, Project ID for this request. (required)
132 securityPolicy: string, Name of the security policy to update. (required)
133 body: object, The request body.
134 The object takes the form of:
135
136 { # Represents a rule that describes one or more match conditions along with
137 # the action to be taken when traffic matches this condition (allow or deny).
138 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
139 # The following are the valid actions:
140 #
141 # - allow: allow access to target.
142 # - deny(STATUS): deny access to target, returns the
143 # HTTP response code specified. Valid values for `STATUS`
144 # are 403, 404, and 502.
145 # - rate_based_ban: limit client traffic to the configured
146 # threshold and ban the client if the traffic exceeds the threshold.
147 # Configure parameters for this action in RateLimitOptions. Requires
148 # rate_limit_options to be set.
149 # - redirect: redirect to a different target. This can
150 # either be an internal reCAPTCHA redirect, or an external URL-based
151 # redirect via a 302 response. Parameters for this action can be configured
152 # via redirectOptions. This action is only supported in Global Security
153 # Policies of type CLOUD_ARMOR.
154 # - throttle: limit
155 # client traffic to the configured threshold. Configure parameters for this
156 # action in rateLimitOptions. Requires rate_limit_options to be set for
157 # this.
158 # - fairshare (preview only): when traffic reaches the
159 # threshold limit, requests from the clients matching this rule begin to be
160 # rate-limited using the Fair Share algorithm. This action is only allowed
161 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
162 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
163 # create the resource.
164 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
165 # specified when versioned_expr is set to FIREWALL.
166 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
167 # enabled, logs will be exported to the configured export destination in
168 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
169 # cannot enable logging on &quot;goto_next&quot; rules.
170 #
171 # This field may only be specified when the versioned_expr is set to
172 # FIREWALL.
173 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
174 # This field is only supported in Global Security Policies of type
175 # CLOUD_ARMOR.
176 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
177 # present.
178 {
179 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
180 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
181 },
182 ],
183 },
184 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
185 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
186 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
187 # Exactly one field must be specified.
188 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
189 # This field must be specified if versioned_expr is specified and cannot
190 # be specified if versioned_expr is not specified.
191 &quot;destIpRanges&quot;: [ # CIDR IP address range.
192 #
193 # This field may only be specified when versioned_expr is set to
194 # FIREWALL.
195 &quot;A String&quot;,
196 ],
197 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
198 #
199 # This field may only be specified when versioned_expr is set to
200 # FIREWALL.
201 {
202 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
203 # required when creating a firewall rule. This value can either be
204 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
205 # protocol number.
206 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
207 # only applicable for UDP or TCP protocol. Each entry must be either
208 # an integer or a range. If not specified, this rule applies to
209 # connections through any port.
210 #
211 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
212 #
213 # This field may only be specified when versioned_expr is set to
214 # FIREWALL.
215 &quot;A String&quot;,
216 ],
217 },
218 ],
219 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
220 # Maximum number of src_ip_ranges allowed is 10.
221 &quot;A String&quot;,
222 ],
223 },
224 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
225 # A CEVAL expression is used to specify match criteria such as origin.ip,
226 # source.region_code and contents in the request header.
227 # Expressions containing `evaluateThreatIntelligence` require a Cloud
228 # Armor Enterprise subscription and are not supported in Edge Policies
229 # nor in Regional Policies. Expressions containing
230 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
231 # Enterprise subscription and are only supported in Global Security
232 # Policies.
233 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
234 # are documented at https://github.com/google/cel-spec.
235 #
236 # Example (Comparison):
237 #
238 # title: &quot;Summary size limit&quot;
239 # description: &quot;Determines if a summary is less than 100 chars&quot;
240 # expression: &quot;document.summary.size() &lt; 100&quot;
241 #
242 # Example (Equality):
243 #
244 # title: &quot;Requestor is owner&quot;
245 # description: &quot;Determines if requestor is the document owner&quot;
246 # expression: &quot;document.owner == request.auth.claims.email&quot;
247 #
248 # Example (Logic):
249 #
250 # title: &quot;Public documents&quot;
251 # description: &quot;Determine whether the document should be publicly visible&quot;
252 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
253 #
254 # Example (Data Manipulation):
255 #
256 # title: &quot;Notification string&quot;
257 # description: &quot;Create a notification string with a timestamp.&quot;
258 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
259 #
260 # The exact variables and functions that may be referenced within an expression
261 # are determined by the service that evaluates it. See the service
262 # documentation for additional information.
263 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
264 # describes the expression, e.g. when hovered over it in a UI.
265 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
266 # syntax.
267 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
268 # reporting, e.g. a file name and a position in the file.
269 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
270 # its purpose. This can be used e.g. in UIs which allow to enter the
271 # expression.
272 },
273 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
274 # CEVAL expression (i.e., &#x27;expr&#x27;).
275 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
276 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
277 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
278 # action-tokens. The provided site keys need to be created from
279 # reCAPTCHA API under the same project where the security policy is
280 # created.
281 &quot;A String&quot;,
282 ],
283 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
284 # session-tokens. The provided site keys need to be created from
285 # reCAPTCHA API under the same project where the security policy is
286 # created.
287 &quot;A String&quot;,
288 ],
289 },
290 },
291 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
292 # If this field is specified, config must also be specified.
293 # Available preconfigured expressions along with their requirements are:
294 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
295 # config.
296 },
297 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
298 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
299 # &#x27;action&#x27; is enforced.
300 #
301 # The match criteria for a rule consists of built-in match fields (like
302 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
303 # (&#x27;userDefinedFields&#x27;).
304 #
305 # Field values may be extracted directly from the packet or derived from it
306 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
307 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
308 # header is found in the packet and the entire field is in bounds.
309 #
310 # Each match field may specify which values can match it, listing one or
311 # more ranges, prefixes, or exact values that are considered a match for
312 # the field. A field value must be present in order to match a specified
313 # match field. If no match values are specified for a match field, then any
314 # field value is considered to match it, and it&#x27;s not required to be
315 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
316 #
317 # For a packet to match a rule, all specified match fields must match the
318 # corresponding field values derived from the packet.
319 #
320 # Example:
321 #
322 # networkMatch:
323 # srcIpRanges:
324 # - &quot;192.0.2.0/24&quot;
325 # - &quot;198.51.100.0/24&quot;
326 # userDefinedFields:
327 # - name: &quot;ipv4_fragment_offset&quot;
328 # values:
329 # - &quot;1-0x1fff&quot;
330 #
331 # The above match condition matches packets with a source IP in
332 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
333 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
334 # against.
335 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
336 # format.
337 &quot;A String&quot;,
338 ],
339 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
340 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
341 &quot;A String&quot;,
342 ],
343 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
344 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
345 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
346 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
347 &quot;A String&quot;,
348 ],
349 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
350 42,
351 ],
352 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
353 &quot;A String&quot;,
354 ],
355 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
356 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
357 &quot;A String&quot;,
358 ],
359 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
360 # IP address.
361 &quot;A String&quot;,
362 ],
363 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
364 # matching values for that field.
365 {
366 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
367 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
368 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
369 # range (e.g. &quot;0x400-0x7ff&quot;).
370 &quot;A String&quot;,
371 ],
372 },
373 ],
374 },
375 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
376 # does not evaluate preconfigured WAF rules, i.e., if
377 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
378 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
379 {
380 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
381 # preconfigured WAF evaluation.
382 {
383 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
384 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
385 },
386 ],
387 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
388 # inspection during preconfigured WAF evaluation.
389 {
390 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
391 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
392 },
393 ],
394 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
395 # inspection during preconfigured WAF evaluation.
396 {
397 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
398 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
399 },
400 ],
401 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
402 # from inspection during preconfigured WAF evaluation. Note that the
403 # parameter can be in the query string or in the POST body.
404 {
405 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
406 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
407 },
408 ],
409 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
410 # inspection during preconfigured WAF evaluation. When specifying this
411 # field, the query or fragment part should be excluded.
412 {
413 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
414 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
415 },
416 ],
417 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
418 # preconfigured WAF exclusion. If omitted, it refers to all the rule
419 # IDs under the WAF rule set.
420 &quot;A String&quot;,
421 ],
422 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
423 },
424 ],
425 },
426 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
427 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
428 # must be a positive value between 0 and 2147483647.
429 # Rules are evaluated from highest to lowest priority where 0 is the
430 # highest priority and 2147483647 is the lowest priority.
431 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
432 # &quot;fairshare&quot;. Cannot be specified for any other actions.
433 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
434 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
435 # the traffic will continue to be banned by the rate limit after the
436 # rate falls below the threshold.
437 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
438 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
439 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
440 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
441 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
442 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
443 },
444 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
445 # threshold. Valid option is &quot;allow&quot; only.
446 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
447 # values are:
448 #
449 # - ALL: A single rate limit threshold is applied to all
450 # the requests matching this rule. This is the default value if
451 # &quot;enforceOnKey&quot; is not configured.
452 # - IP: The source IP address of
453 # the request is the key. Each IP has this limit enforced
454 # separately.
455 # - HTTP_HEADER: The value of the HTTP
456 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
457 # value is truncated to the first 128 bytes of the header value. If no
458 # such header is present in the request, the key type defaults toALL.
459 # - XFF_IP: The first IP address (i.e. the
460 # originating client IP address) specified in the list of IPs under
461 # X-Forwarded-For HTTP header. If no such header is present or the value
462 # is not a valid IP, the key defaults to the source IP address of
463 # the request i.e. key type IP.
464 # - HTTP_COOKIE: The value of the HTTP
465 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
466 # value is truncated to the first 128 bytes of the cookie value. If no
467 # such cookie is present in the request, the key type defaults toALL.
468 # - HTTP_PATH: The URL path of the HTTP request. The key
469 # value is truncated to the first 128 bytes.
470 # - SNI: Server name indication in the TLS session of the
471 # HTTPS request. The key value is truncated to the first 128 bytes. The
472 # key type defaults to ALL on a HTTP session.
473 # - REGION_CODE: The country/region from which the request
474 # originates.
475 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
476 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
477 # key type defaults to ALL.
478 # - USER_IP: The IP address of the originating client,
479 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
480 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
481 # an IP address cannot be resolved from it, the key type defaults toIP.
482 #
483 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
484 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
485 # key type defaults to ALL.
486 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
487 # limit threshold is enforced for all the requests matching the rule.
488 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
489 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
490 # ratelimit threshold/action is enforced. You can specify up to 3
491 # enforce_on_key_configs. If enforce_on_key_configs is specified,
492 # enforce_on_key must not be specified.
493 {
494 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
495 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
496 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
497 # taken as the key value.
498 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
499 # values are:
500 #
501 # - ALL: A single rate limit threshold is applied to all
502 # the requests matching this rule. This is the default value if
503 # &quot;enforceOnKeyConfigs&quot; is not configured.
504 # - IP: The source IP address of
505 # the request is the key. Each IP has this limit enforced
506 # separately.
507 # - HTTP_HEADER: The value of the HTTP
508 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
509 # value is truncated to the first 128 bytes of the header value. If no
510 # such header is present in the request, the key type defaults toALL.
511 # - XFF_IP: The first IP address (i.e. the
512 # originating client IP address) specified in the list of IPs under
513 # X-Forwarded-For HTTP header. If no such header is present or the
514 # value is not a valid IP, the key defaults to the source IP address of
515 # the request i.e. key type IP.
516 # - HTTP_COOKIE: The value of the HTTP
517 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
518 # value is truncated to the first 128 bytes of the cookie value. If no
519 # such cookie is present in the request, the key type defaults toALL.
520 # - HTTP_PATH: The URL path of the HTTP request. The key
521 # value is truncated to the first 128 bytes.
522 # - SNI: Server name indication in the TLS session of
523 # the HTTPS request. The key value is truncated to the first 128 bytes.
524 # The key type defaults to ALL on a HTTP session.
525 # - REGION_CODE: The country/region from which the
526 # request originates.
527 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
528 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
529 # key type defaults to ALL.
530 # - USER_IP: The IP address of the originating client,
531 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
532 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
533 # or an IP address cannot be resolved from it, the key type defaults toIP.
534 #
535 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
536 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
537 # key type defaults to ALL.
538 },
539 ],
540 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
541 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
542 # value.
543 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
544 # value.
545 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
546 # threshold, to either deny with a specified HTTP response code, or
547 # redirect to a different endpoint.
548 # Valid options are `deny(STATUS)`, where valid values for
549 # `STATUS` are 403, 404, 429, and 502, and
550 # `redirect`, where the redirect parameters come from
551 # `exceedRedirectOptions` below.
552 # The `redirect` action is only supported in Global Security Policies of
553 # type CLOUD_ARMOR.
554 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
555 # action. Cannot be specified if the exceed action is not redirect.
556 # This field is only supported in Global Security Policies of type
557 # CLOUD_ARMOR.
558 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
559 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
560 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
561 #
562 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
563 # challenge assessment.
564 # - EXTERNAL_302: redirect to a different URL via a 302
565 # response.
566 },
567 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
568 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
569 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
570 },
571 },
572 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
573 # other actions.
574 # This field is only supported in Global Security Policies of type
575 # CLOUD_ARMOR.
576 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
577 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
578 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
579 #
580 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
581 # challenge assessment.
582 # - EXTERNAL_302: redirect to a different URL via a 302
583 # response.
584 },
585 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
586 # policy. This can only be set during rule creation, if rule number is not
587 # specified it will be generated by the server.
588 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
589 # policy rule.
590 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
591 # allows you to control which network&#x27;s VMs get this rule. If this field
592 # is left blank, all VMs within the organization will receive the rule.
593 #
594 # This field may only be specified when versioned_expr is set to FIREWALL.
595 &quot;A String&quot;,
596 ],
597 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
598 # applied with this rule.
599 &quot;A String&quot;,
600 ],
601 }
602
603 validateOnly: boolean, If true, the request will not be committed.
604 x__xgafv: string, V1 error format.
605 Allowed values
606 1 - v1 error format
607 2 - v2 error format
608
609 Returns:
610 An object of the form:
611
612 { # Represents an Operation resource.
613 #
614 # Google Compute Engine has three Operation resources:
615 #
616 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
617 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
618 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
619 #
620 # You can use an operation resource to manage asynchronous API requests.
621 # For more information, readHandling
622 # API responses.
623 #
624 # Operations can be global, regional or zonal.
625 #
626 # - For global operations, use the `globalOperations`
627 # resource.
628 # - For regional operations, use the
629 # `regionOperations` resource.
630 # - For zonal operations, use
631 # the `zoneOperations` resource.
632 #
633 #
634 #
635 # For more information, read
636 # Global, Regional, and Zonal Resources.
637 #
638 # Note that completed Operation resources have a limited
639 # retention period.
640 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
641 # Not present otherwise.
642 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
643 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
644 # set when the operation is created.
645 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
646 # text format.
647 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
648 # this field will be populated.
649 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
650 # operation.
651 {
652 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
653 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
654 # details. There is a set of defined message types to use for providing
655 # details.The syntax depends on the error code. For example,
656 # QuotaExceededInfo will have details when the error code is
657 # QUOTA_EXCEEDED.
658 {
659 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
660 #
661 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
662 # is not enabled:
663 #
664 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
665 # &quot;domain&quot;: &quot;googleapis.com&quot;
666 # &quot;metadata&quot;: {
667 # &quot;resource&quot;: &quot;projects/123&quot;,
668 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
669 # }
670 # }
671 #
672 # This response indicates that the pubsub.googleapis.com API is not enabled.
673 #
674 # Example of an error that is returned when attempting to create a Spanner
675 # instance in a region that is out of stock:
676 #
677 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
678 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
679 # &quot;metadata&quot;: {
680 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
681 # }
682 # }
683 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
684 # is typically the registered service name of the tool or product that
685 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
686 # generated by some common infrastructure, the error domain must be a
687 # globally unique value that identifies the infrastructure. For Google API
688 # infrastructure, the error domain is &quot;googleapis.com&quot;.
689 &quot;metadatas&quot;: { # Additional structured details about this error.
690 #
691 # Keys must match a regular expression of `a-z+` but should
692 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
693 # length. When identifying the current value of an exceeded limit, the units
694 # should be contained in the key, not the value. For example, rather than
695 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
696 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
697 # instances that can be created in a single (batch) request.
698 &quot;a_key&quot;: &quot;A String&quot;,
699 },
700 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
701 # proximate cause of the error. Error reasons are unique within a particular
702 # domain of errors. This should be at most 63 characters and match a
703 # regular expression of `A-Z+[A-Z0-9]`, which represents
704 # UPPER_SNAKE_CASE.
705 },
706 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
707 #
708 # For example, if a quota check failed with an error indicating the calling
709 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
710 # directly to the right place in the developer console to flip the bit.
711 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
712 { # Describes a URL link.
713 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
714 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
715 },
716 ],
717 },
718 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
719 # which can be attached to an RPC error.
720 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
721 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
722 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
723 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
724 },
725 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
726 &quot;dimensions&quot;: { # The map holding related quota dimensions.
727 &quot;a_key&quot;: &quot;A String&quot;,
728 },
729 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
730 # type or metric.
731 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
732 # or metric.
733 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
734 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
735 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
736 },
737 },
738 ],
739 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
740 # This property is optional.
741 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
742 },
743 ],
744 },
745 &quot;getVersionOperationMetadata&quot;: {
746 &quot;inlineSbomInfo&quot;: {
747 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
748 # appropriate identifiers.
749 &quot;a_key&quot;: &quot;A String&quot;,
750 },
751 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
752 # identifiers.
753 &quot;a_key&quot;: &quot;A String&quot;,
754 },
755 },
756 },
757 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
758 # message that was returned, such as `NOT FOUND`.
759 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
760 # status code that was returned. For example, a `404` means the
761 # resource was not found.
762 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
763 # defined by the server.
764 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
765 # This value is inRFC3339
766 # text format.
767 &quot;instancesBulkInsertOperationMetadata&quot;: {
768 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
769 # Example key: zones/us-central1-a
770 &quot;a_key&quot;: {
771 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
772 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
773 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
774 # error.
775 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
776 # if the flow is rolling forward or rolling back.
777 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
778 },
779 },
780 },
781 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
782 # Operation resources.
783 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
784 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
785 # group of operations results from a `bulkInsert` API request.
786 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
787 # `update`, or `delete`, and so on.
788 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
789 # There is no requirement that this be linear or support any granularity of
790 # operations. This should not be used to guess when the operation will be
791 # complete. This number should monotonically increase as the operation
792 # progresses.
793 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
794 # applicable when performing regional operations.
795 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
796 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
797 # this field will contain information on all underlying zonal actions and
798 # their state.
799 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
800 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
801 # Example key: zones/us-central1-a
802 &quot;a_key&quot;: {
803 &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
804 # populated.
805 # different programming environments, including REST APIs and RPC APIs. It is
806 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
807 # three pieces of data: error code, error message, and error details.
808 #
809 # You can find out more about this error model and how to work with it in the
810 # [API Design Guide](https://cloud.google.com/apis/design/errors).
811 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
812 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
813 # message types for APIs to use.
814 {
815 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
816 },
817 ],
818 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
819 # user-facing error message should be localized and sent in the
820 # google.rpc.Status.details field, or localized by the client.
821 },
822 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
823 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
824 },
825 },
826 },
827 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
828 # This value is inRFC3339
829 # text format.
830 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
831 # following:
832 # `PENDING`, `RUNNING`, or `DONE`.
833 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
834 # operation.
835 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
836 # of the target resource.
837 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
838 # operations related to creating a snapshot, this points to the disk
839 # that the snapshot was created from.
840 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
841 # `[email protected]` or
842 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
843 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
844 # operation, this field will be populated.
845 {
846 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
847 # Engine returns NO_RESULTS_ON_PAGE if there
848 # are no results in the response.
849 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
850 # value format. For example:
851 #
852 # &quot;data&quot;: [
853 # {
854 # &quot;key&quot;: &quot;scope&quot;,
855 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
856 # }
857 {
858 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
859 # returned. For example, for warnings where there are no results in a list
860 # request for a particular zone, this key might be scope and
861 # the key value might be the zone name. Other examples might be a key
862 # indicating a deprecated resource and a suggested replacement, or a
863 # warning about invalid network settings (for example, if an instance
864 # attempts to perform IP forwarding but is not enabled for IP forwarding).
865 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
866 },
867 ],
868 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
869 },
870 ],
871 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
872 # applicable when performing per-zone operations.
873 }</pre>
874 </div>
875
876 <div class="method">
877 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, serviceProjectNumber=None, x__xgafv=None)</code>
878 <pre>Retrieves the list of all SecurityPolicy resources, regional and global,
879 available to the specified project.
880
881 To prevent failure, Google recommends that you set the
882 `returnPartialSuccess` parameter to `true`.
883
884 Args:
885 project: string, Name of the project scoping this request. (required)
886 filter: string, A filter expression that filters resources listed in the response. Most
887 Compute resources support two types of filter expressions:
888 expressions that support regular expressions and expressions that follow
889 API improvement proposal AIP-160.
890 These two types of filter expressions cannot be mixed in one request.
891
892 If you want to use AIP-160, your expression must specify the field name, an
893 operator, and the value that you want to use for filtering. The value
894 must be a string, a number, or a boolean. The operator
895 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
896
897 For example, if you are filtering Compute Engine instances, you can
898 exclude instances named `example-instance` by specifying
899 `name != example-instance`.
900
901 The `:*` comparison can be used to test whether a key has been defined.
902 For example, to find all objects with `owner` label use:
903 ```
904 labels.owner:*
905 ```
906
907 You can also filter nested fields. For example, you could specify
908 `scheduling.automaticRestart = false` to include instances only
909 if they are not scheduled for automatic restarts. You can use filtering
910 on nested fields to filter based onresource labels.
911
912 To filter on multiple expressions, provide each separate expression within
913 parentheses. For example:
914 ```
915 (scheduling.automaticRestart = true)
916 (cpuPlatform = &quot;Intel Skylake&quot;)
917 ```
918 By default, each expression is an `AND` expression. However, you
919 can include `AND` and `OR` expressions explicitly.
920 For example:
921 ```
922 (cpuPlatform = &quot;Intel Skylake&quot;) OR
923 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
924 (scheduling.automaticRestart = true)
925 ```
926
927 If you want to use a regular expression, use the `eq` (equal) or `ne`
928 (not equal) operator against a single un-parenthesized expression with or
929 without quotes or against multiple parenthesized expressions. Examples:
930
931 `fieldname eq unquoted literal`
932 `fieldname eq &#x27;single quoted literal&#x27;`
933 `fieldname eq &quot;double quoted literal&quot;`
934 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
935
936 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
937 The literal value must match the entire field.
938
939 For example, to filter for instances that do not end with name &quot;instance&quot;,
940 you would use `name ne .*instance`.
941
942 You cannot combine constraints on multiple fields using regular
943 expressions.
944 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region,
945 global) should be included in the response. For new resource types added
946 after this field, the flag has no effect as new resource types will always
947 include every visible scope for each scope type in response. For resource
948 types which predate this field, if this flag is omitted or false, only
949 scopes of the scope types where the resource type is expected to be found
950 will be included.
951 maxResults: integer, The maximum number of results per page that should be returned.
952 If the number of available results is larger than `maxResults`,
953 Compute Engine returns a `nextPageToken` that can be used to get
954 the next page of results in subsequent list requests. Acceptable values are
955 `0` to `500`, inclusive. (Default: `500`)
956 orderBy: string, Sorts list results by a certain order. By default, results
957 are returned in alphanumerical order based on the resource name.
958
959 You can also sort results in descending order based on the creation
960 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
961 results based on the `creationTimestamp` field in
962 reverse chronological order (newest result first). Use this to sort
963 resources like operations so that the newest operation is returned first.
964
965 Currently, only sorting by `name` or
966 `creationTimestamp desc` is supported.
967 pageToken: string, Specifies a page token to use. Set `pageToken` to the
968 `nextPageToken` returned by a previous list request to get
969 the next page of results.
970 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
971 of failure. The default value is false.
972
973 For example, when partial success behavior is enabled, aggregatedList for a
974 single zone scope either returns all resources in the zone or no resources,
975 with an error code.
976 serviceProjectNumber: string, The Shared VPC service project id or service project number for which
977 aggregated list request is invoked for subnetworks list-usable api.
978 x__xgafv: string, V1 error format.
979 Allowed values
980 1 - v1 error format
981 2 - v2 error format
982
983 Returns:
984 An object of the form:
985
986 {
987 &quot;etag&quot;: &quot;A String&quot;,
988 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
989 &quot;items&quot;: { # A list of SecurityPoliciesScopedList resources.
990 &quot;a_key&quot;: { # Name of the scope containing this set of security policies.
991 &quot;securityPolicies&quot;: [ # A list of SecurityPolicies contained in this scope.
992 { # Represents a Google Cloud Armor security policy resource.
993 #
994 # Only external backend services that use load balancers can
995 # reference a security policy. For more information, see
996 # Google Cloud Armor security policy overview.
997 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
998 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
999 &quot;confidenceThreshold&quot;: 3.14,
1000 &quot;expirationSec&quot;: 42,
1001 &quot;impactedBaselineThreshold&quot;: 3.14,
1002 &quot;loadThreshold&quot;: 3.14,
1003 },
1004 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
1005 # This field is only supported in Global Security Policies of type
1006 # CLOUD_ARMOR.
1007 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
1008 # This field is only supported in Global Security Policies of type
1009 # CLOUD_ARMOR.
1010 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
1011 # STANDARD - opaque rules. (default)
1012 # PREMIUM - transparent rules.
1013 # This field is only supported in Global Security Policies of type
1014 # CLOUD_ARMOR.
1015 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
1016 # customizable thresholds.
1017 {
1018 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
1019 &quot;autoDeployExpirationSec&quot;: 42,
1020 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
1021 &quot;autoDeployLoadThreshold&quot;: 3.14,
1022 &quot;detectionAbsoluteQps&quot;: 3.14,
1023 &quot;detectionLoadThreshold&quot;: 3.14,
1024 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
1025 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
1026 # The name must be unique within the security policy.
1027 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
1028 # on specified granular traffic units.
1029 { # Configurations to specifc granular traffic units processed by
1030 # Adaptive Protection.
1031 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
1032 # type constitutes a separate traffic unit.
1033 # It can only be set to true if `value` is empty.
1034 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
1035 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
1036 },
1037 ],
1038 },
1039 ],
1040 },
1041 },
1042 &quot;advancedOptionsConfig&quot;: {
1043 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
1044 # json_parsing is set to STANDARD.
1045 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
1046 #
1047 # As per RFC 1341, a Content-Type header value has the following format:
1048 #
1049 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
1050 #
1051 # When configuring a custom Content-Type header value, only the
1052 # type/subtype needs to be specified, and the parameters should be
1053 # excluded.
1054 &quot;A String&quot;,
1055 ],
1056 },
1057 &quot;jsonParsing&quot;: &quot;A String&quot;,
1058 &quot;logLevel&quot;: &quot;A String&quot;,
1059 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
1060 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
1061 # Values are case insensitive.
1062 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
1063 # resolving the callers client IP address.
1064 &quot;A String&quot;,
1065 ],
1066 },
1067 &quot;associations&quot;: [ # A list of associations that belong to this policy.
1068 {
1069 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1070 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
1071 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
1072 &quot;A String&quot;,
1073 ],
1074 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
1075 &quot;A String&quot;,
1076 ],
1077 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1078 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
1079 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
1080 },
1081 ],
1082 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1083 # text format.
1084 &quot;ddosProtectionConfig&quot;: {
1085 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
1086 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
1087 # builds DDoS mitigations that minimize collateral damage. It quantifies
1088 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
1089 # blocked.
1090 #
1091 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
1092 # not be deployed. Using a lower value will prioritize keeping collateral
1093 # damage low, possibly at the cost of its effectiveness in rate limiting
1094 # some or all of the attack. It should typically be unset, so Advanced DDoS
1095 # (and Adaptive Protection) uses the best mitigation it can find. Setting
1096 # the threshold is advised if there are logs for false positive detections
1097 # with high collateral damage, and will cause Advanced DDoS to attempt to
1098 # find a less aggressive rule that satisfies the constraint. If a suitable
1099 # rule cannot be found, the system falls back to either no mitigation for
1100 # smaller attacks or broader network throttles for larger ones.
1101 &quot;ddosProtection&quot;: &quot;A String&quot;,
1102 },
1103 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1104 # create the resource.
1105 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
1106 # unique in the organization in which the security policy is created. This
1107 # should only be used when SecurityPolicyType is FIREWALL.
1108 # The name must be 1-63 characters long, and comply with
1109 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
1110 # characters long and match the regular expression
1111 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
1112 # lowercase letter, and all following characters must be a dash, lowercase
1113 # letter, or digit, except the last character, which cannot be a dash.
1114 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
1115 # the metadata&#x27;s contents and used for optimistic locking. The
1116 # fingerprint is initially generated by Compute Engine and changes after
1117 # every request to modify or update metadata. You must always provide an
1118 # up-to-date fingerprint hash in order to update or change metadata,
1119 # otherwise the request will fail with error412 conditionNotMet.
1120 #
1121 # To see the latest fingerprint, make get() request to the
1122 # security policy.
1123 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1124 # defined by the server.
1125 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
1126 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
1127 # is essentially a hash of the labels set used for optimistic locking. The
1128 # fingerprint is initially generated by Compute Engine and changes after
1129 # every request to modify or update labels. You must always provide an
1130 # up-to-date fingerprint hash in order to update or change labels.
1131 #
1132 # To see the latest fingerprint, make get() request to the
1133 # security policy.
1134 &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.
1135 # Label values may be empty.
1136 &quot;a_key&quot;: &quot;A String&quot;,
1137 },
1138 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
1139 # The name must be 1-63 characters long, and comply withRFC1035.
1140 # Specifically, the name must be 1-63 characters long and match the regular
1141 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
1142 # character must be a lowercase letter, and all following characters must
1143 # be a dash, lowercase letter, or digit, except the last character, which
1144 # cannot be a dash.
1145 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
1146 &quot;recaptchaOptionsConfig&quot;: {
1147 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
1148 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
1149 # the security policy. The specified site key needs to be created from the
1150 # reCAPTCHA API. The user is responsible for the validity of the specified
1151 # site key. If not specified, a Google-managed site key is used.
1152 # This field is only supported in Global Security Policies of type
1153 # CLOUD_ARMOR.
1154 },
1155 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
1156 # resides. This field is not applicable to global security policies.
1157 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
1158 # policy can not exceed a set number of tuples.
1159 &quot;rules&quot;: [ # A list of rules that belong to this policy.
1160 # There must always be a default rule which is a rule with priority
1161 # 2147483647 and match all condition (for the match condition this means
1162 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
1163 # must be either match &quot;*&quot; or not set). If no rules are provided when
1164 # creating a security policy, a default rule with action &quot;allow&quot; will be
1165 # added.
1166 { # Represents a rule that describes one or more match conditions along with
1167 # the action to be taken when traffic matches this condition (allow or deny).
1168 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
1169 # The following are the valid actions:
1170 #
1171 # - allow: allow access to target.
1172 # - deny(STATUS): deny access to target, returns the
1173 # HTTP response code specified. Valid values for `STATUS`
1174 # are 403, 404, and 502.
1175 # - rate_based_ban: limit client traffic to the configured
1176 # threshold and ban the client if the traffic exceeds the threshold.
1177 # Configure parameters for this action in RateLimitOptions. Requires
1178 # rate_limit_options to be set.
1179 # - redirect: redirect to a different target. This can
1180 # either be an internal reCAPTCHA redirect, or an external URL-based
1181 # redirect via a 302 response. Parameters for this action can be configured
1182 # via redirectOptions. This action is only supported in Global Security
1183 # Policies of type CLOUD_ARMOR.
1184 # - throttle: limit
1185 # client traffic to the configured threshold. Configure parameters for this
1186 # action in rateLimitOptions. Requires rate_limit_options to be set for
1187 # this.
1188 # - fairshare (preview only): when traffic reaches the
1189 # threshold limit, requests from the clients matching this rule begin to be
1190 # rate-limited using the Fair Share algorithm. This action is only allowed
1191 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
1192 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1193 # create the resource.
1194 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
1195 # specified when versioned_expr is set to FIREWALL.
1196 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
1197 # enabled, logs will be exported to the configured export destination in
1198 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
1199 # cannot enable logging on &quot;goto_next&quot; rules.
1200 #
1201 # This field may only be specified when the versioned_expr is set to
1202 # FIREWALL.
1203 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
1204 # This field is only supported in Global Security Policies of type
1205 # CLOUD_ARMOR.
1206 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
1207 # present.
1208 {
1209 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
1210 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
1211 },
1212 ],
1213 },
1214 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
1215 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
1216 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1217 # Exactly one field must be specified.
1218 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
1219 # This field must be specified if versioned_expr is specified and cannot
1220 # be specified if versioned_expr is not specified.
1221 &quot;destIpRanges&quot;: [ # CIDR IP address range.
1222 #
1223 # This field may only be specified when versioned_expr is set to
1224 # FIREWALL.
1225 &quot;A String&quot;,
1226 ],
1227 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1228 #
1229 # This field may only be specified when versioned_expr is set to
1230 # FIREWALL.
1231 {
1232 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1233 # required when creating a firewall rule. This value can either be
1234 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
1235 # protocol number.
1236 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
1237 # only applicable for UDP or TCP protocol. Each entry must be either
1238 # an integer or a range. If not specified, this rule applies to
1239 # connections through any port.
1240 #
1241 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1242 #
1243 # This field may only be specified when versioned_expr is set to
1244 # FIREWALL.
1245 &quot;A String&quot;,
1246 ],
1247 },
1248 ],
1249 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
1250 # Maximum number of src_ip_ranges allowed is 10.
1251 &quot;A String&quot;,
1252 ],
1253 },
1254 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
1255 # A CEVAL expression is used to specify match criteria such as origin.ip,
1256 # source.region_code and contents in the request header.
1257 # Expressions containing `evaluateThreatIntelligence` require a Cloud
1258 # Armor Enterprise subscription and are not supported in Edge Policies
1259 # nor in Regional Policies. Expressions containing
1260 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
1261 # Enterprise subscription and are only supported in Global Security
1262 # Policies.
1263 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1264 # are documented at https://github.com/google/cel-spec.
1265 #
1266 # Example (Comparison):
1267 #
1268 # title: &quot;Summary size limit&quot;
1269 # description: &quot;Determines if a summary is less than 100 chars&quot;
1270 # expression: &quot;document.summary.size() &lt; 100&quot;
1271 #
1272 # Example (Equality):
1273 #
1274 # title: &quot;Requestor is owner&quot;
1275 # description: &quot;Determines if requestor is the document owner&quot;
1276 # expression: &quot;document.owner == request.auth.claims.email&quot;
1277 #
1278 # Example (Logic):
1279 #
1280 # title: &quot;Public documents&quot;
1281 # description: &quot;Determine whether the document should be publicly visible&quot;
1282 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1283 #
1284 # Example (Data Manipulation):
1285 #
1286 # title: &quot;Notification string&quot;
1287 # description: &quot;Create a notification string with a timestamp.&quot;
1288 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1289 #
1290 # The exact variables and functions that may be referenced within an expression
1291 # are determined by the service that evaluates it. See the service
1292 # documentation for additional information.
1293 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1294 # describes the expression, e.g. when hovered over it in a UI.
1295 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1296 # syntax.
1297 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1298 # reporting, e.g. a file name and a position in the file.
1299 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1300 # its purpose. This can be used e.g. in UIs which allow to enter the
1301 # expression.
1302 },
1303 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
1304 # CEVAL expression (i.e., &#x27;expr&#x27;).
1305 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
1306 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
1307 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
1308 # action-tokens. The provided site keys need to be created from
1309 # reCAPTCHA API under the same project where the security policy is
1310 # created.
1311 &quot;A String&quot;,
1312 ],
1313 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
1314 # session-tokens. The provided site keys need to be created from
1315 # reCAPTCHA API under the same project where the security policy is
1316 # created.
1317 &quot;A String&quot;,
1318 ],
1319 },
1320 },
1321 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
1322 # If this field is specified, config must also be specified.
1323 # Available preconfigured expressions along with their requirements are:
1324 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
1325 # config.
1326 },
1327 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
1328 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
1329 # &#x27;action&#x27; is enforced.
1330 #
1331 # The match criteria for a rule consists of built-in match fields (like
1332 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
1333 # (&#x27;userDefinedFields&#x27;).
1334 #
1335 # Field values may be extracted directly from the packet or derived from it
1336 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
1337 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
1338 # header is found in the packet and the entire field is in bounds.
1339 #
1340 # Each match field may specify which values can match it, listing one or
1341 # more ranges, prefixes, or exact values that are considered a match for
1342 # the field. A field value must be present in order to match a specified
1343 # match field. If no match values are specified for a match field, then any
1344 # field value is considered to match it, and it&#x27;s not required to be
1345 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
1346 #
1347 # For a packet to match a rule, all specified match fields must match the
1348 # corresponding field values derived from the packet.
1349 #
1350 # Example:
1351 #
1352 # networkMatch:
1353 # srcIpRanges:
1354 # - &quot;192.0.2.0/24&quot;
1355 # - &quot;198.51.100.0/24&quot;
1356 # userDefinedFields:
1357 # - name: &quot;ipv4_fragment_offset&quot;
1358 # values:
1359 # - &quot;1-0x1fff&quot;
1360 #
1361 # The above match condition matches packets with a source IP in
1362 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
1363 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
1364 # against.
1365 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
1366 # format.
1367 &quot;A String&quot;,
1368 ],
1369 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
1370 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
1371 &quot;A String&quot;,
1372 ],
1373 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
1374 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
1375 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
1376 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
1377 &quot;A String&quot;,
1378 ],
1379 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
1380 42,
1381 ],
1382 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
1383 &quot;A String&quot;,
1384 ],
1385 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
1386 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
1387 &quot;A String&quot;,
1388 ],
1389 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
1390 # IP address.
1391 &quot;A String&quot;,
1392 ],
1393 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
1394 # matching values for that field.
1395 {
1396 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
1397 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
1398 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
1399 # range (e.g. &quot;0x400-0x7ff&quot;).
1400 &quot;A String&quot;,
1401 ],
1402 },
1403 ],
1404 },
1405 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
1406 # does not evaluate preconfigured WAF rules, i.e., if
1407 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
1408 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
1409 {
1410 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
1411 # preconfigured WAF evaluation.
1412 {
1413 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1414 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1415 },
1416 ],
1417 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
1418 # inspection during preconfigured WAF evaluation.
1419 {
1420 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1421 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1422 },
1423 ],
1424 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
1425 # inspection during preconfigured WAF evaluation.
1426 {
1427 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1428 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1429 },
1430 ],
1431 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
1432 # from inspection during preconfigured WAF evaluation. Note that the
1433 # parameter can be in the query string or in the POST body.
1434 {
1435 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1436 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1437 },
1438 ],
1439 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
1440 # inspection during preconfigured WAF evaluation. When specifying this
1441 # field, the query or fragment part should be excluded.
1442 {
1443 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1444 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1445 },
1446 ],
1447 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
1448 # preconfigured WAF exclusion. If omitted, it refers to all the rule
1449 # IDs under the WAF rule set.
1450 &quot;A String&quot;,
1451 ],
1452 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
1453 },
1454 ],
1455 },
1456 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
1457 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
1458 # must be a positive value between 0 and 2147483647.
1459 # Rules are evaluated from highest to lowest priority where 0 is the
1460 # highest priority and 2147483647 is the lowest priority.
1461 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
1462 # &quot;fairshare&quot;. Cannot be specified for any other actions.
1463 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
1464 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
1465 # the traffic will continue to be banned by the rate limit after the
1466 # rate falls below the threshold.
1467 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
1468 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
1469 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
1470 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
1471 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1472 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1473 },
1474 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
1475 # threshold. Valid option is &quot;allow&quot; only.
1476 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
1477 # values are:
1478 #
1479 # - ALL: A single rate limit threshold is applied to all
1480 # the requests matching this rule. This is the default value if
1481 # &quot;enforceOnKey&quot; is not configured.
1482 # - IP: The source IP address of
1483 # the request is the key. Each IP has this limit enforced
1484 # separately.
1485 # - HTTP_HEADER: The value of the HTTP
1486 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
1487 # value is truncated to the first 128 bytes of the header value. If no
1488 # such header is present in the request, the key type defaults toALL.
1489 # - XFF_IP: The first IP address (i.e. the
1490 # originating client IP address) specified in the list of IPs under
1491 # X-Forwarded-For HTTP header. If no such header is present or the value
1492 # is not a valid IP, the key defaults to the source IP address of
1493 # the request i.e. key type IP.
1494 # - HTTP_COOKIE: The value of the HTTP
1495 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
1496 # value is truncated to the first 128 bytes of the cookie value. If no
1497 # such cookie is present in the request, the key type defaults toALL.
1498 # - HTTP_PATH: The URL path of the HTTP request. The key
1499 # value is truncated to the first 128 bytes.
1500 # - SNI: Server name indication in the TLS session of the
1501 # HTTPS request. The key value is truncated to the first 128 bytes. The
1502 # key type defaults to ALL on a HTTP session.
1503 # - REGION_CODE: The country/region from which the request
1504 # originates.
1505 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
1506 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
1507 # key type defaults to ALL.
1508 # - USER_IP: The IP address of the originating client,
1509 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
1510 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
1511 # an IP address cannot be resolved from it, the key type defaults toIP.
1512 #
1513 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
1514 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
1515 # key type defaults to ALL.
1516 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
1517 # limit threshold is enforced for all the requests matching the rule.
1518 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
1519 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
1520 # ratelimit threshold/action is enforced. You can specify up to 3
1521 # enforce_on_key_configs. If enforce_on_key_configs is specified,
1522 # enforce_on_key must not be specified.
1523 {
1524 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
1525 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
1526 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
1527 # taken as the key value.
1528 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
1529 # values are:
1530 #
1531 # - ALL: A single rate limit threshold is applied to all
1532 # the requests matching this rule. This is the default value if
1533 # &quot;enforceOnKeyConfigs&quot; is not configured.
1534 # - IP: The source IP address of
1535 # the request is the key. Each IP has this limit enforced
1536 # separately.
1537 # - HTTP_HEADER: The value of the HTTP
1538 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
1539 # value is truncated to the first 128 bytes of the header value. If no
1540 # such header is present in the request, the key type defaults toALL.
1541 # - XFF_IP: The first IP address (i.e. the
1542 # originating client IP address) specified in the list of IPs under
1543 # X-Forwarded-For HTTP header. If no such header is present or the
1544 # value is not a valid IP, the key defaults to the source IP address of
1545 # the request i.e. key type IP.
1546 # - HTTP_COOKIE: The value of the HTTP
1547 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
1548 # value is truncated to the first 128 bytes of the cookie value. If no
1549 # such cookie is present in the request, the key type defaults toALL.
1550 # - HTTP_PATH: The URL path of the HTTP request. The key
1551 # value is truncated to the first 128 bytes.
1552 # - SNI: Server name indication in the TLS session of
1553 # the HTTPS request. The key value is truncated to the first 128 bytes.
1554 # The key type defaults to ALL on a HTTP session.
1555 # - REGION_CODE: The country/region from which the
1556 # request originates.
1557 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
1558 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
1559 # key type defaults to ALL.
1560 # - USER_IP: The IP address of the originating client,
1561 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
1562 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
1563 # or an IP address cannot be resolved from it, the key type defaults toIP.
1564 #
1565 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
1566 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
1567 # key type defaults to ALL.
1568 },
1569 ],
1570 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
1571 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
1572 # value.
1573 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
1574 # value.
1575 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
1576 # threshold, to either deny with a specified HTTP response code, or
1577 # redirect to a different endpoint.
1578 # Valid options are `deny(STATUS)`, where valid values for
1579 # `STATUS` are 403, 404, 429, and 502, and
1580 # `redirect`, where the redirect parameters come from
1581 # `exceedRedirectOptions` below.
1582 # The `redirect` action is only supported in Global Security Policies of
1583 # type CLOUD_ARMOR.
1584 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
1585 # action. Cannot be specified if the exceed action is not redirect.
1586 # This field is only supported in Global Security Policies of type
1587 # CLOUD_ARMOR.
1588 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
1589 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1590 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
1591 #
1592 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
1593 # challenge assessment.
1594 # - EXTERNAL_302: redirect to a different URL via a 302
1595 # response.
1596 },
1597 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
1598 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1599 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1600 },
1601 },
1602 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
1603 # other actions.
1604 # This field is only supported in Global Security Policies of type
1605 # CLOUD_ARMOR.
1606 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
1607 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1608 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
1609 #
1610 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
1611 # challenge assessment.
1612 # - EXTERNAL_302: redirect to a different URL via a 302
1613 # response.
1614 },
1615 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
1616 # policy. This can only be set during rule creation, if rule number is not
1617 # specified it will be generated by the server.
1618 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
1619 # policy rule.
1620 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
1621 # allows you to control which network&#x27;s VMs get this rule. If this field
1622 # is left blank, all VMs within the organization will receive the rule.
1623 #
1624 # This field may only be specified when versioned_expr is set to FIREWALL.
1625 &quot;A String&quot;,
1626 ],
1627 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
1628 # applied with this rule.
1629 &quot;A String&quot;,
1630 ],
1631 },
1632 ],
1633 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
1634 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
1635 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
1636 # unique in the organization in which the security policy is created. This
1637 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
1638 # The name must be 1-63 characters long, and comply with
1639 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
1640 # characters long and match the regular expression
1641 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
1642 # lowercase letter, and all following characters must be a dash, lowercase
1643 # letter, or digit, except the last character, which cannot be a dash.
1644 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
1645 #
1646 # - CLOUD_ARMOR: Cloud Armor backend security policies can
1647 # be configured to filter incoming HTTP requests targeting backend services.
1648 # They filter requests before they hit the origin servers.
1649 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
1650 # be configured to filter incoming HTTP requests targeting backend services
1651 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
1652 # They filter requests before the request is served from Google&#x27;s cache.
1653 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
1654 # internal service policies can be configured to filter HTTP requests
1655 # targeting services managed by Traffic Director in a service mesh. They
1656 # filter requests before the request is served from the application.
1657 #
1658 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
1659 # can be configured to filter packets targeting network load balancing
1660 # resources such as backend services, target pools, target instances, and
1661 # instances with external IPs. They filter requests before the request is
1662 # served from the application.
1663 #
1664 #
1665 # This field can be set only at resource creation time.
1666 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
1667 # user-defined field consists of up to 4 bytes extracted from a fixed offset
1668 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
1669 # optional mask to select certain bits. Rules may then specify matching
1670 # values for these fields.
1671 #
1672 # Example:
1673 #
1674 # userDefinedFields:
1675 # - name: &quot;ipv4_fragment_offset&quot;
1676 # base: IPV4
1677 # offset: 6
1678 # size: 2
1679 # mask: &quot;0x1fff&quot;
1680 {
1681 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
1682 #
1683 # - IPV4: Points to the beginning of the IPv4 header.
1684 # - IPV6: Points to the beginning of the IPv6 header.
1685 # - TCP: Points to the beginning of the TCP header, skipping
1686 # over any IPv4 options or IPv6 extension headers. Not present for
1687 # non-first fragments.
1688 # - UDP: Points to the beginning of the UDP header, skipping
1689 # over any IPv4 options or IPv6 extension headers. Not present for
1690 # non-first fragments.
1691 #
1692 #
1693 # required
1694 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
1695 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
1696 # The last byte of the field (in network byte order) corresponds to the
1697 # least significant byte of the mask.
1698 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
1699 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
1700 # &#x27;base&#x27;.
1701 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
1702 },
1703 ],
1704 },
1705 ],
1706 &quot;warning&quot;: { # Informational warning which replaces the list of
1707 # security policies when the list is empty.
1708 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1709 # Engine returns NO_RESULTS_ON_PAGE if there
1710 # are no results in the response.
1711 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1712 # value format. For example:
1713 #
1714 # &quot;data&quot;: [
1715 # {
1716 # &quot;key&quot;: &quot;scope&quot;,
1717 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1718 # }
1719 {
1720 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1721 # returned. For example, for warnings where there are no results in a list
1722 # request for a particular zone, this key might be scope and
1723 # the key value might be the zone name. Other examples might be a key
1724 # indicating a deprecated resource and a suggested replacement, or a
1725 # warning about invalid network settings (for example, if an instance
1726 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1727 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1728 },
1729 ],
1730 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1731 },
1732 },
1733 },
1734 &quot;kind&quot;: &quot;compute#securityPoliciesAggregatedList&quot;, # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyAggregatedList for lists of Security
1735 # Policies.
1736 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
1737 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
1738 # the query parameter pageToken in the next list request.
1739 # Subsequent list requests will have their own nextPageToken to
1740 # continue paging through the results.
1741 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource.
1742 &quot;unreachables&quot;: [ # Output only. [Output Only] Unreachable resources.
1743 &quot;A String&quot;,
1744 ],
1745 &quot;warning&quot;: { # [Output Only] Informational warning message.
1746 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1747 # Engine returns NO_RESULTS_ON_PAGE if there
1748 # are no results in the response.
1749 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1750 # value format. For example:
1751 #
1752 # &quot;data&quot;: [
1753 # {
1754 # &quot;key&quot;: &quot;scope&quot;,
1755 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1756 # }
1757 {
1758 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1759 # returned. For example, for warnings where there are no results in a list
1760 # request for a particular zone, this key might be scope and
1761 # the key value might be the zone name. Other examples might be a key
1762 # indicating a deprecated resource and a suggested replacement, or a
1763 # warning about invalid network settings (for example, if an instance
1764 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1765 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1766 },
1767 ],
1768 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1769 },
1770 }</pre>
1771 </div>
1772
1773 <div class="method">
1774 <code class="details" id="aggregatedList_next">aggregatedList_next()</code>
1775 <pre>Retrieves the next page of results.
1776
1777 Args:
1778 previous_request: The request for the previous page. (required)
1779 previous_response: The response from the request for the previous page. (required)
1780
1781 Returns:
1782 A request object that you can call &#x27;execute()&#x27; on to request the next
1783 page. Returns None if there are no more items in the collection.
1784 </pre>
1785 </div>
1786
1787 <div class="method">
1788 <code class="details" id="close">close()</code>
1789 <pre>Close httplib2 connections.</pre>
1790 </div>
1791
1792 <div class="method">
1793 <code class="details" id="delete">delete(project, securityPolicy, requestId=None, x__xgafv=None)</code>
1794 <pre>Deletes the specified policy.
1795
1796 Args:
1797 project: string, Project ID for this request. (required)
1798 securityPolicy: string, Name of the security policy to delete. (required)
1799 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1800 that if you must retry your request, the server will know to ignore the
1801 request if it has already been completed.
1802
1803 For example, consider a situation where you make an initial request and
1804 the request times out. If you make the request again with the same
1805 request ID, the server can check if original operation with the same
1806 request ID was received, and if so, will ignore the second request. This
1807 prevents clients from accidentally creating duplicate commitments.
1808
1809 The request ID must be
1810 a valid UUID with the exception that zero UUID is not supported
1811 (00000000-0000-0000-0000-000000000000).
1812 x__xgafv: string, V1 error format.
1813 Allowed values
1814 1 - v1 error format
1815 2 - v2 error format
1816
1817 Returns:
1818 An object of the form:
1819
1820 { # Represents an Operation resource.
1821 #
1822 # Google Compute Engine has three Operation resources:
1823 #
1824 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
1825 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
1826 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
1827 #
1828 # You can use an operation resource to manage asynchronous API requests.
1829 # For more information, readHandling
1830 # API responses.
1831 #
1832 # Operations can be global, regional or zonal.
1833 #
1834 # - For global operations, use the `globalOperations`
1835 # resource.
1836 # - For regional operations, use the
1837 # `regionOperations` resource.
1838 # - For zonal operations, use
1839 # the `zoneOperations` resource.
1840 #
1841 #
1842 #
1843 # For more information, read
1844 # Global, Regional, and Zonal Resources.
1845 #
1846 # Note that completed Operation resources have a limited
1847 # retention period.
1848 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1849 # Not present otherwise.
1850 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1851 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1852 # set when the operation is created.
1853 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1854 # text format.
1855 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1856 # this field will be populated.
1857 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1858 # operation.
1859 {
1860 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1861 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1862 # details. There is a set of defined message types to use for providing
1863 # details.The syntax depends on the error code. For example,
1864 # QuotaExceededInfo will have details when the error code is
1865 # QUOTA_EXCEEDED.
1866 {
1867 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1868 #
1869 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1870 # is not enabled:
1871 #
1872 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1873 # &quot;domain&quot;: &quot;googleapis.com&quot;
1874 # &quot;metadata&quot;: {
1875 # &quot;resource&quot;: &quot;projects/123&quot;,
1876 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1877 # }
1878 # }
1879 #
1880 # This response indicates that the pubsub.googleapis.com API is not enabled.
1881 #
1882 # Example of an error that is returned when attempting to create a Spanner
1883 # instance in a region that is out of stock:
1884 #
1885 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1886 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1887 # &quot;metadata&quot;: {
1888 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1889 # }
1890 # }
1891 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1892 # is typically the registered service name of the tool or product that
1893 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1894 # generated by some common infrastructure, the error domain must be a
1895 # globally unique value that identifies the infrastructure. For Google API
1896 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1897 &quot;metadatas&quot;: { # Additional structured details about this error.
1898 #
1899 # Keys must match a regular expression of `a-z+` but should
1900 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1901 # length. When identifying the current value of an exceeded limit, the units
1902 # should be contained in the key, not the value. For example, rather than
1903 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1904 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1905 # instances that can be created in a single (batch) request.
1906 &quot;a_key&quot;: &quot;A String&quot;,
1907 },
1908 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1909 # proximate cause of the error. Error reasons are unique within a particular
1910 # domain of errors. This should be at most 63 characters and match a
1911 # regular expression of `A-Z+[A-Z0-9]`, which represents
1912 # UPPER_SNAKE_CASE.
1913 },
1914 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1915 #
1916 # For example, if a quota check failed with an error indicating the calling
1917 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1918 # directly to the right place in the developer console to flip the bit.
1919 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1920 { # Describes a URL link.
1921 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1922 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1923 },
1924 ],
1925 },
1926 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1927 # which can be attached to an RPC error.
1928 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1929 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1930 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1931 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1932 },
1933 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1934 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1935 &quot;a_key&quot;: &quot;A String&quot;,
1936 },
1937 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1938 # type or metric.
1939 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1940 # or metric.
1941 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1942 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1943 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1944 },
1945 },
1946 ],
1947 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1948 # This property is optional.
1949 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1950 },
1951 ],
1952 },
1953 &quot;getVersionOperationMetadata&quot;: {
1954 &quot;inlineSbomInfo&quot;: {
1955 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1956 # appropriate identifiers.
1957 &quot;a_key&quot;: &quot;A String&quot;,
1958 },
1959 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1960 # identifiers.
1961 &quot;a_key&quot;: &quot;A String&quot;,
1962 },
1963 },
1964 },
1965 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1966 # message that was returned, such as `NOT FOUND`.
1967 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1968 # status code that was returned. For example, a `404` means the
1969 # resource was not found.
1970 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1971 # defined by the server.
1972 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1973 # This value is inRFC3339
1974 # text format.
1975 &quot;instancesBulkInsertOperationMetadata&quot;: {
1976 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1977 # Example key: zones/us-central1-a
1978 &quot;a_key&quot;: {
1979 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1980 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1981 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1982 # error.
1983 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1984 # if the flow is rolling forward or rolling back.
1985 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1986 },
1987 },
1988 },
1989 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1990 # Operation resources.
1991 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1992 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1993 # group of operations results from a `bulkInsert` API request.
1994 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1995 # `update`, or `delete`, and so on.
1996 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1997 # There is no requirement that this be linear or support any granularity of
1998 # operations. This should not be used to guess when the operation will be
1999 # complete. This number should monotonically increase as the operation
2000 # progresses.
2001 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
2002 # applicable when performing regional operations.
2003 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2004 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
2005 # this field will contain information on all underlying zonal actions and
2006 # their state.
2007 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
2008 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
2009 # Example key: zones/us-central1-a
2010 &quot;a_key&quot;: {
2011 &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
2012 # populated.
2013 # different programming environments, including REST APIs and RPC APIs. It is
2014 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2015 # three pieces of data: error code, error message, and error details.
2016 #
2017 # You can find out more about this error model and how to work with it in the
2018 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2019 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2020 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2021 # message types for APIs to use.
2022 {
2023 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2024 },
2025 ],
2026 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2027 # user-facing error message should be localized and sent in the
2028 # google.rpc.Status.details field, or localized by the client.
2029 },
2030 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
2031 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
2032 },
2033 },
2034 },
2035 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
2036 # This value is inRFC3339
2037 # text format.
2038 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
2039 # following:
2040 # `PENDING`, `RUNNING`, or `DONE`.
2041 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
2042 # operation.
2043 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
2044 # of the target resource.
2045 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
2046 # operations related to creating a snapshot, this points to the disk
2047 # that the snapshot was created from.
2048 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
2049 # `[email protected]` or
2050 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
2051 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
2052 # operation, this field will be populated.
2053 {
2054 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
2055 # Engine returns NO_RESULTS_ON_PAGE if there
2056 # are no results in the response.
2057 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
2058 # value format. For example:
2059 #
2060 # &quot;data&quot;: [
2061 # {
2062 # &quot;key&quot;: &quot;scope&quot;,
2063 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
2064 # }
2065 {
2066 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
2067 # returned. For example, for warnings where there are no results in a list
2068 # request for a particular zone, this key might be scope and
2069 # the key value might be the zone name. Other examples might be a key
2070 # indicating a deprecated resource and a suggested replacement, or a
2071 # warning about invalid network settings (for example, if an instance
2072 # attempts to perform IP forwarding but is not enabled for IP forwarding).
2073 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2074 },
2075 ],
2076 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2077 },
2078 ],
2079 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
2080 # applicable when performing per-zone operations.
2081 }</pre>
2082 </div>
2083
2084 <div class="method">
2085 <code class="details" id="get">get(project, securityPolicy, x__xgafv=None)</code>
2086 <pre>List all of the ordered rules present in a single specified policy.
2087
2088 Args:
2089 project: string, Project ID for this request. (required)
2090 securityPolicy: string, Name of the security policy to get. (required)
2091 x__xgafv: string, V1 error format.
2092 Allowed values
2093 1 - v1 error format
2094 2 - v2 error format
2095
2096 Returns:
2097 An object of the form:
2098
2099 { # Represents a Google Cloud Armor security policy resource.
2100 #
2101 # Only external backend services that use load balancers can
2102 # reference a security policy. For more information, see
2103 # Google Cloud Armor security policy overview.
2104 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
2105 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
2106 &quot;confidenceThreshold&quot;: 3.14,
2107 &quot;expirationSec&quot;: 42,
2108 &quot;impactedBaselineThreshold&quot;: 3.14,
2109 &quot;loadThreshold&quot;: 3.14,
2110 },
2111 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
2112 # This field is only supported in Global Security Policies of type
2113 # CLOUD_ARMOR.
2114 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
2115 # This field is only supported in Global Security Policies of type
2116 # CLOUD_ARMOR.
2117 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
2118 # STANDARD - opaque rules. (default)
2119 # PREMIUM - transparent rules.
2120 # This field is only supported in Global Security Policies of type
2121 # CLOUD_ARMOR.
2122 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
2123 # customizable thresholds.
2124 {
2125 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
2126 &quot;autoDeployExpirationSec&quot;: 42,
2127 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
2128 &quot;autoDeployLoadThreshold&quot;: 3.14,
2129 &quot;detectionAbsoluteQps&quot;: 3.14,
2130 &quot;detectionLoadThreshold&quot;: 3.14,
2131 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
2132 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
2133 # The name must be unique within the security policy.
2134 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
2135 # on specified granular traffic units.
2136 { # Configurations to specifc granular traffic units processed by
2137 # Adaptive Protection.
2138 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
2139 # type constitutes a separate traffic unit.
2140 # It can only be set to true if `value` is empty.
2141 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
2142 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
2143 },
2144 ],
2145 },
2146 ],
2147 },
2148 },
2149 &quot;advancedOptionsConfig&quot;: {
2150 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
2151 # json_parsing is set to STANDARD.
2152 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
2153 #
2154 # As per RFC 1341, a Content-Type header value has the following format:
2155 #
2156 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
2157 #
2158 # When configuring a custom Content-Type header value, only the
2159 # type/subtype needs to be specified, and the parameters should be
2160 # excluded.
2161 &quot;A String&quot;,
2162 ],
2163 },
2164 &quot;jsonParsing&quot;: &quot;A String&quot;,
2165 &quot;logLevel&quot;: &quot;A String&quot;,
2166 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
2167 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
2168 # Values are case insensitive.
2169 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
2170 # resolving the callers client IP address.
2171 &quot;A String&quot;,
2172 ],
2173 },
2174 &quot;associations&quot;: [ # A list of associations that belong to this policy.
2175 {
2176 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
2177 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
2178 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
2179 &quot;A String&quot;,
2180 ],
2181 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
2182 &quot;A String&quot;,
2183 ],
2184 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
2185 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
2186 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
2187 },
2188 ],
2189 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
2190 # text format.
2191 &quot;ddosProtectionConfig&quot;: {
2192 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
2193 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
2194 # builds DDoS mitigations that minimize collateral damage. It quantifies
2195 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
2196 # blocked.
2197 #
2198 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
2199 # not be deployed. Using a lower value will prioritize keeping collateral
2200 # damage low, possibly at the cost of its effectiveness in rate limiting
2201 # some or all of the attack. It should typically be unset, so Advanced DDoS
2202 # (and Adaptive Protection) uses the best mitigation it can find. Setting
2203 # the threshold is advised if there are logs for false positive detections
2204 # with high collateral damage, and will cause Advanced DDoS to attempt to
2205 # find a less aggressive rule that satisfies the constraint. If a suitable
2206 # rule cannot be found, the system falls back to either no mitigation for
2207 # smaller attacks or broader network throttles for larger ones.
2208 &quot;ddosProtection&quot;: &quot;A String&quot;,
2209 },
2210 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2211 # create the resource.
2212 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
2213 # unique in the organization in which the security policy is created. This
2214 # should only be used when SecurityPolicyType is FIREWALL.
2215 # The name must be 1-63 characters long, and comply with
2216 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
2217 # characters long and match the regular expression
2218 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
2219 # lowercase letter, and all following characters must be a dash, lowercase
2220 # letter, or digit, except the last character, which cannot be a dash.
2221 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
2222 # the metadata&#x27;s contents and used for optimistic locking. The
2223 # fingerprint is initially generated by Compute Engine and changes after
2224 # every request to modify or update metadata. You must always provide an
2225 # up-to-date fingerprint hash in order to update or change metadata,
2226 # otherwise the request will fail with error412 conditionNotMet.
2227 #
2228 # To see the latest fingerprint, make get() request to the
2229 # security policy.
2230 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
2231 # defined by the server.
2232 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
2233 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
2234 # is essentially a hash of the labels set used for optimistic locking. The
2235 # fingerprint is initially generated by Compute Engine and changes after
2236 # every request to modify or update labels. You must always provide an
2237 # up-to-date fingerprint hash in order to update or change labels.
2238 #
2239 # To see the latest fingerprint, make get() request to the
2240 # security policy.
2241 &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.
2242 # Label values may be empty.
2243 &quot;a_key&quot;: &quot;A String&quot;,
2244 },
2245 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
2246 # The name must be 1-63 characters long, and comply withRFC1035.
2247 # Specifically, the name must be 1-63 characters long and match the regular
2248 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
2249 # character must be a lowercase letter, and all following characters must
2250 # be a dash, lowercase letter, or digit, except the last character, which
2251 # cannot be a dash.
2252 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
2253 &quot;recaptchaOptionsConfig&quot;: {
2254 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
2255 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
2256 # the security policy. The specified site key needs to be created from the
2257 # reCAPTCHA API. The user is responsible for the validity of the specified
2258 # site key. If not specified, a Google-managed site key is used.
2259 # This field is only supported in Global Security Policies of type
2260 # CLOUD_ARMOR.
2261 },
2262 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
2263 # resides. This field is not applicable to global security policies.
2264 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
2265 # policy can not exceed a set number of tuples.
2266 &quot;rules&quot;: [ # A list of rules that belong to this policy.
2267 # There must always be a default rule which is a rule with priority
2268 # 2147483647 and match all condition (for the match condition this means
2269 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
2270 # must be either match &quot;*&quot; or not set). If no rules are provided when
2271 # creating a security policy, a default rule with action &quot;allow&quot; will be
2272 # added.
2273 { # Represents a rule that describes one or more match conditions along with
2274 # the action to be taken when traffic matches this condition (allow or deny).
2275 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2276 # The following are the valid actions:
2277 #
2278 # - allow: allow access to target.
2279 # - deny(STATUS): deny access to target, returns the
2280 # HTTP response code specified. Valid values for `STATUS`
2281 # are 403, 404, and 502.
2282 # - rate_based_ban: limit client traffic to the configured
2283 # threshold and ban the client if the traffic exceeds the threshold.
2284 # Configure parameters for this action in RateLimitOptions. Requires
2285 # rate_limit_options to be set.
2286 # - redirect: redirect to a different target. This can
2287 # either be an internal reCAPTCHA redirect, or an external URL-based
2288 # redirect via a 302 response. Parameters for this action can be configured
2289 # via redirectOptions. This action is only supported in Global Security
2290 # Policies of type CLOUD_ARMOR.
2291 # - throttle: limit
2292 # client traffic to the configured threshold. Configure parameters for this
2293 # action in rateLimitOptions. Requires rate_limit_options to be set for
2294 # this.
2295 # - fairshare (preview only): when traffic reaches the
2296 # threshold limit, requests from the clients matching this rule begin to be
2297 # rate-limited using the Fair Share algorithm. This action is only allowed
2298 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2299 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2300 # create the resource.
2301 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
2302 # specified when versioned_expr is set to FIREWALL.
2303 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
2304 # enabled, logs will be exported to the configured export destination in
2305 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
2306 # cannot enable logging on &quot;goto_next&quot; rules.
2307 #
2308 # This field may only be specified when the versioned_expr is set to
2309 # FIREWALL.
2310 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2311 # This field is only supported in Global Security Policies of type
2312 # CLOUD_ARMOR.
2313 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2314 # present.
2315 {
2316 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2317 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2318 },
2319 ],
2320 },
2321 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2322 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2323 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2324 # Exactly one field must be specified.
2325 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2326 # This field must be specified if versioned_expr is specified and cannot
2327 # be specified if versioned_expr is not specified.
2328 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2329 #
2330 # This field may only be specified when versioned_expr is set to
2331 # FIREWALL.
2332 &quot;A String&quot;,
2333 ],
2334 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2335 #
2336 # This field may only be specified when versioned_expr is set to
2337 # FIREWALL.
2338 {
2339 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2340 # required when creating a firewall rule. This value can either be
2341 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2342 # protocol number.
2343 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2344 # only applicable for UDP or TCP protocol. Each entry must be either
2345 # an integer or a range. If not specified, this rule applies to
2346 # connections through any port.
2347 #
2348 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2349 #
2350 # This field may only be specified when versioned_expr is set to
2351 # FIREWALL.
2352 &quot;A String&quot;,
2353 ],
2354 },
2355 ],
2356 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2357 # Maximum number of src_ip_ranges allowed is 10.
2358 &quot;A String&quot;,
2359 ],
2360 },
2361 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
2362 # A CEVAL expression is used to specify match criteria such as origin.ip,
2363 # source.region_code and contents in the request header.
2364 # Expressions containing `evaluateThreatIntelligence` require a Cloud
2365 # Armor Enterprise subscription and are not supported in Edge Policies
2366 # nor in Regional Policies. Expressions containing
2367 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
2368 # Enterprise subscription and are only supported in Global Security
2369 # Policies.
2370 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2371 # are documented at https://github.com/google/cel-spec.
2372 #
2373 # Example (Comparison):
2374 #
2375 # title: &quot;Summary size limit&quot;
2376 # description: &quot;Determines if a summary is less than 100 chars&quot;
2377 # expression: &quot;document.summary.size() &lt; 100&quot;
2378 #
2379 # Example (Equality):
2380 #
2381 # title: &quot;Requestor is owner&quot;
2382 # description: &quot;Determines if requestor is the document owner&quot;
2383 # expression: &quot;document.owner == request.auth.claims.email&quot;
2384 #
2385 # Example (Logic):
2386 #
2387 # title: &quot;Public documents&quot;
2388 # description: &quot;Determine whether the document should be publicly visible&quot;
2389 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2390 #
2391 # Example (Data Manipulation):
2392 #
2393 # title: &quot;Notification string&quot;
2394 # description: &quot;Create a notification string with a timestamp.&quot;
2395 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2396 #
2397 # The exact variables and functions that may be referenced within an expression
2398 # are determined by the service that evaluates it. See the service
2399 # documentation for additional information.
2400 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2401 # describes the expression, e.g. when hovered over it in a UI.
2402 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2403 # syntax.
2404 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2405 # reporting, e.g. a file name and a position in the file.
2406 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2407 # its purpose. This can be used e.g. in UIs which allow to enter the
2408 # expression.
2409 },
2410 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2411 # CEVAL expression (i.e., &#x27;expr&#x27;).
2412 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2413 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2414 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2415 # action-tokens. The provided site keys need to be created from
2416 # reCAPTCHA API under the same project where the security policy is
2417 # created.
2418 &quot;A String&quot;,
2419 ],
2420 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2421 # session-tokens. The provided site keys need to be created from
2422 # reCAPTCHA API under the same project where the security policy is
2423 # created.
2424 &quot;A String&quot;,
2425 ],
2426 },
2427 },
2428 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2429 # If this field is specified, config must also be specified.
2430 # Available preconfigured expressions along with their requirements are:
2431 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2432 # config.
2433 },
2434 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2435 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2436 # &#x27;action&#x27; is enforced.
2437 #
2438 # The match criteria for a rule consists of built-in match fields (like
2439 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2440 # (&#x27;userDefinedFields&#x27;).
2441 #
2442 # Field values may be extracted directly from the packet or derived from it
2443 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
2444 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
2445 # header is found in the packet and the entire field is in bounds.
2446 #
2447 # Each match field may specify which values can match it, listing one or
2448 # more ranges, prefixes, or exact values that are considered a match for
2449 # the field. A field value must be present in order to match a specified
2450 # match field. If no match values are specified for a match field, then any
2451 # field value is considered to match it, and it&#x27;s not required to be
2452 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
2453 #
2454 # For a packet to match a rule, all specified match fields must match the
2455 # corresponding field values derived from the packet.
2456 #
2457 # Example:
2458 #
2459 # networkMatch:
2460 # srcIpRanges:
2461 # - &quot;192.0.2.0/24&quot;
2462 # - &quot;198.51.100.0/24&quot;
2463 # userDefinedFields:
2464 # - name: &quot;ipv4_fragment_offset&quot;
2465 # values:
2466 # - &quot;1-0x1fff&quot;
2467 #
2468 # The above match condition matches packets with a source IP in
2469 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
2470 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
2471 # against.
2472 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
2473 # format.
2474 &quot;A String&quot;,
2475 ],
2476 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2477 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2478 &quot;A String&quot;,
2479 ],
2480 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
2481 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
2482 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
2483 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
2484 &quot;A String&quot;,
2485 ],
2486 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
2487 42,
2488 ],
2489 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
2490 &quot;A String&quot;,
2491 ],
2492 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2493 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2494 &quot;A String&quot;,
2495 ],
2496 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
2497 # IP address.
2498 &quot;A String&quot;,
2499 ],
2500 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
2501 # matching values for that field.
2502 {
2503 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
2504 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
2505 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
2506 # range (e.g. &quot;0x400-0x7ff&quot;).
2507 &quot;A String&quot;,
2508 ],
2509 },
2510 ],
2511 },
2512 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
2513 # does not evaluate preconfigured WAF rules, i.e., if
2514 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
2515 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
2516 {
2517 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
2518 # preconfigured WAF evaluation.
2519 {
2520 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2521 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2522 },
2523 ],
2524 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
2525 # inspection during preconfigured WAF evaluation.
2526 {
2527 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2528 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2529 },
2530 ],
2531 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
2532 # inspection during preconfigured WAF evaluation.
2533 {
2534 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2535 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2536 },
2537 ],
2538 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
2539 # from inspection during preconfigured WAF evaluation. Note that the
2540 # parameter can be in the query string or in the POST body.
2541 {
2542 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2543 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2544 },
2545 ],
2546 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
2547 # inspection during preconfigured WAF evaluation. When specifying this
2548 # field, the query or fragment part should be excluded.
2549 {
2550 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2551 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2552 },
2553 ],
2554 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
2555 # preconfigured WAF exclusion. If omitted, it refers to all the rule
2556 # IDs under the WAF rule set.
2557 &quot;A String&quot;,
2558 ],
2559 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
2560 },
2561 ],
2562 },
2563 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2564 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
2565 # must be a positive value between 0 and 2147483647.
2566 # Rules are evaluated from highest to lowest priority where 0 is the
2567 # highest priority and 2147483647 is the lowest priority.
2568 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
2569 # &quot;fairshare&quot;. Cannot be specified for any other actions.
2570 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
2571 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
2572 # the traffic will continue to be banned by the rate limit after the
2573 # rate falls below the threshold.
2574 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
2575 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
2576 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
2577 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2578 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2579 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2580 },
2581 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
2582 # threshold. Valid option is &quot;allow&quot; only.
2583 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2584 # values are:
2585 #
2586 # - ALL: A single rate limit threshold is applied to all
2587 # the requests matching this rule. This is the default value if
2588 # &quot;enforceOnKey&quot; is not configured.
2589 # - IP: The source IP address of
2590 # the request is the key. Each IP has this limit enforced
2591 # separately.
2592 # - HTTP_HEADER: The value of the HTTP
2593 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2594 # value is truncated to the first 128 bytes of the header value. If no
2595 # such header is present in the request, the key type defaults toALL.
2596 # - XFF_IP: The first IP address (i.e. the
2597 # originating client IP address) specified in the list of IPs under
2598 # X-Forwarded-For HTTP header. If no such header is present or the value
2599 # is not a valid IP, the key defaults to the source IP address of
2600 # the request i.e. key type IP.
2601 # - HTTP_COOKIE: The value of the HTTP
2602 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2603 # value is truncated to the first 128 bytes of the cookie value. If no
2604 # such cookie is present in the request, the key type defaults toALL.
2605 # - HTTP_PATH: The URL path of the HTTP request. The key
2606 # value is truncated to the first 128 bytes.
2607 # - SNI: Server name indication in the TLS session of the
2608 # HTTPS request. The key value is truncated to the first 128 bytes. The
2609 # key type defaults to ALL on a HTTP session.
2610 # - REGION_CODE: The country/region from which the request
2611 # originates.
2612 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2613 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2614 # key type defaults to ALL.
2615 # - USER_IP: The IP address of the originating client,
2616 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2617 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
2618 # an IP address cannot be resolved from it, the key type defaults toIP.
2619 #
2620 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2621 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2622 # key type defaults to ALL.
2623 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
2624 # limit threshold is enforced for all the requests matching the rule.
2625 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
2626 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
2627 # ratelimit threshold/action is enforced. You can specify up to 3
2628 # enforce_on_key_configs. If enforce_on_key_configs is specified,
2629 # enforce_on_key must not be specified.
2630 {
2631 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2632 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
2633 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
2634 # taken as the key value.
2635 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2636 # values are:
2637 #
2638 # - ALL: A single rate limit threshold is applied to all
2639 # the requests matching this rule. This is the default value if
2640 # &quot;enforceOnKeyConfigs&quot; is not configured.
2641 # - IP: The source IP address of
2642 # the request is the key. Each IP has this limit enforced
2643 # separately.
2644 # - HTTP_HEADER: The value of the HTTP
2645 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2646 # value is truncated to the first 128 bytes of the header value. If no
2647 # such header is present in the request, the key type defaults toALL.
2648 # - XFF_IP: The first IP address (i.e. the
2649 # originating client IP address) specified in the list of IPs under
2650 # X-Forwarded-For HTTP header. If no such header is present or the
2651 # value is not a valid IP, the key defaults to the source IP address of
2652 # the request i.e. key type IP.
2653 # - HTTP_COOKIE: The value of the HTTP
2654 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2655 # value is truncated to the first 128 bytes of the cookie value. If no
2656 # such cookie is present in the request, the key type defaults toALL.
2657 # - HTTP_PATH: The URL path of the HTTP request. The key
2658 # value is truncated to the first 128 bytes.
2659 # - SNI: Server name indication in the TLS session of
2660 # the HTTPS request. The key value is truncated to the first 128 bytes.
2661 # The key type defaults to ALL on a HTTP session.
2662 # - REGION_CODE: The country/region from which the
2663 # request originates.
2664 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2665 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2666 # key type defaults to ALL.
2667 # - USER_IP: The IP address of the originating client,
2668 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2669 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
2670 # or an IP address cannot be resolved from it, the key type defaults toIP.
2671 #
2672 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2673 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2674 # key type defaults to ALL.
2675 },
2676 ],
2677 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2678 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
2679 # value.
2680 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
2681 # value.
2682 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
2683 # threshold, to either deny with a specified HTTP response code, or
2684 # redirect to a different endpoint.
2685 # Valid options are `deny(STATUS)`, where valid values for
2686 # `STATUS` are 403, 404, 429, and 502, and
2687 # `redirect`, where the redirect parameters come from
2688 # `exceedRedirectOptions` below.
2689 # The `redirect` action is only supported in Global Security Policies of
2690 # type CLOUD_ARMOR.
2691 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
2692 # action. Cannot be specified if the exceed action is not redirect.
2693 # This field is only supported in Global Security Policies of type
2694 # CLOUD_ARMOR.
2695 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2696 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2697 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2698 #
2699 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2700 # challenge assessment.
2701 # - EXTERNAL_302: redirect to a different URL via a 302
2702 # response.
2703 },
2704 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
2705 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2706 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2707 },
2708 },
2709 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
2710 # other actions.
2711 # This field is only supported in Global Security Policies of type
2712 # CLOUD_ARMOR.
2713 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2714 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2715 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2716 #
2717 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2718 # challenge assessment.
2719 # - EXTERNAL_302: redirect to a different URL via a 302
2720 # response.
2721 },
2722 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
2723 # policy. This can only be set during rule creation, if rule number is not
2724 # specified it will be generated by the server.
2725 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
2726 # policy rule.
2727 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
2728 # allows you to control which network&#x27;s VMs get this rule. If this field
2729 # is left blank, all VMs within the organization will receive the rule.
2730 #
2731 # This field may only be specified when versioned_expr is set to FIREWALL.
2732 &quot;A String&quot;,
2733 ],
2734 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
2735 # applied with this rule.
2736 &quot;A String&quot;,
2737 ],
2738 },
2739 ],
2740 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
2741 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
2742 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
2743 # unique in the organization in which the security policy is created. This
2744 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
2745 # The name must be 1-63 characters long, and comply with
2746 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
2747 # characters long and match the regular expression
2748 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
2749 # lowercase letter, and all following characters must be a dash, lowercase
2750 # letter, or digit, except the last character, which cannot be a dash.
2751 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
2752 #
2753 # - CLOUD_ARMOR: Cloud Armor backend security policies can
2754 # be configured to filter incoming HTTP requests targeting backend services.
2755 # They filter requests before they hit the origin servers.
2756 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
2757 # be configured to filter incoming HTTP requests targeting backend services
2758 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
2759 # They filter requests before the request is served from Google&#x27;s cache.
2760 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
2761 # internal service policies can be configured to filter HTTP requests
2762 # targeting services managed by Traffic Director in a service mesh. They
2763 # filter requests before the request is served from the application.
2764 #
2765 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
2766 # can be configured to filter packets targeting network load balancing
2767 # resources such as backend services, target pools, target instances, and
2768 # instances with external IPs. They filter requests before the request is
2769 # served from the application.
2770 #
2771 #
2772 # This field can be set only at resource creation time.
2773 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
2774 # user-defined field consists of up to 4 bytes extracted from a fixed offset
2775 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
2776 # optional mask to select certain bits. Rules may then specify matching
2777 # values for these fields.
2778 #
2779 # Example:
2780 #
2781 # userDefinedFields:
2782 # - name: &quot;ipv4_fragment_offset&quot;
2783 # base: IPV4
2784 # offset: 6
2785 # size: 2
2786 # mask: &quot;0x1fff&quot;
2787 {
2788 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
2789 #
2790 # - IPV4: Points to the beginning of the IPv4 header.
2791 # - IPV6: Points to the beginning of the IPv6 header.
2792 # - TCP: Points to the beginning of the TCP header, skipping
2793 # over any IPv4 options or IPv6 extension headers. Not present for
2794 # non-first fragments.
2795 # - UDP: Points to the beginning of the UDP header, skipping
2796 # over any IPv4 options or IPv6 extension headers. Not present for
2797 # non-first fragments.
2798 #
2799 #
2800 # required
2801 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
2802 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
2803 # The last byte of the field (in network byte order) corresponds to the
2804 # least significant byte of the mask.
2805 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
2806 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
2807 # &#x27;base&#x27;.
2808 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
2809 },
2810 ],
2811 }</pre>
2812 </div>
2813
2814 <div class="method">
2815 <code class="details" id="getRule">getRule(project, securityPolicy, priority=None, x__xgafv=None)</code>
2816 <pre>Gets a rule at the specified priority.
2817
2818 Args:
2819 project: string, Project ID for this request. (required)
2820 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
2821 priority: integer, The priority of the rule to get from the security policy.
2822 x__xgafv: string, V1 error format.
2823 Allowed values
2824 1 - v1 error format
2825 2 - v2 error format
2826
2827 Returns:
2828 An object of the form:
2829
2830 { # Represents a rule that describes one or more match conditions along with
2831 # the action to be taken when traffic matches this condition (allow or deny).
2832 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2833 # The following are the valid actions:
2834 #
2835 # - allow: allow access to target.
2836 # - deny(STATUS): deny access to target, returns the
2837 # HTTP response code specified. Valid values for `STATUS`
2838 # are 403, 404, and 502.
2839 # - rate_based_ban: limit client traffic to the configured
2840 # threshold and ban the client if the traffic exceeds the threshold.
2841 # Configure parameters for this action in RateLimitOptions. Requires
2842 # rate_limit_options to be set.
2843 # - redirect: redirect to a different target. This can
2844 # either be an internal reCAPTCHA redirect, or an external URL-based
2845 # redirect via a 302 response. Parameters for this action can be configured
2846 # via redirectOptions. This action is only supported in Global Security
2847 # Policies of type CLOUD_ARMOR.
2848 # - throttle: limit
2849 # client traffic to the configured threshold. Configure parameters for this
2850 # action in rateLimitOptions. Requires rate_limit_options to be set for
2851 # this.
2852 # - fairshare (preview only): when traffic reaches the
2853 # threshold limit, requests from the clients matching this rule begin to be
2854 # rate-limited using the Fair Share algorithm. This action is only allowed
2855 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2856 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2857 # create the resource.
2858 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
2859 # specified when versioned_expr is set to FIREWALL.
2860 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
2861 # enabled, logs will be exported to the configured export destination in
2862 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
2863 # cannot enable logging on &quot;goto_next&quot; rules.
2864 #
2865 # This field may only be specified when the versioned_expr is set to
2866 # FIREWALL.
2867 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2868 # This field is only supported in Global Security Policies of type
2869 # CLOUD_ARMOR.
2870 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2871 # present.
2872 {
2873 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2874 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2875 },
2876 ],
2877 },
2878 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2879 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2880 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2881 # Exactly one field must be specified.
2882 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2883 # This field must be specified if versioned_expr is specified and cannot
2884 # be specified if versioned_expr is not specified.
2885 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2886 #
2887 # This field may only be specified when versioned_expr is set to
2888 # FIREWALL.
2889 &quot;A String&quot;,
2890 ],
2891 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2892 #
2893 # This field may only be specified when versioned_expr is set to
2894 # FIREWALL.
2895 {
2896 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2897 # required when creating a firewall rule. This value can either be
2898 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2899 # protocol number.
2900 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2901 # only applicable for UDP or TCP protocol. Each entry must be either
2902 # an integer or a range. If not specified, this rule applies to
2903 # connections through any port.
2904 #
2905 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2906 #
2907 # This field may only be specified when versioned_expr is set to
2908 # FIREWALL.
2909 &quot;A String&quot;,
2910 ],
2911 },
2912 ],
2913 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2914 # Maximum number of src_ip_ranges allowed is 10.
2915 &quot;A String&quot;,
2916 ],
2917 },
2918 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
2919 # A CEVAL expression is used to specify match criteria such as origin.ip,
2920 # source.region_code and contents in the request header.
2921 # Expressions containing `evaluateThreatIntelligence` require a Cloud
2922 # Armor Enterprise subscription and are not supported in Edge Policies
2923 # nor in Regional Policies. Expressions containing
2924 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
2925 # Enterprise subscription and are only supported in Global Security
2926 # Policies.
2927 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2928 # are documented at https://github.com/google/cel-spec.
2929 #
2930 # Example (Comparison):
2931 #
2932 # title: &quot;Summary size limit&quot;
2933 # description: &quot;Determines if a summary is less than 100 chars&quot;
2934 # expression: &quot;document.summary.size() &lt; 100&quot;
2935 #
2936 # Example (Equality):
2937 #
2938 # title: &quot;Requestor is owner&quot;
2939 # description: &quot;Determines if requestor is the document owner&quot;
2940 # expression: &quot;document.owner == request.auth.claims.email&quot;
2941 #
2942 # Example (Logic):
2943 #
2944 # title: &quot;Public documents&quot;
2945 # description: &quot;Determine whether the document should be publicly visible&quot;
2946 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2947 #
2948 # Example (Data Manipulation):
2949 #
2950 # title: &quot;Notification string&quot;
2951 # description: &quot;Create a notification string with a timestamp.&quot;
2952 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2953 #
2954 # The exact variables and functions that may be referenced within an expression
2955 # are determined by the service that evaluates it. See the service
2956 # documentation for additional information.
2957 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2958 # describes the expression, e.g. when hovered over it in a UI.
2959 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2960 # syntax.
2961 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2962 # reporting, e.g. a file name and a position in the file.
2963 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2964 # its purpose. This can be used e.g. in UIs which allow to enter the
2965 # expression.
2966 },
2967 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2968 # CEVAL expression (i.e., &#x27;expr&#x27;).
2969 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2970 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2971 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2972 # action-tokens. The provided site keys need to be created from
2973 # reCAPTCHA API under the same project where the security policy is
2974 # created.
2975 &quot;A String&quot;,
2976 ],
2977 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2978 # session-tokens. The provided site keys need to be created from
2979 # reCAPTCHA API under the same project where the security policy is
2980 # created.
2981 &quot;A String&quot;,
2982 ],
2983 },
2984 },
2985 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2986 # If this field is specified, config must also be specified.
2987 # Available preconfigured expressions along with their requirements are:
2988 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2989 # config.
2990 },
2991 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2992 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2993 # &#x27;action&#x27; is enforced.
2994 #
2995 # The match criteria for a rule consists of built-in match fields (like
2996 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2997 # (&#x27;userDefinedFields&#x27;).
2998 #
2999 # Field values may be extracted directly from the packet or derived from it
3000 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
3001 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
3002 # header is found in the packet and the entire field is in bounds.
3003 #
3004 # Each match field may specify which values can match it, listing one or
3005 # more ranges, prefixes, or exact values that are considered a match for
3006 # the field. A field value must be present in order to match a specified
3007 # match field. If no match values are specified for a match field, then any
3008 # field value is considered to match it, and it&#x27;s not required to be
3009 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
3010 #
3011 # For a packet to match a rule, all specified match fields must match the
3012 # corresponding field values derived from the packet.
3013 #
3014 # Example:
3015 #
3016 # networkMatch:
3017 # srcIpRanges:
3018 # - &quot;192.0.2.0/24&quot;
3019 # - &quot;198.51.100.0/24&quot;
3020 # userDefinedFields:
3021 # - name: &quot;ipv4_fragment_offset&quot;
3022 # values:
3023 # - &quot;1-0x1fff&quot;
3024 #
3025 # The above match condition matches packets with a source IP in
3026 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
3027 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
3028 # against.
3029 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
3030 # format.
3031 &quot;A String&quot;,
3032 ],
3033 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3034 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3035 &quot;A String&quot;,
3036 ],
3037 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
3038 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
3039 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
3040 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
3041 &quot;A String&quot;,
3042 ],
3043 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
3044 42,
3045 ],
3046 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
3047 &quot;A String&quot;,
3048 ],
3049 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3050 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3051 &quot;A String&quot;,
3052 ],
3053 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
3054 # IP address.
3055 &quot;A String&quot;,
3056 ],
3057 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
3058 # matching values for that field.
3059 {
3060 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
3061 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
3062 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
3063 # range (e.g. &quot;0x400-0x7ff&quot;).
3064 &quot;A String&quot;,
3065 ],
3066 },
3067 ],
3068 },
3069 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
3070 # does not evaluate preconfigured WAF rules, i.e., if
3071 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
3072 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
3073 {
3074 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
3075 # preconfigured WAF evaluation.
3076 {
3077 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3078 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3079 },
3080 ],
3081 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
3082 # inspection during preconfigured WAF evaluation.
3083 {
3084 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3085 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3086 },
3087 ],
3088 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
3089 # inspection during preconfigured WAF evaluation.
3090 {
3091 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3092 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3093 },
3094 ],
3095 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
3096 # from inspection during preconfigured WAF evaluation. Note that the
3097 # parameter can be in the query string or in the POST body.
3098 {
3099 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3100 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3101 },
3102 ],
3103 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
3104 # inspection during preconfigured WAF evaluation. When specifying this
3105 # field, the query or fragment part should be excluded.
3106 {
3107 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3108 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3109 },
3110 ],
3111 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
3112 # preconfigured WAF exclusion. If omitted, it refers to all the rule
3113 # IDs under the WAF rule set.
3114 &quot;A String&quot;,
3115 ],
3116 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
3117 },
3118 ],
3119 },
3120 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
3121 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
3122 # must be a positive value between 0 and 2147483647.
3123 # Rules are evaluated from highest to lowest priority where 0 is the
3124 # highest priority and 2147483647 is the lowest priority.
3125 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
3126 # &quot;fairshare&quot;. Cannot be specified for any other actions.
3127 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
3128 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
3129 # the traffic will continue to be banned by the rate limit after the
3130 # rate falls below the threshold.
3131 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
3132 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
3133 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
3134 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
3135 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3136 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3137 },
3138 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
3139 # threshold. Valid option is &quot;allow&quot; only.
3140 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3141 # values are:
3142 #
3143 # - ALL: A single rate limit threshold is applied to all
3144 # the requests matching this rule. This is the default value if
3145 # &quot;enforceOnKey&quot; is not configured.
3146 # - IP: The source IP address of
3147 # the request is the key. Each IP has this limit enforced
3148 # separately.
3149 # - HTTP_HEADER: The value of the HTTP
3150 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3151 # value is truncated to the first 128 bytes of the header value. If no
3152 # such header is present in the request, the key type defaults toALL.
3153 # - XFF_IP: The first IP address (i.e. the
3154 # originating client IP address) specified in the list of IPs under
3155 # X-Forwarded-For HTTP header. If no such header is present or the value
3156 # is not a valid IP, the key defaults to the source IP address of
3157 # the request i.e. key type IP.
3158 # - HTTP_COOKIE: The value of the HTTP
3159 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3160 # value is truncated to the first 128 bytes of the cookie value. If no
3161 # such cookie is present in the request, the key type defaults toALL.
3162 # - HTTP_PATH: The URL path of the HTTP request. The key
3163 # value is truncated to the first 128 bytes.
3164 # - SNI: Server name indication in the TLS session of the
3165 # HTTPS request. The key value is truncated to the first 128 bytes. The
3166 # key type defaults to ALL on a HTTP session.
3167 # - REGION_CODE: The country/region from which the request
3168 # originates.
3169 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3170 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3171 # key type defaults to ALL.
3172 # - USER_IP: The IP address of the originating client,
3173 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3174 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
3175 # an IP address cannot be resolved from it, the key type defaults toIP.
3176 #
3177 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3178 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3179 # key type defaults to ALL.
3180 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
3181 # limit threshold is enforced for all the requests matching the rule.
3182 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
3183 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
3184 # ratelimit threshold/action is enforced. You can specify up to 3
3185 # enforce_on_key_configs. If enforce_on_key_configs is specified,
3186 # enforce_on_key must not be specified.
3187 {
3188 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3189 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
3190 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
3191 # taken as the key value.
3192 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3193 # values are:
3194 #
3195 # - ALL: A single rate limit threshold is applied to all
3196 # the requests matching this rule. This is the default value if
3197 # &quot;enforceOnKeyConfigs&quot; is not configured.
3198 # - IP: The source IP address of
3199 # the request is the key. Each IP has this limit enforced
3200 # separately.
3201 # - HTTP_HEADER: The value of the HTTP
3202 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3203 # value is truncated to the first 128 bytes of the header value. If no
3204 # such header is present in the request, the key type defaults toALL.
3205 # - XFF_IP: The first IP address (i.e. the
3206 # originating client IP address) specified in the list of IPs under
3207 # X-Forwarded-For HTTP header. If no such header is present or the
3208 # value is not a valid IP, the key defaults to the source IP address of
3209 # the request i.e. key type IP.
3210 # - HTTP_COOKIE: The value of the HTTP
3211 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3212 # value is truncated to the first 128 bytes of the cookie value. If no
3213 # such cookie is present in the request, the key type defaults toALL.
3214 # - HTTP_PATH: The URL path of the HTTP request. The key
3215 # value is truncated to the first 128 bytes.
3216 # - SNI: Server name indication in the TLS session of
3217 # the HTTPS request. The key value is truncated to the first 128 bytes.
3218 # The key type defaults to ALL on a HTTP session.
3219 # - REGION_CODE: The country/region from which the
3220 # request originates.
3221 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3222 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3223 # key type defaults to ALL.
3224 # - USER_IP: The IP address of the originating client,
3225 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3226 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
3227 # or an IP address cannot be resolved from it, the key type defaults toIP.
3228 #
3229 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3230 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3231 # key type defaults to ALL.
3232 },
3233 ],
3234 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3235 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
3236 # value.
3237 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
3238 # value.
3239 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
3240 # threshold, to either deny with a specified HTTP response code, or
3241 # redirect to a different endpoint.
3242 # Valid options are `deny(STATUS)`, where valid values for
3243 # `STATUS` are 403, 404, 429, and 502, and
3244 # `redirect`, where the redirect parameters come from
3245 # `exceedRedirectOptions` below.
3246 # The `redirect` action is only supported in Global Security Policies of
3247 # type CLOUD_ARMOR.
3248 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
3249 # action. Cannot be specified if the exceed action is not redirect.
3250 # This field is only supported in Global Security Policies of type
3251 # CLOUD_ARMOR.
3252 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3253 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3254 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3255 #
3256 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3257 # challenge assessment.
3258 # - EXTERNAL_302: redirect to a different URL via a 302
3259 # response.
3260 },
3261 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
3262 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3263 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3264 },
3265 },
3266 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
3267 # other actions.
3268 # This field is only supported in Global Security Policies of type
3269 # CLOUD_ARMOR.
3270 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3271 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3272 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3273 #
3274 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3275 # challenge assessment.
3276 # - EXTERNAL_302: redirect to a different URL via a 302
3277 # response.
3278 },
3279 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
3280 # policy. This can only be set during rule creation, if rule number is not
3281 # specified it will be generated by the server.
3282 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
3283 # policy rule.
3284 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
3285 # allows you to control which network&#x27;s VMs get this rule. If this field
3286 # is left blank, all VMs within the organization will receive the rule.
3287 #
3288 # This field may only be specified when versioned_expr is set to FIREWALL.
3289 &quot;A String&quot;,
3290 ],
3291 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
3292 # applied with this rule.
3293 &quot;A String&quot;,
3294 ],
3295 }</pre>
3296 </div>
3297
3298 <div class="method">
3299 <code class="details" id="insert">insert(project, body=None, requestId=None, validateOnly=None, x__xgafv=None)</code>
3300 <pre>Creates a new policy in the specified project using the data included in
3301 the request.
3302
3303 Args:
3304 project: string, Project ID for this request. (required)
3305 body: object, The request body.
3306 The object takes the form of:
3307
3308 { # Represents a Google Cloud Armor security policy resource.
3309 #
3310 # Only external backend services that use load balancers can
3311 # reference a security policy. For more information, see
3312 # Google Cloud Armor security policy overview.
3313 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
3314 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
3315 &quot;confidenceThreshold&quot;: 3.14,
3316 &quot;expirationSec&quot;: 42,
3317 &quot;impactedBaselineThreshold&quot;: 3.14,
3318 &quot;loadThreshold&quot;: 3.14,
3319 },
3320 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
3321 # This field is only supported in Global Security Policies of type
3322 # CLOUD_ARMOR.
3323 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
3324 # This field is only supported in Global Security Policies of type
3325 # CLOUD_ARMOR.
3326 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
3327 # STANDARD - opaque rules. (default)
3328 # PREMIUM - transparent rules.
3329 # This field is only supported in Global Security Policies of type
3330 # CLOUD_ARMOR.
3331 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
3332 # customizable thresholds.
3333 {
3334 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
3335 &quot;autoDeployExpirationSec&quot;: 42,
3336 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
3337 &quot;autoDeployLoadThreshold&quot;: 3.14,
3338 &quot;detectionAbsoluteQps&quot;: 3.14,
3339 &quot;detectionLoadThreshold&quot;: 3.14,
3340 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
3341 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
3342 # The name must be unique within the security policy.
3343 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
3344 # on specified granular traffic units.
3345 { # Configurations to specifc granular traffic units processed by
3346 # Adaptive Protection.
3347 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
3348 # type constitutes a separate traffic unit.
3349 # It can only be set to true if `value` is empty.
3350 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
3351 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
3352 },
3353 ],
3354 },
3355 ],
3356 },
3357 },
3358 &quot;advancedOptionsConfig&quot;: {
3359 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
3360 # json_parsing is set to STANDARD.
3361 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
3362 #
3363 # As per RFC 1341, a Content-Type header value has the following format:
3364 #
3365 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
3366 #
3367 # When configuring a custom Content-Type header value, only the
3368 # type/subtype needs to be specified, and the parameters should be
3369 # excluded.
3370 &quot;A String&quot;,
3371 ],
3372 },
3373 &quot;jsonParsing&quot;: &quot;A String&quot;,
3374 &quot;logLevel&quot;: &quot;A String&quot;,
3375 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
3376 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
3377 # Values are case insensitive.
3378 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
3379 # resolving the callers client IP address.
3380 &quot;A String&quot;,
3381 ],
3382 },
3383 &quot;associations&quot;: [ # A list of associations that belong to this policy.
3384 {
3385 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
3386 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
3387 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
3388 &quot;A String&quot;,
3389 ],
3390 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
3391 &quot;A String&quot;,
3392 ],
3393 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
3394 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
3395 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
3396 },
3397 ],
3398 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
3399 # text format.
3400 &quot;ddosProtectionConfig&quot;: {
3401 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
3402 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
3403 # builds DDoS mitigations that minimize collateral damage. It quantifies
3404 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
3405 # blocked.
3406 #
3407 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
3408 # not be deployed. Using a lower value will prioritize keeping collateral
3409 # damage low, possibly at the cost of its effectiveness in rate limiting
3410 # some or all of the attack. It should typically be unset, so Advanced DDoS
3411 # (and Adaptive Protection) uses the best mitigation it can find. Setting
3412 # the threshold is advised if there are logs for false positive detections
3413 # with high collateral damage, and will cause Advanced DDoS to attempt to
3414 # find a less aggressive rule that satisfies the constraint. If a suitable
3415 # rule cannot be found, the system falls back to either no mitigation for
3416 # smaller attacks or broader network throttles for larger ones.
3417 &quot;ddosProtection&quot;: &quot;A String&quot;,
3418 },
3419 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3420 # create the resource.
3421 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
3422 # unique in the organization in which the security policy is created. This
3423 # should only be used when SecurityPolicyType is FIREWALL.
3424 # The name must be 1-63 characters long, and comply with
3425 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
3426 # characters long and match the regular expression
3427 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
3428 # lowercase letter, and all following characters must be a dash, lowercase
3429 # letter, or digit, except the last character, which cannot be a dash.
3430 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
3431 # the metadata&#x27;s contents and used for optimistic locking. The
3432 # fingerprint is initially generated by Compute Engine and changes after
3433 # every request to modify or update metadata. You must always provide an
3434 # up-to-date fingerprint hash in order to update or change metadata,
3435 # otherwise the request will fail with error412 conditionNotMet.
3436 #
3437 # To see the latest fingerprint, make get() request to the
3438 # security policy.
3439 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
3440 # defined by the server.
3441 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
3442 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
3443 # is essentially a hash of the labels set used for optimistic locking. The
3444 # fingerprint is initially generated by Compute Engine and changes after
3445 # every request to modify or update labels. You must always provide an
3446 # up-to-date fingerprint hash in order to update or change labels.
3447 #
3448 # To see the latest fingerprint, make get() request to the
3449 # security policy.
3450 &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.
3451 # Label values may be empty.
3452 &quot;a_key&quot;: &quot;A String&quot;,
3453 },
3454 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
3455 # The name must be 1-63 characters long, and comply withRFC1035.
3456 # Specifically, the name must be 1-63 characters long and match the regular
3457 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
3458 # character must be a lowercase letter, and all following characters must
3459 # be a dash, lowercase letter, or digit, except the last character, which
3460 # cannot be a dash.
3461 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
3462 &quot;recaptchaOptionsConfig&quot;: {
3463 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
3464 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
3465 # the security policy. The specified site key needs to be created from the
3466 # reCAPTCHA API. The user is responsible for the validity of the specified
3467 # site key. If not specified, a Google-managed site key is used.
3468 # This field is only supported in Global Security Policies of type
3469 # CLOUD_ARMOR.
3470 },
3471 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
3472 # resides. This field is not applicable to global security policies.
3473 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
3474 # policy can not exceed a set number of tuples.
3475 &quot;rules&quot;: [ # A list of rules that belong to this policy.
3476 # There must always be a default rule which is a rule with priority
3477 # 2147483647 and match all condition (for the match condition this means
3478 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
3479 # must be either match &quot;*&quot; or not set). If no rules are provided when
3480 # creating a security policy, a default rule with action &quot;allow&quot; will be
3481 # added.
3482 { # Represents a rule that describes one or more match conditions along with
3483 # the action to be taken when traffic matches this condition (allow or deny).
3484 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
3485 # The following are the valid actions:
3486 #
3487 # - allow: allow access to target.
3488 # - deny(STATUS): deny access to target, returns the
3489 # HTTP response code specified. Valid values for `STATUS`
3490 # are 403, 404, and 502.
3491 # - rate_based_ban: limit client traffic to the configured
3492 # threshold and ban the client if the traffic exceeds the threshold.
3493 # Configure parameters for this action in RateLimitOptions. Requires
3494 # rate_limit_options to be set.
3495 # - redirect: redirect to a different target. This can
3496 # either be an internal reCAPTCHA redirect, or an external URL-based
3497 # redirect via a 302 response. Parameters for this action can be configured
3498 # via redirectOptions. This action is only supported in Global Security
3499 # Policies of type CLOUD_ARMOR.
3500 # - throttle: limit
3501 # client traffic to the configured threshold. Configure parameters for this
3502 # action in rateLimitOptions. Requires rate_limit_options to be set for
3503 # this.
3504 # - fairshare (preview only): when traffic reaches the
3505 # threshold limit, requests from the clients matching this rule begin to be
3506 # rate-limited using the Fair Share algorithm. This action is only allowed
3507 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
3508 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3509 # create the resource.
3510 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
3511 # specified when versioned_expr is set to FIREWALL.
3512 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
3513 # enabled, logs will be exported to the configured export destination in
3514 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
3515 # cannot enable logging on &quot;goto_next&quot; rules.
3516 #
3517 # This field may only be specified when the versioned_expr is set to
3518 # FIREWALL.
3519 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
3520 # This field is only supported in Global Security Policies of type
3521 # CLOUD_ARMOR.
3522 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
3523 # present.
3524 {
3525 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
3526 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
3527 },
3528 ],
3529 },
3530 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
3531 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
3532 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
3533 # Exactly one field must be specified.
3534 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
3535 # This field must be specified if versioned_expr is specified and cannot
3536 # be specified if versioned_expr is not specified.
3537 &quot;destIpRanges&quot;: [ # CIDR IP address range.
3538 #
3539 # This field may only be specified when versioned_expr is set to
3540 # FIREWALL.
3541 &quot;A String&quot;,
3542 ],
3543 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
3544 #
3545 # This field may only be specified when versioned_expr is set to
3546 # FIREWALL.
3547 {
3548 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
3549 # required when creating a firewall rule. This value can either be
3550 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
3551 # protocol number.
3552 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
3553 # only applicable for UDP or TCP protocol. Each entry must be either
3554 # an integer or a range. If not specified, this rule applies to
3555 # connections through any port.
3556 #
3557 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
3558 #
3559 # This field may only be specified when versioned_expr is set to
3560 # FIREWALL.
3561 &quot;A String&quot;,
3562 ],
3563 },
3564 ],
3565 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
3566 # Maximum number of src_ip_ranges allowed is 10.
3567 &quot;A String&quot;,
3568 ],
3569 },
3570 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
3571 # A CEVAL expression is used to specify match criteria such as origin.ip,
3572 # source.region_code and contents in the request header.
3573 # Expressions containing `evaluateThreatIntelligence` require a Cloud
3574 # Armor Enterprise subscription and are not supported in Edge Policies
3575 # nor in Regional Policies. Expressions containing
3576 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
3577 # Enterprise subscription and are only supported in Global Security
3578 # Policies.
3579 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3580 # are documented at https://github.com/google/cel-spec.
3581 #
3582 # Example (Comparison):
3583 #
3584 # title: &quot;Summary size limit&quot;
3585 # description: &quot;Determines if a summary is less than 100 chars&quot;
3586 # expression: &quot;document.summary.size() &lt; 100&quot;
3587 #
3588 # Example (Equality):
3589 #
3590 # title: &quot;Requestor is owner&quot;
3591 # description: &quot;Determines if requestor is the document owner&quot;
3592 # expression: &quot;document.owner == request.auth.claims.email&quot;
3593 #
3594 # Example (Logic):
3595 #
3596 # title: &quot;Public documents&quot;
3597 # description: &quot;Determine whether the document should be publicly visible&quot;
3598 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3599 #
3600 # Example (Data Manipulation):
3601 #
3602 # title: &quot;Notification string&quot;
3603 # description: &quot;Create a notification string with a timestamp.&quot;
3604 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3605 #
3606 # The exact variables and functions that may be referenced within an expression
3607 # are determined by the service that evaluates it. See the service
3608 # documentation for additional information.
3609 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3610 # describes the expression, e.g. when hovered over it in a UI.
3611 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3612 # syntax.
3613 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3614 # reporting, e.g. a file name and a position in the file.
3615 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3616 # its purpose. This can be used e.g. in UIs which allow to enter the
3617 # expression.
3618 },
3619 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
3620 # CEVAL expression (i.e., &#x27;expr&#x27;).
3621 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
3622 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
3623 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3624 # action-tokens. The provided site keys need to be created from
3625 # reCAPTCHA API under the same project where the security policy is
3626 # created.
3627 &quot;A String&quot;,
3628 ],
3629 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3630 # session-tokens. The provided site keys need to be created from
3631 # reCAPTCHA API under the same project where the security policy is
3632 # created.
3633 &quot;A String&quot;,
3634 ],
3635 },
3636 },
3637 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
3638 # If this field is specified, config must also be specified.
3639 # Available preconfigured expressions along with their requirements are:
3640 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
3641 # config.
3642 },
3643 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
3644 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
3645 # &#x27;action&#x27; is enforced.
3646 #
3647 # The match criteria for a rule consists of built-in match fields (like
3648 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
3649 # (&#x27;userDefinedFields&#x27;).
3650 #
3651 # Field values may be extracted directly from the packet or derived from it
3652 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
3653 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
3654 # header is found in the packet and the entire field is in bounds.
3655 #
3656 # Each match field may specify which values can match it, listing one or
3657 # more ranges, prefixes, or exact values that are considered a match for
3658 # the field. A field value must be present in order to match a specified
3659 # match field. If no match values are specified for a match field, then any
3660 # field value is considered to match it, and it&#x27;s not required to be
3661 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
3662 #
3663 # For a packet to match a rule, all specified match fields must match the
3664 # corresponding field values derived from the packet.
3665 #
3666 # Example:
3667 #
3668 # networkMatch:
3669 # srcIpRanges:
3670 # - &quot;192.0.2.0/24&quot;
3671 # - &quot;198.51.100.0/24&quot;
3672 # userDefinedFields:
3673 # - name: &quot;ipv4_fragment_offset&quot;
3674 # values:
3675 # - &quot;1-0x1fff&quot;
3676 #
3677 # The above match condition matches packets with a source IP in
3678 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
3679 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
3680 # against.
3681 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
3682 # format.
3683 &quot;A String&quot;,
3684 ],
3685 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3686 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3687 &quot;A String&quot;,
3688 ],
3689 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
3690 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
3691 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
3692 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
3693 &quot;A String&quot;,
3694 ],
3695 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
3696 42,
3697 ],
3698 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
3699 &quot;A String&quot;,
3700 ],
3701 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3702 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3703 &quot;A String&quot;,
3704 ],
3705 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
3706 # IP address.
3707 &quot;A String&quot;,
3708 ],
3709 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
3710 # matching values for that field.
3711 {
3712 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
3713 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
3714 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
3715 # range (e.g. &quot;0x400-0x7ff&quot;).
3716 &quot;A String&quot;,
3717 ],
3718 },
3719 ],
3720 },
3721 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
3722 # does not evaluate preconfigured WAF rules, i.e., if
3723 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
3724 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
3725 {
3726 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
3727 # preconfigured WAF evaluation.
3728 {
3729 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3730 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3731 },
3732 ],
3733 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
3734 # inspection during preconfigured WAF evaluation.
3735 {
3736 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3737 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3738 },
3739 ],
3740 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
3741 # inspection during preconfigured WAF evaluation.
3742 {
3743 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3744 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3745 },
3746 ],
3747 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
3748 # from inspection during preconfigured WAF evaluation. Note that the
3749 # parameter can be in the query string or in the POST body.
3750 {
3751 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3752 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3753 },
3754 ],
3755 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
3756 # inspection during preconfigured WAF evaluation. When specifying this
3757 # field, the query or fragment part should be excluded.
3758 {
3759 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3760 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3761 },
3762 ],
3763 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
3764 # preconfigured WAF exclusion. If omitted, it refers to all the rule
3765 # IDs under the WAF rule set.
3766 &quot;A String&quot;,
3767 ],
3768 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
3769 },
3770 ],
3771 },
3772 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
3773 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
3774 # must be a positive value between 0 and 2147483647.
3775 # Rules are evaluated from highest to lowest priority where 0 is the
3776 # highest priority and 2147483647 is the lowest priority.
3777 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
3778 # &quot;fairshare&quot;. Cannot be specified for any other actions.
3779 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
3780 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
3781 # the traffic will continue to be banned by the rate limit after the
3782 # rate falls below the threshold.
3783 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
3784 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
3785 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
3786 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
3787 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3788 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3789 },
3790 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
3791 # threshold. Valid option is &quot;allow&quot; only.
3792 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3793 # values are:
3794 #
3795 # - ALL: A single rate limit threshold is applied to all
3796 # the requests matching this rule. This is the default value if
3797 # &quot;enforceOnKey&quot; is not configured.
3798 # - IP: The source IP address of
3799 # the request is the key. Each IP has this limit enforced
3800 # separately.
3801 # - HTTP_HEADER: The value of the HTTP
3802 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3803 # value is truncated to the first 128 bytes of the header value. If no
3804 # such header is present in the request, the key type defaults toALL.
3805 # - XFF_IP: The first IP address (i.e. the
3806 # originating client IP address) specified in the list of IPs under
3807 # X-Forwarded-For HTTP header. If no such header is present or the value
3808 # is not a valid IP, the key defaults to the source IP address of
3809 # the request i.e. key type IP.
3810 # - HTTP_COOKIE: The value of the HTTP
3811 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3812 # value is truncated to the first 128 bytes of the cookie value. If no
3813 # such cookie is present in the request, the key type defaults toALL.
3814 # - HTTP_PATH: The URL path of the HTTP request. The key
3815 # value is truncated to the first 128 bytes.
3816 # - SNI: Server name indication in the TLS session of the
3817 # HTTPS request. The key value is truncated to the first 128 bytes. The
3818 # key type defaults to ALL on a HTTP session.
3819 # - REGION_CODE: The country/region from which the request
3820 # originates.
3821 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3822 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3823 # key type defaults to ALL.
3824 # - USER_IP: The IP address of the originating client,
3825 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3826 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
3827 # an IP address cannot be resolved from it, the key type defaults toIP.
3828 #
3829 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3830 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3831 # key type defaults to ALL.
3832 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
3833 # limit threshold is enforced for all the requests matching the rule.
3834 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
3835 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
3836 # ratelimit threshold/action is enforced. You can specify up to 3
3837 # enforce_on_key_configs. If enforce_on_key_configs is specified,
3838 # enforce_on_key must not be specified.
3839 {
3840 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3841 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
3842 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
3843 # taken as the key value.
3844 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3845 # values are:
3846 #
3847 # - ALL: A single rate limit threshold is applied to all
3848 # the requests matching this rule. This is the default value if
3849 # &quot;enforceOnKeyConfigs&quot; is not configured.
3850 # - IP: The source IP address of
3851 # the request is the key. Each IP has this limit enforced
3852 # separately.
3853 # - HTTP_HEADER: The value of the HTTP
3854 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3855 # value is truncated to the first 128 bytes of the header value. If no
3856 # such header is present in the request, the key type defaults toALL.
3857 # - XFF_IP: The first IP address (i.e. the
3858 # originating client IP address) specified in the list of IPs under
3859 # X-Forwarded-For HTTP header. If no such header is present or the
3860 # value is not a valid IP, the key defaults to the source IP address of
3861 # the request i.e. key type IP.
3862 # - HTTP_COOKIE: The value of the HTTP
3863 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3864 # value is truncated to the first 128 bytes of the cookie value. If no
3865 # such cookie is present in the request, the key type defaults toALL.
3866 # - HTTP_PATH: The URL path of the HTTP request. The key
3867 # value is truncated to the first 128 bytes.
3868 # - SNI: Server name indication in the TLS session of
3869 # the HTTPS request. The key value is truncated to the first 128 bytes.
3870 # The key type defaults to ALL on a HTTP session.
3871 # - REGION_CODE: The country/region from which the
3872 # request originates.
3873 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3874 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3875 # key type defaults to ALL.
3876 # - USER_IP: The IP address of the originating client,
3877 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3878 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
3879 # or an IP address cannot be resolved from it, the key type defaults toIP.
3880 #
3881 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3882 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3883 # key type defaults to ALL.
3884 },
3885 ],
3886 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3887 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
3888 # value.
3889 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
3890 # value.
3891 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
3892 # threshold, to either deny with a specified HTTP response code, or
3893 # redirect to a different endpoint.
3894 # Valid options are `deny(STATUS)`, where valid values for
3895 # `STATUS` are 403, 404, 429, and 502, and
3896 # `redirect`, where the redirect parameters come from
3897 # `exceedRedirectOptions` below.
3898 # The `redirect` action is only supported in Global Security Policies of
3899 # type CLOUD_ARMOR.
3900 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
3901 # action. Cannot be specified if the exceed action is not redirect.
3902 # This field is only supported in Global Security Policies of type
3903 # CLOUD_ARMOR.
3904 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3905 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3906 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3907 #
3908 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3909 # challenge assessment.
3910 # - EXTERNAL_302: redirect to a different URL via a 302
3911 # response.
3912 },
3913 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
3914 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3915 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3916 },
3917 },
3918 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
3919 # other actions.
3920 # This field is only supported in Global Security Policies of type
3921 # CLOUD_ARMOR.
3922 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3923 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3924 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3925 #
3926 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3927 # challenge assessment.
3928 # - EXTERNAL_302: redirect to a different URL via a 302
3929 # response.
3930 },
3931 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
3932 # policy. This can only be set during rule creation, if rule number is not
3933 # specified it will be generated by the server.
3934 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
3935 # policy rule.
3936 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
3937 # allows you to control which network&#x27;s VMs get this rule. If this field
3938 # is left blank, all VMs within the organization will receive the rule.
3939 #
3940 # This field may only be specified when versioned_expr is set to FIREWALL.
3941 &quot;A String&quot;,
3942 ],
3943 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
3944 # applied with this rule.
3945 &quot;A String&quot;,
3946 ],
3947 },
3948 ],
3949 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
3950 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
3951 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
3952 # unique in the organization in which the security policy is created. This
3953 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
3954 # The name must be 1-63 characters long, and comply with
3955 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
3956 # characters long and match the regular expression
3957 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
3958 # lowercase letter, and all following characters must be a dash, lowercase
3959 # letter, or digit, except the last character, which cannot be a dash.
3960 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
3961 #
3962 # - CLOUD_ARMOR: Cloud Armor backend security policies can
3963 # be configured to filter incoming HTTP requests targeting backend services.
3964 # They filter requests before they hit the origin servers.
3965 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
3966 # be configured to filter incoming HTTP requests targeting backend services
3967 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
3968 # They filter requests before the request is served from Google&#x27;s cache.
3969 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
3970 # internal service policies can be configured to filter HTTP requests
3971 # targeting services managed by Traffic Director in a service mesh. They
3972 # filter requests before the request is served from the application.
3973 #
3974 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
3975 # can be configured to filter packets targeting network load balancing
3976 # resources such as backend services, target pools, target instances, and
3977 # instances with external IPs. They filter requests before the request is
3978 # served from the application.
3979 #
3980 #
3981 # This field can be set only at resource creation time.
3982 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
3983 # user-defined field consists of up to 4 bytes extracted from a fixed offset
3984 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
3985 # optional mask to select certain bits. Rules may then specify matching
3986 # values for these fields.
3987 #
3988 # Example:
3989 #
3990 # userDefinedFields:
3991 # - name: &quot;ipv4_fragment_offset&quot;
3992 # base: IPV4
3993 # offset: 6
3994 # size: 2
3995 # mask: &quot;0x1fff&quot;
3996 {
3997 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
3998 #
3999 # - IPV4: Points to the beginning of the IPv4 header.
4000 # - IPV6: Points to the beginning of the IPv6 header.
4001 # - TCP: Points to the beginning of the TCP header, skipping
4002 # over any IPv4 options or IPv6 extension headers. Not present for
4003 # non-first fragments.
4004 # - UDP: Points to the beginning of the UDP header, skipping
4005 # over any IPv4 options or IPv6 extension headers. Not present for
4006 # non-first fragments.
4007 #
4008 #
4009 # required
4010 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
4011 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
4012 # The last byte of the field (in network byte order) corresponds to the
4013 # least significant byte of the mask.
4014 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
4015 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
4016 # &#x27;base&#x27;.
4017 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
4018 },
4019 ],
4020 }
4021
4022 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
4023 that if you must retry your request, the server will know to ignore the
4024 request if it has already been completed.
4025
4026 For example, consider a situation where you make an initial request and
4027 the request times out. If you make the request again with the same
4028 request ID, the server can check if original operation with the same
4029 request ID was received, and if so, will ignore the second request. This
4030 prevents clients from accidentally creating duplicate commitments.
4031
4032 The request ID must be
4033 a valid UUID with the exception that zero UUID is not supported
4034 (00000000-0000-0000-0000-000000000000).
4035 validateOnly: boolean, If true, the request will not be committed.
4036 x__xgafv: string, V1 error format.
4037 Allowed values
4038 1 - v1 error format
4039 2 - v2 error format
4040
4041 Returns:
4042 An object of the form:
4043
4044 { # Represents an Operation resource.
4045 #
4046 # Google Compute Engine has three Operation resources:
4047 #
4048 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
4049 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
4050 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
4051 #
4052 # You can use an operation resource to manage asynchronous API requests.
4053 # For more information, readHandling
4054 # API responses.
4055 #
4056 # Operations can be global, regional or zonal.
4057 #
4058 # - For global operations, use the `globalOperations`
4059 # resource.
4060 # - For regional operations, use the
4061 # `regionOperations` resource.
4062 # - For zonal operations, use
4063 # the `zoneOperations` resource.
4064 #
4065 #
4066 #
4067 # For more information, read
4068 # Global, Regional, and Zonal Resources.
4069 #
4070 # Note that completed Operation resources have a limited
4071 # retention period.
4072 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
4073 # Not present otherwise.
4074 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4075 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
4076 # set when the operation is created.
4077 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
4078 # text format.
4079 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
4080 # this field will be populated.
4081 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
4082 # operation.
4083 {
4084 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4085 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
4086 # details. There is a set of defined message types to use for providing
4087 # details.The syntax depends on the error code. For example,
4088 # QuotaExceededInfo will have details when the error code is
4089 # QUOTA_EXCEEDED.
4090 {
4091 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
4092 #
4093 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
4094 # is not enabled:
4095 #
4096 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
4097 # &quot;domain&quot;: &quot;googleapis.com&quot;
4098 # &quot;metadata&quot;: {
4099 # &quot;resource&quot;: &quot;projects/123&quot;,
4100 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
4101 # }
4102 # }
4103 #
4104 # This response indicates that the pubsub.googleapis.com API is not enabled.
4105 #
4106 # Example of an error that is returned when attempting to create a Spanner
4107 # instance in a region that is out of stock:
4108 #
4109 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
4110 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
4111 # &quot;metadata&quot;: {
4112 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
4113 # }
4114 # }
4115 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
4116 # is typically the registered service name of the tool or product that
4117 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
4118 # generated by some common infrastructure, the error domain must be a
4119 # globally unique value that identifies the infrastructure. For Google API
4120 # infrastructure, the error domain is &quot;googleapis.com&quot;.
4121 &quot;metadatas&quot;: { # Additional structured details about this error.
4122 #
4123 # Keys must match a regular expression of `a-z+` but should
4124 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
4125 # length. When identifying the current value of an exceeded limit, the units
4126 # should be contained in the key, not the value. For example, rather than
4127 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
4128 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
4129 # instances that can be created in a single (batch) request.
4130 &quot;a_key&quot;: &quot;A String&quot;,
4131 },
4132 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
4133 # proximate cause of the error. Error reasons are unique within a particular
4134 # domain of errors. This should be at most 63 characters and match a
4135 # regular expression of `A-Z+[A-Z0-9]`, which represents
4136 # UPPER_SNAKE_CASE.
4137 },
4138 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
4139 #
4140 # For example, if a quota check failed with an error indicating the calling
4141 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
4142 # directly to the right place in the developer console to flip the bit.
4143 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
4144 { # Describes a URL link.
4145 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
4146 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
4147 },
4148 ],
4149 },
4150 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
4151 # which can be attached to an RPC error.
4152 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
4153 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
4154 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
4155 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
4156 },
4157 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
4158 &quot;dimensions&quot;: { # The map holding related quota dimensions.
4159 &quot;a_key&quot;: &quot;A String&quot;,
4160 },
4161 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
4162 # type or metric.
4163 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
4164 # or metric.
4165 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
4166 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
4167 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
4168 },
4169 },
4170 ],
4171 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
4172 # This property is optional.
4173 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4174 },
4175 ],
4176 },
4177 &quot;getVersionOperationMetadata&quot;: {
4178 &quot;inlineSbomInfo&quot;: {
4179 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
4180 # appropriate identifiers.
4181 &quot;a_key&quot;: &quot;A String&quot;,
4182 },
4183 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
4184 # identifiers.
4185 &quot;a_key&quot;: &quot;A String&quot;,
4186 },
4187 },
4188 },
4189 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
4190 # message that was returned, such as `NOT FOUND`.
4191 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
4192 # status code that was returned. For example, a `404` means the
4193 # resource was not found.
4194 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
4195 # defined by the server.
4196 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
4197 # This value is inRFC3339
4198 # text format.
4199 &quot;instancesBulkInsertOperationMetadata&quot;: {
4200 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
4201 # Example key: zones/us-central1-a
4202 &quot;a_key&quot;: {
4203 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
4204 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
4205 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
4206 # error.
4207 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
4208 # if the flow is rolling forward or rolling back.
4209 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
4210 },
4211 },
4212 },
4213 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
4214 # Operation resources.
4215 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4216 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
4217 # group of operations results from a `bulkInsert` API request.
4218 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
4219 # `update`, or `delete`, and so on.
4220 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
4221 # There is no requirement that this be linear or support any granularity of
4222 # operations. This should not be used to guess when the operation will be
4223 # complete. This number should monotonically increase as the operation
4224 # progresses.
4225 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
4226 # applicable when performing regional operations.
4227 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4228 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
4229 # this field will contain information on all underlying zonal actions and
4230 # their state.
4231 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
4232 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
4233 # Example key: zones/us-central1-a
4234 &quot;a_key&quot;: {
4235 &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
4236 # populated.
4237 # different programming environments, including REST APIs and RPC APIs. It is
4238 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
4239 # three pieces of data: error code, error message, and error details.
4240 #
4241 # You can find out more about this error model and how to work with it in the
4242 # [API Design Guide](https://cloud.google.com/apis/design/errors).
4243 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
4244 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
4245 # message types for APIs to use.
4246 {
4247 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
4248 },
4249 ],
4250 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
4251 # user-facing error message should be localized and sent in the
4252 # google.rpc.Status.details field, or localized by the client.
4253 },
4254 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
4255 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
4256 },
4257 },
4258 },
4259 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
4260 # This value is inRFC3339
4261 # text format.
4262 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
4263 # following:
4264 # `PENDING`, `RUNNING`, or `DONE`.
4265 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
4266 # operation.
4267 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
4268 # of the target resource.
4269 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
4270 # operations related to creating a snapshot, this points to the disk
4271 # that the snapshot was created from.
4272 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
4273 # `[email protected]` or
4274 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
4275 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
4276 # operation, this field will be populated.
4277 {
4278 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
4279 # Engine returns NO_RESULTS_ON_PAGE if there
4280 # are no results in the response.
4281 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
4282 # value format. For example:
4283 #
4284 # &quot;data&quot;: [
4285 # {
4286 # &quot;key&quot;: &quot;scope&quot;,
4287 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
4288 # }
4289 {
4290 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
4291 # returned. For example, for warnings where there are no results in a list
4292 # request for a particular zone, this key might be scope and
4293 # the key value might be the zone name. Other examples might be a key
4294 # indicating a deprecated resource and a suggested replacement, or a
4295 # warning about invalid network settings (for example, if an instance
4296 # attempts to perform IP forwarding but is not enabled for IP forwarding).
4297 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4298 },
4299 ],
4300 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4301 },
4302 ],
4303 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
4304 # applicable when performing per-zone operations.
4305 }</pre>
4306 </div>
4307
4308 <div class="method">
4309 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code>
4310 <pre>List all the policies that have been configured for the specified project.
4311
4312 Args:
4313 project: string, Project ID for this request. (required)
4314 filter: string, A filter expression that filters resources listed in the response. Most
4315 Compute resources support two types of filter expressions:
4316 expressions that support regular expressions and expressions that follow
4317 API improvement proposal AIP-160.
4318 These two types of filter expressions cannot be mixed in one request.
4319
4320 If you want to use AIP-160, your expression must specify the field name, an
4321 operator, and the value that you want to use for filtering. The value
4322 must be a string, a number, or a boolean. The operator
4323 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
4324
4325 For example, if you are filtering Compute Engine instances, you can
4326 exclude instances named `example-instance` by specifying
4327 `name != example-instance`.
4328
4329 The `:*` comparison can be used to test whether a key has been defined.
4330 For example, to find all objects with `owner` label use:
4331 ```
4332 labels.owner:*
4333 ```
4334
4335 You can also filter nested fields. For example, you could specify
4336 `scheduling.automaticRestart = false` to include instances only
4337 if they are not scheduled for automatic restarts. You can use filtering
4338 on nested fields to filter based onresource labels.
4339
4340 To filter on multiple expressions, provide each separate expression within
4341 parentheses. For example:
4342 ```
4343 (scheduling.automaticRestart = true)
4344 (cpuPlatform = &quot;Intel Skylake&quot;)
4345 ```
4346 By default, each expression is an `AND` expression. However, you
4347 can include `AND` and `OR` expressions explicitly.
4348 For example:
4349 ```
4350 (cpuPlatform = &quot;Intel Skylake&quot;) OR
4351 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
4352 (scheduling.automaticRestart = true)
4353 ```
4354
4355 If you want to use a regular expression, use the `eq` (equal) or `ne`
4356 (not equal) operator against a single un-parenthesized expression with or
4357 without quotes or against multiple parenthesized expressions. Examples:
4358
4359 `fieldname eq unquoted literal`
4360 `fieldname eq &#x27;single quoted literal&#x27;`
4361 `fieldname eq &quot;double quoted literal&quot;`
4362 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
4363
4364 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
4365 The literal value must match the entire field.
4366
4367 For example, to filter for instances that do not end with name &quot;instance&quot;,
4368 you would use `name ne .*instance`.
4369
4370 You cannot combine constraints on multiple fields using regular
4371 expressions.
4372 maxResults: integer, The maximum number of results per page that should be returned.
4373 If the number of available results is larger than `maxResults`,
4374 Compute Engine returns a `nextPageToken` that can be used to get
4375 the next page of results in subsequent list requests. Acceptable values are
4376 `0` to `500`, inclusive. (Default: `500`)
4377 orderBy: string, Sorts list results by a certain order. By default, results
4378 are returned in alphanumerical order based on the resource name.
4379
4380 You can also sort results in descending order based on the creation
4381 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
4382 results based on the `creationTimestamp` field in
4383 reverse chronological order (newest result first). Use this to sort
4384 resources like operations so that the newest operation is returned first.
4385
4386 Currently, only sorting by `name` or
4387 `creationTimestamp desc` is supported.
4388 pageToken: string, Specifies a page token to use. Set `pageToken` to the
4389 `nextPageToken` returned by a previous list request to get
4390 the next page of results.
4391 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
4392 of failure. The default value is false.
4393
4394 For example, when partial success behavior is enabled, aggregatedList for a
4395 single zone scope either returns all resources in the zone or no resources,
4396 with an error code.
4397 x__xgafv: string, V1 error format.
4398 Allowed values
4399 1 - v1 error format
4400 2 - v2 error format
4401
4402 Returns:
4403 An object of the form:
4404
4405 {
4406 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
4407 &quot;items&quot;: [ # A list of SecurityPolicy resources.
4408 { # Represents a Google Cloud Armor security policy resource.
4409 #
4410 # Only external backend services that use load balancers can
4411 # reference a security policy. For more information, see
4412 # Google Cloud Armor security policy overview.
4413 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
4414 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
4415 &quot;confidenceThreshold&quot;: 3.14,
4416 &quot;expirationSec&quot;: 42,
4417 &quot;impactedBaselineThreshold&quot;: 3.14,
4418 &quot;loadThreshold&quot;: 3.14,
4419 },
4420 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
4421 # This field is only supported in Global Security Policies of type
4422 # CLOUD_ARMOR.
4423 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
4424 # This field is only supported in Global Security Policies of type
4425 # CLOUD_ARMOR.
4426 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
4427 # STANDARD - opaque rules. (default)
4428 # PREMIUM - transparent rules.
4429 # This field is only supported in Global Security Policies of type
4430 # CLOUD_ARMOR.
4431 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
4432 # customizable thresholds.
4433 {
4434 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
4435 &quot;autoDeployExpirationSec&quot;: 42,
4436 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
4437 &quot;autoDeployLoadThreshold&quot;: 3.14,
4438 &quot;detectionAbsoluteQps&quot;: 3.14,
4439 &quot;detectionLoadThreshold&quot;: 3.14,
4440 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
4441 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
4442 # The name must be unique within the security policy.
4443 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
4444 # on specified granular traffic units.
4445 { # Configurations to specifc granular traffic units processed by
4446 # Adaptive Protection.
4447 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
4448 # type constitutes a separate traffic unit.
4449 # It can only be set to true if `value` is empty.
4450 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
4451 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
4452 },
4453 ],
4454 },
4455 ],
4456 },
4457 },
4458 &quot;advancedOptionsConfig&quot;: {
4459 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
4460 # json_parsing is set to STANDARD.
4461 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
4462 #
4463 # As per RFC 1341, a Content-Type header value has the following format:
4464 #
4465 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
4466 #
4467 # When configuring a custom Content-Type header value, only the
4468 # type/subtype needs to be specified, and the parameters should be
4469 # excluded.
4470 &quot;A String&quot;,
4471 ],
4472 },
4473 &quot;jsonParsing&quot;: &quot;A String&quot;,
4474 &quot;logLevel&quot;: &quot;A String&quot;,
4475 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
4476 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
4477 # Values are case insensitive.
4478 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
4479 # resolving the callers client IP address.
4480 &quot;A String&quot;,
4481 ],
4482 },
4483 &quot;associations&quot;: [ # A list of associations that belong to this policy.
4484 {
4485 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
4486 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
4487 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
4488 &quot;A String&quot;,
4489 ],
4490 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
4491 &quot;A String&quot;,
4492 ],
4493 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
4494 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
4495 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
4496 },
4497 ],
4498 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
4499 # text format.
4500 &quot;ddosProtectionConfig&quot;: {
4501 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
4502 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
4503 # builds DDoS mitigations that minimize collateral damage. It quantifies
4504 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
4505 # blocked.
4506 #
4507 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
4508 # not be deployed. Using a lower value will prioritize keeping collateral
4509 # damage low, possibly at the cost of its effectiveness in rate limiting
4510 # some or all of the attack. It should typically be unset, so Advanced DDoS
4511 # (and Adaptive Protection) uses the best mitigation it can find. Setting
4512 # the threshold is advised if there are logs for false positive detections
4513 # with high collateral damage, and will cause Advanced DDoS to attempt to
4514 # find a less aggressive rule that satisfies the constraint. If a suitable
4515 # rule cannot be found, the system falls back to either no mitigation for
4516 # smaller attacks or broader network throttles for larger ones.
4517 &quot;ddosProtection&quot;: &quot;A String&quot;,
4518 },
4519 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4520 # create the resource.
4521 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
4522 # unique in the organization in which the security policy is created. This
4523 # should only be used when SecurityPolicyType is FIREWALL.
4524 # The name must be 1-63 characters long, and comply with
4525 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
4526 # characters long and match the regular expression
4527 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
4528 # lowercase letter, and all following characters must be a dash, lowercase
4529 # letter, or digit, except the last character, which cannot be a dash.
4530 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
4531 # the metadata&#x27;s contents and used for optimistic locking. The
4532 # fingerprint is initially generated by Compute Engine and changes after
4533 # every request to modify or update metadata. You must always provide an
4534 # up-to-date fingerprint hash in order to update or change metadata,
4535 # otherwise the request will fail with error412 conditionNotMet.
4536 #
4537 # To see the latest fingerprint, make get() request to the
4538 # security policy.
4539 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
4540 # defined by the server.
4541 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
4542 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
4543 # is essentially a hash of the labels set used for optimistic locking. The
4544 # fingerprint is initially generated by Compute Engine and changes after
4545 # every request to modify or update labels. You must always provide an
4546 # up-to-date fingerprint hash in order to update or change labels.
4547 #
4548 # To see the latest fingerprint, make get() request to the
4549 # security policy.
4550 &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.
4551 # Label values may be empty.
4552 &quot;a_key&quot;: &quot;A String&quot;,
4553 },
4554 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
4555 # The name must be 1-63 characters long, and comply withRFC1035.
4556 # Specifically, the name must be 1-63 characters long and match the regular
4557 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
4558 # character must be a lowercase letter, and all following characters must
4559 # be a dash, lowercase letter, or digit, except the last character, which
4560 # cannot be a dash.
4561 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
4562 &quot;recaptchaOptionsConfig&quot;: {
4563 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
4564 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
4565 # the security policy. The specified site key needs to be created from the
4566 # reCAPTCHA API. The user is responsible for the validity of the specified
4567 # site key. If not specified, a Google-managed site key is used.
4568 # This field is only supported in Global Security Policies of type
4569 # CLOUD_ARMOR.
4570 },
4571 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
4572 # resides. This field is not applicable to global security policies.
4573 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
4574 # policy can not exceed a set number of tuples.
4575 &quot;rules&quot;: [ # A list of rules that belong to this policy.
4576 # There must always be a default rule which is a rule with priority
4577 # 2147483647 and match all condition (for the match condition this means
4578 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
4579 # must be either match &quot;*&quot; or not set). If no rules are provided when
4580 # creating a security policy, a default rule with action &quot;allow&quot; will be
4581 # added.
4582 { # Represents a rule that describes one or more match conditions along with
4583 # the action to be taken when traffic matches this condition (allow or deny).
4584 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
4585 # The following are the valid actions:
4586 #
4587 # - allow: allow access to target.
4588 # - deny(STATUS): deny access to target, returns the
4589 # HTTP response code specified. Valid values for `STATUS`
4590 # are 403, 404, and 502.
4591 # - rate_based_ban: limit client traffic to the configured
4592 # threshold and ban the client if the traffic exceeds the threshold.
4593 # Configure parameters for this action in RateLimitOptions. Requires
4594 # rate_limit_options to be set.
4595 # - redirect: redirect to a different target. This can
4596 # either be an internal reCAPTCHA redirect, or an external URL-based
4597 # redirect via a 302 response. Parameters for this action can be configured
4598 # via redirectOptions. This action is only supported in Global Security
4599 # Policies of type CLOUD_ARMOR.
4600 # - throttle: limit
4601 # client traffic to the configured threshold. Configure parameters for this
4602 # action in rateLimitOptions. Requires rate_limit_options to be set for
4603 # this.
4604 # - fairshare (preview only): when traffic reaches the
4605 # threshold limit, requests from the clients matching this rule begin to be
4606 # rate-limited using the Fair Share algorithm. This action is only allowed
4607 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
4608 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4609 # create the resource.
4610 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
4611 # specified when versioned_expr is set to FIREWALL.
4612 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
4613 # enabled, logs will be exported to the configured export destination in
4614 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
4615 # cannot enable logging on &quot;goto_next&quot; rules.
4616 #
4617 # This field may only be specified when the versioned_expr is set to
4618 # FIREWALL.
4619 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
4620 # This field is only supported in Global Security Policies of type
4621 # CLOUD_ARMOR.
4622 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
4623 # present.
4624 {
4625 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
4626 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
4627 },
4628 ],
4629 },
4630 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
4631 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
4632 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
4633 # Exactly one field must be specified.
4634 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
4635 # This field must be specified if versioned_expr is specified and cannot
4636 # be specified if versioned_expr is not specified.
4637 &quot;destIpRanges&quot;: [ # CIDR IP address range.
4638 #
4639 # This field may only be specified when versioned_expr is set to
4640 # FIREWALL.
4641 &quot;A String&quot;,
4642 ],
4643 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
4644 #
4645 # This field may only be specified when versioned_expr is set to
4646 # FIREWALL.
4647 {
4648 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
4649 # required when creating a firewall rule. This value can either be
4650 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
4651 # protocol number.
4652 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
4653 # only applicable for UDP or TCP protocol. Each entry must be either
4654 # an integer or a range. If not specified, this rule applies to
4655 # connections through any port.
4656 #
4657 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
4658 #
4659 # This field may only be specified when versioned_expr is set to
4660 # FIREWALL.
4661 &quot;A String&quot;,
4662 ],
4663 },
4664 ],
4665 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
4666 # Maximum number of src_ip_ranges allowed is 10.
4667 &quot;A String&quot;,
4668 ],
4669 },
4670 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
4671 # A CEVAL expression is used to specify match criteria such as origin.ip,
4672 # source.region_code and contents in the request header.
4673 # Expressions containing `evaluateThreatIntelligence` require a Cloud
4674 # Armor Enterprise subscription and are not supported in Edge Policies
4675 # nor in Regional Policies. Expressions containing
4676 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
4677 # Enterprise subscription and are only supported in Global Security
4678 # Policies.
4679 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4680 # are documented at https://github.com/google/cel-spec.
4681 #
4682 # Example (Comparison):
4683 #
4684 # title: &quot;Summary size limit&quot;
4685 # description: &quot;Determines if a summary is less than 100 chars&quot;
4686 # expression: &quot;document.summary.size() &lt; 100&quot;
4687 #
4688 # Example (Equality):
4689 #
4690 # title: &quot;Requestor is owner&quot;
4691 # description: &quot;Determines if requestor is the document owner&quot;
4692 # expression: &quot;document.owner == request.auth.claims.email&quot;
4693 #
4694 # Example (Logic):
4695 #
4696 # title: &quot;Public documents&quot;
4697 # description: &quot;Determine whether the document should be publicly visible&quot;
4698 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4699 #
4700 # Example (Data Manipulation):
4701 #
4702 # title: &quot;Notification string&quot;
4703 # description: &quot;Create a notification string with a timestamp.&quot;
4704 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4705 #
4706 # The exact variables and functions that may be referenced within an expression
4707 # are determined by the service that evaluates it. See the service
4708 # documentation for additional information.
4709 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4710 # describes the expression, e.g. when hovered over it in a UI.
4711 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4712 # syntax.
4713 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4714 # reporting, e.g. a file name and a position in the file.
4715 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4716 # its purpose. This can be used e.g. in UIs which allow to enter the
4717 # expression.
4718 },
4719 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
4720 # CEVAL expression (i.e., &#x27;expr&#x27;).
4721 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
4722 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
4723 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4724 # action-tokens. The provided site keys need to be created from
4725 # reCAPTCHA API under the same project where the security policy is
4726 # created.
4727 &quot;A String&quot;,
4728 ],
4729 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4730 # session-tokens. The provided site keys need to be created from
4731 # reCAPTCHA API under the same project where the security policy is
4732 # created.
4733 &quot;A String&quot;,
4734 ],
4735 },
4736 },
4737 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
4738 # If this field is specified, config must also be specified.
4739 # Available preconfigured expressions along with their requirements are:
4740 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
4741 # config.
4742 },
4743 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
4744 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
4745 # &#x27;action&#x27; is enforced.
4746 #
4747 # The match criteria for a rule consists of built-in match fields (like
4748 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
4749 # (&#x27;userDefinedFields&#x27;).
4750 #
4751 # Field values may be extracted directly from the packet or derived from it
4752 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
4753 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
4754 # header is found in the packet and the entire field is in bounds.
4755 #
4756 # Each match field may specify which values can match it, listing one or
4757 # more ranges, prefixes, or exact values that are considered a match for
4758 # the field. A field value must be present in order to match a specified
4759 # match field. If no match values are specified for a match field, then any
4760 # field value is considered to match it, and it&#x27;s not required to be
4761 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
4762 #
4763 # For a packet to match a rule, all specified match fields must match the
4764 # corresponding field values derived from the packet.
4765 #
4766 # Example:
4767 #
4768 # networkMatch:
4769 # srcIpRanges:
4770 # - &quot;192.0.2.0/24&quot;
4771 # - &quot;198.51.100.0/24&quot;
4772 # userDefinedFields:
4773 # - name: &quot;ipv4_fragment_offset&quot;
4774 # values:
4775 # - &quot;1-0x1fff&quot;
4776 #
4777 # The above match condition matches packets with a source IP in
4778 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
4779 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
4780 # against.
4781 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
4782 # format.
4783 &quot;A String&quot;,
4784 ],
4785 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4786 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4787 &quot;A String&quot;,
4788 ],
4789 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
4790 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
4791 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
4792 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
4793 &quot;A String&quot;,
4794 ],
4795 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
4796 42,
4797 ],
4798 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
4799 &quot;A String&quot;,
4800 ],
4801 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4802 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4803 &quot;A String&quot;,
4804 ],
4805 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
4806 # IP address.
4807 &quot;A String&quot;,
4808 ],
4809 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
4810 # matching values for that field.
4811 {
4812 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
4813 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
4814 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
4815 # range (e.g. &quot;0x400-0x7ff&quot;).
4816 &quot;A String&quot;,
4817 ],
4818 },
4819 ],
4820 },
4821 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
4822 # does not evaluate preconfigured WAF rules, i.e., if
4823 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
4824 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
4825 {
4826 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
4827 # preconfigured WAF evaluation.
4828 {
4829 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4830 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4831 },
4832 ],
4833 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
4834 # inspection during preconfigured WAF evaluation.
4835 {
4836 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4837 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4838 },
4839 ],
4840 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
4841 # inspection during preconfigured WAF evaluation.
4842 {
4843 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4844 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4845 },
4846 ],
4847 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
4848 # from inspection during preconfigured WAF evaluation. Note that the
4849 # parameter can be in the query string or in the POST body.
4850 {
4851 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4852 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4853 },
4854 ],
4855 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
4856 # inspection during preconfigured WAF evaluation. When specifying this
4857 # field, the query or fragment part should be excluded.
4858 {
4859 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
4860 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
4861 },
4862 ],
4863 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
4864 # preconfigured WAF exclusion. If omitted, it refers to all the rule
4865 # IDs under the WAF rule set.
4866 &quot;A String&quot;,
4867 ],
4868 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
4869 },
4870 ],
4871 },
4872 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
4873 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
4874 # must be a positive value between 0 and 2147483647.
4875 # Rules are evaluated from highest to lowest priority where 0 is the
4876 # highest priority and 2147483647 is the lowest priority.
4877 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
4878 # &quot;fairshare&quot;. Cannot be specified for any other actions.
4879 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
4880 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
4881 # the traffic will continue to be banned by the rate limit after the
4882 # rate falls below the threshold.
4883 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
4884 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
4885 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
4886 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
4887 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
4888 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
4889 },
4890 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
4891 # threshold. Valid option is &quot;allow&quot; only.
4892 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4893 # values are:
4894 #
4895 # - ALL: A single rate limit threshold is applied to all
4896 # the requests matching this rule. This is the default value if
4897 # &quot;enforceOnKey&quot; is not configured.
4898 # - IP: The source IP address of
4899 # the request is the key. Each IP has this limit enforced
4900 # separately.
4901 # - HTTP_HEADER: The value of the HTTP
4902 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4903 # value is truncated to the first 128 bytes of the header value. If no
4904 # such header is present in the request, the key type defaults toALL.
4905 # - XFF_IP: The first IP address (i.e. the
4906 # originating client IP address) specified in the list of IPs under
4907 # X-Forwarded-For HTTP header. If no such header is present or the value
4908 # is not a valid IP, the key defaults to the source IP address of
4909 # the request i.e. key type IP.
4910 # - HTTP_COOKIE: The value of the HTTP
4911 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4912 # value is truncated to the first 128 bytes of the cookie value. If no
4913 # such cookie is present in the request, the key type defaults toALL.
4914 # - HTTP_PATH: The URL path of the HTTP request. The key
4915 # value is truncated to the first 128 bytes.
4916 # - SNI: Server name indication in the TLS session of the
4917 # HTTPS request. The key value is truncated to the first 128 bytes. The
4918 # key type defaults to ALL on a HTTP session.
4919 # - REGION_CODE: The country/region from which the request
4920 # originates.
4921 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4922 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4923 # key type defaults to ALL.
4924 # - USER_IP: The IP address of the originating client,
4925 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4926 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
4927 # an IP address cannot be resolved from it, the key type defaults toIP.
4928 #
4929 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4930 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4931 # key type defaults to ALL.
4932 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
4933 # limit threshold is enforced for all the requests matching the rule.
4934 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
4935 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
4936 # ratelimit threshold/action is enforced. You can specify up to 3
4937 # enforce_on_key_configs. If enforce_on_key_configs is specified,
4938 # enforce_on_key must not be specified.
4939 {
4940 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4941 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
4942 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
4943 # taken as the key value.
4944 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4945 # values are:
4946 #
4947 # - ALL: A single rate limit threshold is applied to all
4948 # the requests matching this rule. This is the default value if
4949 # &quot;enforceOnKeyConfigs&quot; is not configured.
4950 # - IP: The source IP address of
4951 # the request is the key. Each IP has this limit enforced
4952 # separately.
4953 # - HTTP_HEADER: The value of the HTTP
4954 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4955 # value is truncated to the first 128 bytes of the header value. If no
4956 # such header is present in the request, the key type defaults toALL.
4957 # - XFF_IP: The first IP address (i.e. the
4958 # originating client IP address) specified in the list of IPs under
4959 # X-Forwarded-For HTTP header. If no such header is present or the
4960 # value is not a valid IP, the key defaults to the source IP address of
4961 # the request i.e. key type IP.
4962 # - HTTP_COOKIE: The value of the HTTP
4963 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4964 # value is truncated to the first 128 bytes of the cookie value. If no
4965 # such cookie is present in the request, the key type defaults toALL.
4966 # - HTTP_PATH: The URL path of the HTTP request. The key
4967 # value is truncated to the first 128 bytes.
4968 # - SNI: Server name indication in the TLS session of
4969 # the HTTPS request. The key value is truncated to the first 128 bytes.
4970 # The key type defaults to ALL on a HTTP session.
4971 # - REGION_CODE: The country/region from which the
4972 # request originates.
4973 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4974 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4975 # key type defaults to ALL.
4976 # - USER_IP: The IP address of the originating client,
4977 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4978 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
4979 # or an IP address cannot be resolved from it, the key type defaults toIP.
4980 #
4981 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4982 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4983 # key type defaults to ALL.
4984 },
4985 ],
4986 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4987 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
4988 # value.
4989 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
4990 # value.
4991 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
4992 # threshold, to either deny with a specified HTTP response code, or
4993 # redirect to a different endpoint.
4994 # Valid options are `deny(STATUS)`, where valid values for
4995 # `STATUS` are 403, 404, 429, and 502, and
4996 # `redirect`, where the redirect parameters come from
4997 # `exceedRedirectOptions` below.
4998 # The `redirect` action is only supported in Global Security Policies of
4999 # type CLOUD_ARMOR.
5000 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
5001 # action. Cannot be specified if the exceed action is not redirect.
5002 # This field is only supported in Global Security Policies of type
5003 # CLOUD_ARMOR.
5004 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
5005 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
5006 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
5007 #
5008 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
5009 # challenge assessment.
5010 # - EXTERNAL_302: redirect to a different URL via a 302
5011 # response.
5012 },
5013 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
5014 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
5015 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
5016 },
5017 },
5018 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
5019 # other actions.
5020 # This field is only supported in Global Security Policies of type
5021 # CLOUD_ARMOR.
5022 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
5023 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
5024 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
5025 #
5026 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
5027 # challenge assessment.
5028 # - EXTERNAL_302: redirect to a different URL via a 302
5029 # response.
5030 },
5031 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
5032 # policy. This can only be set during rule creation, if rule number is not
5033 # specified it will be generated by the server.
5034 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
5035 # policy rule.
5036 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
5037 # allows you to control which network&#x27;s VMs get this rule. If this field
5038 # is left blank, all VMs within the organization will receive the rule.
5039 #
5040 # This field may only be specified when versioned_expr is set to FIREWALL.
5041 &quot;A String&quot;,
5042 ],
5043 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
5044 # applied with this rule.
5045 &quot;A String&quot;,
5046 ],
5047 },
5048 ],
5049 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
5050 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
5051 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5052 # unique in the organization in which the security policy is created. This
5053 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
5054 # The name must be 1-63 characters long, and comply with
5055 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5056 # characters long and match the regular expression
5057 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5058 # lowercase letter, and all following characters must be a dash, lowercase
5059 # letter, or digit, except the last character, which cannot be a dash.
5060 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
5061 #
5062 # - CLOUD_ARMOR: Cloud Armor backend security policies can
5063 # be configured to filter incoming HTTP requests targeting backend services.
5064 # They filter requests before they hit the origin servers.
5065 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
5066 # be configured to filter incoming HTTP requests targeting backend services
5067 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
5068 # They filter requests before the request is served from Google&#x27;s cache.
5069 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
5070 # internal service policies can be configured to filter HTTP requests
5071 # targeting services managed by Traffic Director in a service mesh. They
5072 # filter requests before the request is served from the application.
5073 #
5074 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
5075 # can be configured to filter packets targeting network load balancing
5076 # resources such as backend services, target pools, target instances, and
5077 # instances with external IPs. They filter requests before the request is
5078 # served from the application.
5079 #
5080 #
5081 # This field can be set only at resource creation time.
5082 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
5083 # user-defined field consists of up to 4 bytes extracted from a fixed offset
5084 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
5085 # optional mask to select certain bits. Rules may then specify matching
5086 # values for these fields.
5087 #
5088 # Example:
5089 #
5090 # userDefinedFields:
5091 # - name: &quot;ipv4_fragment_offset&quot;
5092 # base: IPV4
5093 # offset: 6
5094 # size: 2
5095 # mask: &quot;0x1fff&quot;
5096 {
5097 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
5098 #
5099 # - IPV4: Points to the beginning of the IPv4 header.
5100 # - IPV6: Points to the beginning of the IPv6 header.
5101 # - TCP: Points to the beginning of the TCP header, skipping
5102 # over any IPv4 options or IPv6 extension headers. Not present for
5103 # non-first fragments.
5104 # - UDP: Points to the beginning of the UDP header, skipping
5105 # over any IPv4 options or IPv6 extension headers. Not present for
5106 # non-first fragments.
5107 #
5108 #
5109 # required
5110 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
5111 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
5112 # The last byte of the field (in network byte order) corresponds to the
5113 # least significant byte of the mask.
5114 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
5115 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
5116 # &#x27;base&#x27;.
5117 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
5118 },
5119 ],
5120 },
5121 ],
5122 &quot;kind&quot;: &quot;compute#securityPolicyList&quot;, # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyList for listsof securityPolicies
5123 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
5124 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
5125 # the query parameter pageToken in the next list request.
5126 # Subsequent list requests will have their own nextPageToken to
5127 # continue paging through the results.
5128 &quot;warning&quot;: { # [Output Only] Informational warning message.
5129 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
5130 # Engine returns NO_RESULTS_ON_PAGE if there
5131 # are no results in the response.
5132 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
5133 # value format. For example:
5134 #
5135 # &quot;data&quot;: [
5136 # {
5137 # &quot;key&quot;: &quot;scope&quot;,
5138 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
5139 # }
5140 {
5141 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
5142 # returned. For example, for warnings where there are no results in a list
5143 # request for a particular zone, this key might be scope and
5144 # the key value might be the zone name. Other examples might be a key
5145 # indicating a deprecated resource and a suggested replacement, or a
5146 # warning about invalid network settings (for example, if an instance
5147 # attempts to perform IP forwarding but is not enabled for IP forwarding).
5148 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5149 },
5150 ],
5151 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5152 },
5153 }</pre>
5154 </div>
5155
5156 <div class="method">
5157 <code class="details" id="listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code>
5158 <pre>Gets the current list of preconfigured Web Application Firewall (WAF)
5159 expressions.
5160
5161 Args:
5162 project: string, Project ID for this request. (required)
5163 filter: string, A filter expression that filters resources listed in the response. Most
5164 Compute resources support two types of filter expressions:
5165 expressions that support regular expressions and expressions that follow
5166 API improvement proposal AIP-160.
5167 These two types of filter expressions cannot be mixed in one request.
5168
5169 If you want to use AIP-160, your expression must specify the field name, an
5170 operator, and the value that you want to use for filtering. The value
5171 must be a string, a number, or a boolean. The operator
5172 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
5173
5174 For example, if you are filtering Compute Engine instances, you can
5175 exclude instances named `example-instance` by specifying
5176 `name != example-instance`.
5177
5178 The `:*` comparison can be used to test whether a key has been defined.
5179 For example, to find all objects with `owner` label use:
5180 ```
5181 labels.owner:*
5182 ```
5183
5184 You can also filter nested fields. For example, you could specify
5185 `scheduling.automaticRestart = false` to include instances only
5186 if they are not scheduled for automatic restarts. You can use filtering
5187 on nested fields to filter based onresource labels.
5188
5189 To filter on multiple expressions, provide each separate expression within
5190 parentheses. For example:
5191 ```
5192 (scheduling.automaticRestart = true)
5193 (cpuPlatform = &quot;Intel Skylake&quot;)
5194 ```
5195 By default, each expression is an `AND` expression. However, you
5196 can include `AND` and `OR` expressions explicitly.
5197 For example:
5198 ```
5199 (cpuPlatform = &quot;Intel Skylake&quot;) OR
5200 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
5201 (scheduling.automaticRestart = true)
5202 ```
5203
5204 If you want to use a regular expression, use the `eq` (equal) or `ne`
5205 (not equal) operator against a single un-parenthesized expression with or
5206 without quotes or against multiple parenthesized expressions. Examples:
5207
5208 `fieldname eq unquoted literal`
5209 `fieldname eq &#x27;single quoted literal&#x27;`
5210 `fieldname eq &quot;double quoted literal&quot;`
5211 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
5212
5213 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
5214 The literal value must match the entire field.
5215
5216 For example, to filter for instances that do not end with name &quot;instance&quot;,
5217 you would use `name ne .*instance`.
5218
5219 You cannot combine constraints on multiple fields using regular
5220 expressions.
5221 maxResults: integer, The maximum number of results per page that should be returned.
5222 If the number of available results is larger than `maxResults`,
5223 Compute Engine returns a `nextPageToken` that can be used to get
5224 the next page of results in subsequent list requests. Acceptable values are
5225 `0` to `500`, inclusive. (Default: `500`)
5226 orderBy: string, Sorts list results by a certain order. By default, results
5227 are returned in alphanumerical order based on the resource name.
5228
5229 You can also sort results in descending order based on the creation
5230 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
5231 results based on the `creationTimestamp` field in
5232 reverse chronological order (newest result first). Use this to sort
5233 resources like operations so that the newest operation is returned first.
5234
5235 Currently, only sorting by `name` or
5236 `creationTimestamp desc` is supported.
5237 pageToken: string, Specifies a page token to use. Set `pageToken` to the
5238 `nextPageToken` returned by a previous list request to get
5239 the next page of results.
5240 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
5241 of failure. The default value is false.
5242
5243 For example, when partial success behavior is enabled, aggregatedList for a
5244 single zone scope either returns all resources in the zone or no resources,
5245 with an error code.
5246 x__xgafv: string, V1 error format.
5247 Allowed values
5248 1 - v1 error format
5249 2 - v2 error format
5250
5251 Returns:
5252 An object of the form:
5253
5254 {
5255 &quot;preconfiguredExpressionSets&quot;: {
5256 &quot;wafRules&quot;: {
5257 &quot;expressionSets&quot;: [ # List of entities that are currently supported for WAF rules.
5258 {
5259 &quot;aliases&quot;: [ # A list of alternate IDs. The format should be:
5260 # - E.g. XSS-stable
5261 # Generic suffix like &quot;stable&quot; is particularly useful if a policy
5262 # likes to avail newer set of expressions without having to change
5263 # the policy.
5264 # A given alias name can&#x27;t be used for more than one entity set.
5265 &quot;A String&quot;,
5266 ],
5267 &quot;expressions&quot;: [ # List of available expressions.
5268 {
5269 &quot;id&quot;: &quot;A String&quot;, # Expression ID should uniquely identify the origin of the expression.
5270 # E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
5271 # version 2.9.1 rule id 973337.
5272 # The ID could be used to determine the individual attack definition
5273 # that has been detected. It could also be used to exclude it from
5274 # the policy in case of false positive.
5275 # required
5276 &quot;sensitivity&quot;: 42, # The sensitivity value associated with the WAF rule ID. This corresponds
5277 # to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
5278 # opt-in only rules.
5279 },
5280 ],
5281 &quot;id&quot;: &quot;A String&quot;, # Google specified expression set ID. The format should be:
5282 # - E.g. XSS-20170329
5283 # required
5284 },
5285 ],
5286 },
5287 },
5288 }</pre>
5289 </div>
5290
5291 <div class="method">
5292 <code class="details" id="list_next">list_next()</code>
5293 <pre>Retrieves the next page of results.
5294
5295 Args:
5296 previous_request: The request for the previous page. (required)
5297 previous_response: The response from the request for the previous page. (required)
5298
5299 Returns:
5300 A request object that you can call &#x27;execute()&#x27; on to request the next
5301 page. Returns None if there are no more items in the collection.
5302 </pre>
5303 </div>
5304
5305 <div class="method">
5306 <code class="details" id="patch">patch(project, securityPolicy, body=None, requestId=None, updateMask=None, x__xgafv=None)</code>
5307 <pre>Patches the specified policy with the data included in the request. To
5308 clear fields in the policy, leave the fields empty and specify them in the
5309 updateMask. This cannot be used to be update the rules in the policy.
5310 Please use the per rule methods like addRule, patchRule, and removeRule
5311 instead.
5312
5313 Args:
5314 project: string, Project ID for this request. (required)
5315 securityPolicy: string, Name of the security policy to update. (required)
5316 body: object, The request body.
5317 The object takes the form of:
5318
5319 { # Represents a Google Cloud Armor security policy resource.
5320 #
5321 # Only external backend services that use load balancers can
5322 # reference a security policy. For more information, see
5323 # Google Cloud Armor security policy overview.
5324 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
5325 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
5326 &quot;confidenceThreshold&quot;: 3.14,
5327 &quot;expirationSec&quot;: 42,
5328 &quot;impactedBaselineThreshold&quot;: 3.14,
5329 &quot;loadThreshold&quot;: 3.14,
5330 },
5331 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
5332 # This field is only supported in Global Security Policies of type
5333 # CLOUD_ARMOR.
5334 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
5335 # This field is only supported in Global Security Policies of type
5336 # CLOUD_ARMOR.
5337 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
5338 # STANDARD - opaque rules. (default)
5339 # PREMIUM - transparent rules.
5340 # This field is only supported in Global Security Policies of type
5341 # CLOUD_ARMOR.
5342 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
5343 # customizable thresholds.
5344 {
5345 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
5346 &quot;autoDeployExpirationSec&quot;: 42,
5347 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
5348 &quot;autoDeployLoadThreshold&quot;: 3.14,
5349 &quot;detectionAbsoluteQps&quot;: 3.14,
5350 &quot;detectionLoadThreshold&quot;: 3.14,
5351 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
5352 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
5353 # The name must be unique within the security policy.
5354 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
5355 # on specified granular traffic units.
5356 { # Configurations to specifc granular traffic units processed by
5357 # Adaptive Protection.
5358 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
5359 # type constitutes a separate traffic unit.
5360 # It can only be set to true if `value` is empty.
5361 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
5362 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
5363 },
5364 ],
5365 },
5366 ],
5367 },
5368 },
5369 &quot;advancedOptionsConfig&quot;: {
5370 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
5371 # json_parsing is set to STANDARD.
5372 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
5373 #
5374 # As per RFC 1341, a Content-Type header value has the following format:
5375 #
5376 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
5377 #
5378 # When configuring a custom Content-Type header value, only the
5379 # type/subtype needs to be specified, and the parameters should be
5380 # excluded.
5381 &quot;A String&quot;,
5382 ],
5383 },
5384 &quot;jsonParsing&quot;: &quot;A String&quot;,
5385 &quot;logLevel&quot;: &quot;A String&quot;,
5386 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
5387 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
5388 # Values are case insensitive.
5389 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
5390 # resolving the callers client IP address.
5391 &quot;A String&quot;,
5392 ],
5393 },
5394 &quot;associations&quot;: [ # A list of associations that belong to this policy.
5395 {
5396 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
5397 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
5398 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
5399 &quot;A String&quot;,
5400 ],
5401 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
5402 &quot;A String&quot;,
5403 ],
5404 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
5405 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
5406 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
5407 },
5408 ],
5409 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
5410 # text format.
5411 &quot;ddosProtectionConfig&quot;: {
5412 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
5413 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
5414 # builds DDoS mitigations that minimize collateral damage. It quantifies
5415 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
5416 # blocked.
5417 #
5418 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
5419 # not be deployed. Using a lower value will prioritize keeping collateral
5420 # damage low, possibly at the cost of its effectiveness in rate limiting
5421 # some or all of the attack. It should typically be unset, so Advanced DDoS
5422 # (and Adaptive Protection) uses the best mitigation it can find. Setting
5423 # the threshold is advised if there are logs for false positive detections
5424 # with high collateral damage, and will cause Advanced DDoS to attempt to
5425 # find a less aggressive rule that satisfies the constraint. If a suitable
5426 # rule cannot be found, the system falls back to either no mitigation for
5427 # smaller attacks or broader network throttles for larger ones.
5428 &quot;ddosProtection&quot;: &quot;A String&quot;,
5429 },
5430 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5431 # create the resource.
5432 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5433 # unique in the organization in which the security policy is created. This
5434 # should only be used when SecurityPolicyType is FIREWALL.
5435 # The name must be 1-63 characters long, and comply with
5436 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5437 # characters long and match the regular expression
5438 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5439 # lowercase letter, and all following characters must be a dash, lowercase
5440 # letter, or digit, except the last character, which cannot be a dash.
5441 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
5442 # the metadata&#x27;s contents and used for optimistic locking. The
5443 # fingerprint is initially generated by Compute Engine and changes after
5444 # every request to modify or update metadata. You must always provide an
5445 # up-to-date fingerprint hash in order to update or change metadata,
5446 # otherwise the request will fail with error412 conditionNotMet.
5447 #
5448 # To see the latest fingerprint, make get() request to the
5449 # security policy.
5450 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
5451 # defined by the server.
5452 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
5453 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
5454 # is essentially a hash of the labels set used for optimistic locking. The
5455 # fingerprint is initially generated by Compute Engine and changes after
5456 # every request to modify or update labels. You must always provide an
5457 # up-to-date fingerprint hash in order to update or change labels.
5458 #
5459 # To see the latest fingerprint, make get() request to the
5460 # security policy.
5461 &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.
5462 # Label values may be empty.
5463 &quot;a_key&quot;: &quot;A String&quot;,
5464 },
5465 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
5466 # The name must be 1-63 characters long, and comply withRFC1035.
5467 # Specifically, the name must be 1-63 characters long and match the regular
5468 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
5469 # character must be a lowercase letter, and all following characters must
5470 # be a dash, lowercase letter, or digit, except the last character, which
5471 # cannot be a dash.
5472 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
5473 &quot;recaptchaOptionsConfig&quot;: {
5474 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
5475 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
5476 # the security policy. The specified site key needs to be created from the
5477 # reCAPTCHA API. The user is responsible for the validity of the specified
5478 # site key. If not specified, a Google-managed site key is used.
5479 # This field is only supported in Global Security Policies of type
5480 # CLOUD_ARMOR.
5481 },
5482 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
5483 # resides. This field is not applicable to global security policies.
5484 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
5485 # policy can not exceed a set number of tuples.
5486 &quot;rules&quot;: [ # A list of rules that belong to this policy.
5487 # There must always be a default rule which is a rule with priority
5488 # 2147483647 and match all condition (for the match condition this means
5489 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
5490 # must be either match &quot;*&quot; or not set). If no rules are provided when
5491 # creating a security policy, a default rule with action &quot;allow&quot; will be
5492 # added.
5493 { # Represents a rule that describes one or more match conditions along with
5494 # the action to be taken when traffic matches this condition (allow or deny).
5495 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
5496 # The following are the valid actions:
5497 #
5498 # - allow: allow access to target.
5499 # - deny(STATUS): deny access to target, returns the
5500 # HTTP response code specified. Valid values for `STATUS`
5501 # are 403, 404, and 502.
5502 # - rate_based_ban: limit client traffic to the configured
5503 # threshold and ban the client if the traffic exceeds the threshold.
5504 # Configure parameters for this action in RateLimitOptions. Requires
5505 # rate_limit_options to be set.
5506 # - redirect: redirect to a different target. This can
5507 # either be an internal reCAPTCHA redirect, or an external URL-based
5508 # redirect via a 302 response. Parameters for this action can be configured
5509 # via redirectOptions. This action is only supported in Global Security
5510 # Policies of type CLOUD_ARMOR.
5511 # - throttle: limit
5512 # client traffic to the configured threshold. Configure parameters for this
5513 # action in rateLimitOptions. Requires rate_limit_options to be set for
5514 # this.
5515 # - fairshare (preview only): when traffic reaches the
5516 # threshold limit, requests from the clients matching this rule begin to be
5517 # rate-limited using the Fair Share algorithm. This action is only allowed
5518 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
5519 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5520 # create the resource.
5521 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
5522 # specified when versioned_expr is set to FIREWALL.
5523 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
5524 # enabled, logs will be exported to the configured export destination in
5525 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
5526 # cannot enable logging on &quot;goto_next&quot; rules.
5527 #
5528 # This field may only be specified when the versioned_expr is set to
5529 # FIREWALL.
5530 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
5531 # This field is only supported in Global Security Policies of type
5532 # CLOUD_ARMOR.
5533 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
5534 # present.
5535 {
5536 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
5537 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
5538 },
5539 ],
5540 },
5541 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
5542 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
5543 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
5544 # Exactly one field must be specified.
5545 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
5546 # This field must be specified if versioned_expr is specified and cannot
5547 # be specified if versioned_expr is not specified.
5548 &quot;destIpRanges&quot;: [ # CIDR IP address range.
5549 #
5550 # This field may only be specified when versioned_expr is set to
5551 # FIREWALL.
5552 &quot;A String&quot;,
5553 ],
5554 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
5555 #
5556 # This field may only be specified when versioned_expr is set to
5557 # FIREWALL.
5558 {
5559 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
5560 # required when creating a firewall rule. This value can either be
5561 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
5562 # protocol number.
5563 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
5564 # only applicable for UDP or TCP protocol. Each entry must be either
5565 # an integer or a range. If not specified, this rule applies to
5566 # connections through any port.
5567 #
5568 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
5569 #
5570 # This field may only be specified when versioned_expr is set to
5571 # FIREWALL.
5572 &quot;A String&quot;,
5573 ],
5574 },
5575 ],
5576 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
5577 # Maximum number of src_ip_ranges allowed is 10.
5578 &quot;A String&quot;,
5579 ],
5580 },
5581 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
5582 # A CEVAL expression is used to specify match criteria such as origin.ip,
5583 # source.region_code and contents in the request header.
5584 # Expressions containing `evaluateThreatIntelligence` require a Cloud
5585 # Armor Enterprise subscription and are not supported in Edge Policies
5586 # nor in Regional Policies. Expressions containing
5587 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
5588 # Enterprise subscription and are only supported in Global Security
5589 # Policies.
5590 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
5591 # are documented at https://github.com/google/cel-spec.
5592 #
5593 # Example (Comparison):
5594 #
5595 # title: &quot;Summary size limit&quot;
5596 # description: &quot;Determines if a summary is less than 100 chars&quot;
5597 # expression: &quot;document.summary.size() &lt; 100&quot;
5598 #
5599 # Example (Equality):
5600 #
5601 # title: &quot;Requestor is owner&quot;
5602 # description: &quot;Determines if requestor is the document owner&quot;
5603 # expression: &quot;document.owner == request.auth.claims.email&quot;
5604 #
5605 # Example (Logic):
5606 #
5607 # title: &quot;Public documents&quot;
5608 # description: &quot;Determine whether the document should be publicly visible&quot;
5609 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
5610 #
5611 # Example (Data Manipulation):
5612 #
5613 # title: &quot;Notification string&quot;
5614 # description: &quot;Create a notification string with a timestamp.&quot;
5615 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
5616 #
5617 # The exact variables and functions that may be referenced within an expression
5618 # are determined by the service that evaluates it. See the service
5619 # documentation for additional information.
5620 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
5621 # describes the expression, e.g. when hovered over it in a UI.
5622 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
5623 # syntax.
5624 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
5625 # reporting, e.g. a file name and a position in the file.
5626 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
5627 # its purpose. This can be used e.g. in UIs which allow to enter the
5628 # expression.
5629 },
5630 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
5631 # CEVAL expression (i.e., &#x27;expr&#x27;).
5632 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
5633 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
5634 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5635 # action-tokens. The provided site keys need to be created from
5636 # reCAPTCHA API under the same project where the security policy is
5637 # created.
5638 &quot;A String&quot;,
5639 ],
5640 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5641 # session-tokens. The provided site keys need to be created from
5642 # reCAPTCHA API under the same project where the security policy is
5643 # created.
5644 &quot;A String&quot;,
5645 ],
5646 },
5647 },
5648 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
5649 # If this field is specified, config must also be specified.
5650 # Available preconfigured expressions along with their requirements are:
5651 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
5652 # config.
5653 },
5654 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
5655 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
5656 # &#x27;action&#x27; is enforced.
5657 #
5658 # The match criteria for a rule consists of built-in match fields (like
5659 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
5660 # (&#x27;userDefinedFields&#x27;).
5661 #
5662 # Field values may be extracted directly from the packet or derived from it
5663 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
5664 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
5665 # header is found in the packet and the entire field is in bounds.
5666 #
5667 # Each match field may specify which values can match it, listing one or
5668 # more ranges, prefixes, or exact values that are considered a match for
5669 # the field. A field value must be present in order to match a specified
5670 # match field. If no match values are specified for a match field, then any
5671 # field value is considered to match it, and it&#x27;s not required to be
5672 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
5673 #
5674 # For a packet to match a rule, all specified match fields must match the
5675 # corresponding field values derived from the packet.
5676 #
5677 # Example:
5678 #
5679 # networkMatch:
5680 # srcIpRanges:
5681 # - &quot;192.0.2.0/24&quot;
5682 # - &quot;198.51.100.0/24&quot;
5683 # userDefinedFields:
5684 # - name: &quot;ipv4_fragment_offset&quot;
5685 # values:
5686 # - &quot;1-0x1fff&quot;
5687 #
5688 # The above match condition matches packets with a source IP in
5689 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
5690 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
5691 # against.
5692 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
5693 # format.
5694 &quot;A String&quot;,
5695 ],
5696 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5697 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5698 &quot;A String&quot;,
5699 ],
5700 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
5701 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
5702 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
5703 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
5704 &quot;A String&quot;,
5705 ],
5706 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
5707 42,
5708 ],
5709 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
5710 &quot;A String&quot;,
5711 ],
5712 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5713 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5714 &quot;A String&quot;,
5715 ],
5716 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
5717 # IP address.
5718 &quot;A String&quot;,
5719 ],
5720 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
5721 # matching values for that field.
5722 {
5723 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
5724 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
5725 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
5726 # range (e.g. &quot;0x400-0x7ff&quot;).
5727 &quot;A String&quot;,
5728 ],
5729 },
5730 ],
5731 },
5732 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
5733 # does not evaluate preconfigured WAF rules, i.e., if
5734 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
5735 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
5736 {
5737 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
5738 # preconfigured WAF evaluation.
5739 {
5740 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5741 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5742 },
5743 ],
5744 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
5745 # inspection during preconfigured WAF evaluation.
5746 {
5747 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5748 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5749 },
5750 ],
5751 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
5752 # inspection during preconfigured WAF evaluation.
5753 {
5754 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5755 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5756 },
5757 ],
5758 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
5759 # from inspection during preconfigured WAF evaluation. Note that the
5760 # parameter can be in the query string or in the POST body.
5761 {
5762 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5763 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5764 },
5765 ],
5766 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
5767 # inspection during preconfigured WAF evaluation. When specifying this
5768 # field, the query or fragment part should be excluded.
5769 {
5770 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5771 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5772 },
5773 ],
5774 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
5775 # preconfigured WAF exclusion. If omitted, it refers to all the rule
5776 # IDs under the WAF rule set.
5777 &quot;A String&quot;,
5778 ],
5779 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
5780 },
5781 ],
5782 },
5783 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
5784 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
5785 # must be a positive value between 0 and 2147483647.
5786 # Rules are evaluated from highest to lowest priority where 0 is the
5787 # highest priority and 2147483647 is the lowest priority.
5788 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
5789 # &quot;fairshare&quot;. Cannot be specified for any other actions.
5790 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
5791 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
5792 # the traffic will continue to be banned by the rate limit after the
5793 # rate falls below the threshold.
5794 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
5795 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
5796 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
5797 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
5798 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
5799 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
5800 },
5801 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
5802 # threshold. Valid option is &quot;allow&quot; only.
5803 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
5804 # values are:
5805 #
5806 # - ALL: A single rate limit threshold is applied to all
5807 # the requests matching this rule. This is the default value if
5808 # &quot;enforceOnKey&quot; is not configured.
5809 # - IP: The source IP address of
5810 # the request is the key. Each IP has this limit enforced
5811 # separately.
5812 # - HTTP_HEADER: The value of the HTTP
5813 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
5814 # value is truncated to the first 128 bytes of the header value. If no
5815 # such header is present in the request, the key type defaults toALL.
5816 # - XFF_IP: The first IP address (i.e. the
5817 # originating client IP address) specified in the list of IPs under
5818 # X-Forwarded-For HTTP header. If no such header is present or the value
5819 # is not a valid IP, the key defaults to the source IP address of
5820 # the request i.e. key type IP.
5821 # - HTTP_COOKIE: The value of the HTTP
5822 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
5823 # value is truncated to the first 128 bytes of the cookie value. If no
5824 # such cookie is present in the request, the key type defaults toALL.
5825 # - HTTP_PATH: The URL path of the HTTP request. The key
5826 # value is truncated to the first 128 bytes.
5827 # - SNI: Server name indication in the TLS session of the
5828 # HTTPS request. The key value is truncated to the first 128 bytes. The
5829 # key type defaults to ALL on a HTTP session.
5830 # - REGION_CODE: The country/region from which the request
5831 # originates.
5832 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
5833 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5834 # key type defaults to ALL.
5835 # - USER_IP: The IP address of the originating client,
5836 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
5837 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
5838 # an IP address cannot be resolved from it, the key type defaults toIP.
5839 #
5840 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
5841 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5842 # key type defaults to ALL.
5843 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
5844 # limit threshold is enforced for all the requests matching the rule.
5845 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
5846 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
5847 # ratelimit threshold/action is enforced. You can specify up to 3
5848 # enforce_on_key_configs. If enforce_on_key_configs is specified,
5849 # enforce_on_key must not be specified.
5850 {
5851 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
5852 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
5853 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
5854 # taken as the key value.
5855 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
5856 # values are:
5857 #
5858 # - ALL: A single rate limit threshold is applied to all
5859 # the requests matching this rule. This is the default value if
5860 # &quot;enforceOnKeyConfigs&quot; is not configured.
5861 # - IP: The source IP address of
5862 # the request is the key. Each IP has this limit enforced
5863 # separately.
5864 # - HTTP_HEADER: The value of the HTTP
5865 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
5866 # value is truncated to the first 128 bytes of the header value. If no
5867 # such header is present in the request, the key type defaults toALL.
5868 # - XFF_IP: The first IP address (i.e. the
5869 # originating client IP address) specified in the list of IPs under
5870 # X-Forwarded-For HTTP header. If no such header is present or the
5871 # value is not a valid IP, the key defaults to the source IP address of
5872 # the request i.e. key type IP.
5873 # - HTTP_COOKIE: The value of the HTTP
5874 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
5875 # value is truncated to the first 128 bytes of the cookie value. If no
5876 # such cookie is present in the request, the key type defaults toALL.
5877 # - HTTP_PATH: The URL path of the HTTP request. The key
5878 # value is truncated to the first 128 bytes.
5879 # - SNI: Server name indication in the TLS session of
5880 # the HTTPS request. The key value is truncated to the first 128 bytes.
5881 # The key type defaults to ALL on a HTTP session.
5882 # - REGION_CODE: The country/region from which the
5883 # request originates.
5884 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
5885 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5886 # key type defaults to ALL.
5887 # - USER_IP: The IP address of the originating client,
5888 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
5889 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
5890 # or an IP address cannot be resolved from it, the key type defaults toIP.
5891 #
5892 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
5893 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5894 # key type defaults to ALL.
5895 },
5896 ],
5897 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
5898 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
5899 # value.
5900 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
5901 # value.
5902 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
5903 # threshold, to either deny with a specified HTTP response code, or
5904 # redirect to a different endpoint.
5905 # Valid options are `deny(STATUS)`, where valid values for
5906 # `STATUS` are 403, 404, 429, and 502, and
5907 # `redirect`, where the redirect parameters come from
5908 # `exceedRedirectOptions` below.
5909 # The `redirect` action is only supported in Global Security Policies of
5910 # type CLOUD_ARMOR.
5911 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
5912 # action. Cannot be specified if the exceed action is not redirect.
5913 # This field is only supported in Global Security Policies of type
5914 # CLOUD_ARMOR.
5915 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
5916 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
5917 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
5918 #
5919 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
5920 # challenge assessment.
5921 # - EXTERNAL_302: redirect to a different URL via a 302
5922 # response.
5923 },
5924 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
5925 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
5926 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
5927 },
5928 },
5929 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
5930 # other actions.
5931 # This field is only supported in Global Security Policies of type
5932 # CLOUD_ARMOR.
5933 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
5934 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
5935 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
5936 #
5937 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
5938 # challenge assessment.
5939 # - EXTERNAL_302: redirect to a different URL via a 302
5940 # response.
5941 },
5942 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
5943 # policy. This can only be set during rule creation, if rule number is not
5944 # specified it will be generated by the server.
5945 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
5946 # policy rule.
5947 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
5948 # allows you to control which network&#x27;s VMs get this rule. If this field
5949 # is left blank, all VMs within the organization will receive the rule.
5950 #
5951 # This field may only be specified when versioned_expr is set to FIREWALL.
5952 &quot;A String&quot;,
5953 ],
5954 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
5955 # applied with this rule.
5956 &quot;A String&quot;,
5957 ],
5958 },
5959 ],
5960 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
5961 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
5962 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5963 # unique in the organization in which the security policy is created. This
5964 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
5965 # The name must be 1-63 characters long, and comply with
5966 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5967 # characters long and match the regular expression
5968 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5969 # lowercase letter, and all following characters must be a dash, lowercase
5970 # letter, or digit, except the last character, which cannot be a dash.
5971 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
5972 #
5973 # - CLOUD_ARMOR: Cloud Armor backend security policies can
5974 # be configured to filter incoming HTTP requests targeting backend services.
5975 # They filter requests before they hit the origin servers.
5976 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
5977 # be configured to filter incoming HTTP requests targeting backend services
5978 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
5979 # They filter requests before the request is served from Google&#x27;s cache.
5980 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
5981 # internal service policies can be configured to filter HTTP requests
5982 # targeting services managed by Traffic Director in a service mesh. They
5983 # filter requests before the request is served from the application.
5984 #
5985 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
5986 # can be configured to filter packets targeting network load balancing
5987 # resources such as backend services, target pools, target instances, and
5988 # instances with external IPs. They filter requests before the request is
5989 # served from the application.
5990 #
5991 #
5992 # This field can be set only at resource creation time.
5993 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
5994 # user-defined field consists of up to 4 bytes extracted from a fixed offset
5995 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
5996 # optional mask to select certain bits. Rules may then specify matching
5997 # values for these fields.
5998 #
5999 # Example:
6000 #
6001 # userDefinedFields:
6002 # - name: &quot;ipv4_fragment_offset&quot;
6003 # base: IPV4
6004 # offset: 6
6005 # size: 2
6006 # mask: &quot;0x1fff&quot;
6007 {
6008 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
6009 #
6010 # - IPV4: Points to the beginning of the IPv4 header.
6011 # - IPV6: Points to the beginning of the IPv6 header.
6012 # - TCP: Points to the beginning of the TCP header, skipping
6013 # over any IPv4 options or IPv6 extension headers. Not present for
6014 # non-first fragments.
6015 # - UDP: Points to the beginning of the UDP header, skipping
6016 # over any IPv4 options or IPv6 extension headers. Not present for
6017 # non-first fragments.
6018 #
6019 #
6020 # required
6021 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
6022 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
6023 # The last byte of the field (in network byte order) corresponds to the
6024 # least significant byte of the mask.
6025 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
6026 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
6027 # &#x27;base&#x27;.
6028 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
6029 },
6030 ],
6031 }
6032
6033 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
6034 that if you must retry your request, the server will know to ignore the
6035 request if it has already been completed.
6036
6037 For example, consider a situation where you make an initial request and
6038 the request times out. If you make the request again with the same
6039 request ID, the server can check if original operation with the same
6040 request ID was received, and if so, will ignore the second request. This
6041 prevents clients from accidentally creating duplicate commitments.
6042
6043 The request ID must be
6044 a valid UUID with the exception that zero UUID is not supported
6045 (00000000-0000-0000-0000-000000000000).
6046 updateMask: string, Indicates fields to be cleared as part of this request.
6047 x__xgafv: string, V1 error format.
6048 Allowed values
6049 1 - v1 error format
6050 2 - v2 error format
6051
6052 Returns:
6053 An object of the form:
6054
6055 { # Represents an Operation resource.
6056 #
6057 # Google Compute Engine has three Operation resources:
6058 #
6059 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
6060 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
6061 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
6062 #
6063 # You can use an operation resource to manage asynchronous API requests.
6064 # For more information, readHandling
6065 # API responses.
6066 #
6067 # Operations can be global, regional or zonal.
6068 #
6069 # - For global operations, use the `globalOperations`
6070 # resource.
6071 # - For regional operations, use the
6072 # `regionOperations` resource.
6073 # - For zonal operations, use
6074 # the `zoneOperations` resource.
6075 #
6076 #
6077 #
6078 # For more information, read
6079 # Global, Regional, and Zonal Resources.
6080 #
6081 # Note that completed Operation resources have a limited
6082 # retention period.
6083 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
6084 # Not present otherwise.
6085 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6086 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
6087 # set when the operation is created.
6088 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
6089 # text format.
6090 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
6091 # this field will be populated.
6092 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
6093 # operation.
6094 {
6095 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6096 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
6097 # details. There is a set of defined message types to use for providing
6098 # details.The syntax depends on the error code. For example,
6099 # QuotaExceededInfo will have details when the error code is
6100 # QUOTA_EXCEEDED.
6101 {
6102 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
6103 #
6104 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
6105 # is not enabled:
6106 #
6107 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
6108 # &quot;domain&quot;: &quot;googleapis.com&quot;
6109 # &quot;metadata&quot;: {
6110 # &quot;resource&quot;: &quot;projects/123&quot;,
6111 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
6112 # }
6113 # }
6114 #
6115 # This response indicates that the pubsub.googleapis.com API is not enabled.
6116 #
6117 # Example of an error that is returned when attempting to create a Spanner
6118 # instance in a region that is out of stock:
6119 #
6120 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
6121 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
6122 # &quot;metadata&quot;: {
6123 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
6124 # }
6125 # }
6126 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
6127 # is typically the registered service name of the tool or product that
6128 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
6129 # generated by some common infrastructure, the error domain must be a
6130 # globally unique value that identifies the infrastructure. For Google API
6131 # infrastructure, the error domain is &quot;googleapis.com&quot;.
6132 &quot;metadatas&quot;: { # Additional structured details about this error.
6133 #
6134 # Keys must match a regular expression of `a-z+` but should
6135 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
6136 # length. When identifying the current value of an exceeded limit, the units
6137 # should be contained in the key, not the value. For example, rather than
6138 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
6139 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
6140 # instances that can be created in a single (batch) request.
6141 &quot;a_key&quot;: &quot;A String&quot;,
6142 },
6143 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
6144 # proximate cause of the error. Error reasons are unique within a particular
6145 # domain of errors. This should be at most 63 characters and match a
6146 # regular expression of `A-Z+[A-Z0-9]`, which represents
6147 # UPPER_SNAKE_CASE.
6148 },
6149 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
6150 #
6151 # For example, if a quota check failed with an error indicating the calling
6152 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
6153 # directly to the right place in the developer console to flip the bit.
6154 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
6155 { # Describes a URL link.
6156 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
6157 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
6158 },
6159 ],
6160 },
6161 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
6162 # which can be attached to an RPC error.
6163 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
6164 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
6165 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
6166 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
6167 },
6168 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
6169 &quot;dimensions&quot;: { # The map holding related quota dimensions.
6170 &quot;a_key&quot;: &quot;A String&quot;,
6171 },
6172 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
6173 # type or metric.
6174 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
6175 # or metric.
6176 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
6177 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
6178 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
6179 },
6180 },
6181 ],
6182 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
6183 # This property is optional.
6184 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
6185 },
6186 ],
6187 },
6188 &quot;getVersionOperationMetadata&quot;: {
6189 &quot;inlineSbomInfo&quot;: {
6190 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
6191 # appropriate identifiers.
6192 &quot;a_key&quot;: &quot;A String&quot;,
6193 },
6194 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
6195 # identifiers.
6196 &quot;a_key&quot;: &quot;A String&quot;,
6197 },
6198 },
6199 },
6200 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
6201 # message that was returned, such as `NOT FOUND`.
6202 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
6203 # status code that was returned. For example, a `404` means the
6204 # resource was not found.
6205 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
6206 # defined by the server.
6207 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
6208 # This value is inRFC3339
6209 # text format.
6210 &quot;instancesBulkInsertOperationMetadata&quot;: {
6211 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
6212 # Example key: zones/us-central1-a
6213 &quot;a_key&quot;: {
6214 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
6215 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
6216 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
6217 # error.
6218 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
6219 # if the flow is rolling forward or rolling back.
6220 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
6221 },
6222 },
6223 },
6224 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
6225 # Operation resources.
6226 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6227 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
6228 # group of operations results from a `bulkInsert` API request.
6229 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
6230 # `update`, or `delete`, and so on.
6231 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
6232 # There is no requirement that this be linear or support any granularity of
6233 # operations. This should not be used to guess when the operation will be
6234 # complete. This number should monotonically increase as the operation
6235 # progresses.
6236 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
6237 # applicable when performing regional operations.
6238 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6239 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
6240 # this field will contain information on all underlying zonal actions and
6241 # their state.
6242 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
6243 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
6244 # Example key: zones/us-central1-a
6245 &quot;a_key&quot;: {
6246 &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
6247 # populated.
6248 # different programming environments, including REST APIs and RPC APIs. It is
6249 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
6250 # three pieces of data: error code, error message, and error details.
6251 #
6252 # You can find out more about this error model and how to work with it in the
6253 # [API Design Guide](https://cloud.google.com/apis/design/errors).
6254 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6255 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
6256 # message types for APIs to use.
6257 {
6258 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6259 },
6260 ],
6261 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
6262 # user-facing error message should be localized and sent in the
6263 # google.rpc.Status.details field, or localized by the client.
6264 },
6265 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
6266 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
6267 },
6268 },
6269 },
6270 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
6271 # This value is inRFC3339
6272 # text format.
6273 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
6274 # following:
6275 # `PENDING`, `RUNNING`, or `DONE`.
6276 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
6277 # operation.
6278 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
6279 # of the target resource.
6280 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
6281 # operations related to creating a snapshot, this points to the disk
6282 # that the snapshot was created from.
6283 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
6284 # `[email protected]` or
6285 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
6286 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
6287 # operation, this field will be populated.
6288 {
6289 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
6290 # Engine returns NO_RESULTS_ON_PAGE if there
6291 # are no results in the response.
6292 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
6293 # value format. For example:
6294 #
6295 # &quot;data&quot;: [
6296 # {
6297 # &quot;key&quot;: &quot;scope&quot;,
6298 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
6299 # }
6300 {
6301 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
6302 # returned. For example, for warnings where there are no results in a list
6303 # request for a particular zone, this key might be scope and
6304 # the key value might be the zone name. Other examples might be a key
6305 # indicating a deprecated resource and a suggested replacement, or a
6306 # warning about invalid network settings (for example, if an instance
6307 # attempts to perform IP forwarding but is not enabled for IP forwarding).
6308 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6309 },
6310 ],
6311 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6312 },
6313 ],
6314 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
6315 # applicable when performing per-zone operations.
6316 }</pre>
6317 </div>
6318
6319 <div class="method">
6320 <code class="details" id="patchRule">patchRule(project, securityPolicy, body=None, priority=None, updateMask=None, validateOnly=None, x__xgafv=None)</code>
6321 <pre>Patches a rule at the specified priority. To clear fields in the rule,
6322 leave the fields empty and specify them in the updateMask.
6323
6324 Args:
6325 project: string, Project ID for this request. (required)
6326 securityPolicy: string, Name of the security policy to update. (required)
6327 body: object, The request body.
6328 The object takes the form of:
6329
6330 { # Represents a rule that describes one or more match conditions along with
6331 # the action to be taken when traffic matches this condition (allow or deny).
6332 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
6333 # The following are the valid actions:
6334 #
6335 # - allow: allow access to target.
6336 # - deny(STATUS): deny access to target, returns the
6337 # HTTP response code specified. Valid values for `STATUS`
6338 # are 403, 404, and 502.
6339 # - rate_based_ban: limit client traffic to the configured
6340 # threshold and ban the client if the traffic exceeds the threshold.
6341 # Configure parameters for this action in RateLimitOptions. Requires
6342 # rate_limit_options to be set.
6343 # - redirect: redirect to a different target. This can
6344 # either be an internal reCAPTCHA redirect, or an external URL-based
6345 # redirect via a 302 response. Parameters for this action can be configured
6346 # via redirectOptions. This action is only supported in Global Security
6347 # Policies of type CLOUD_ARMOR.
6348 # - throttle: limit
6349 # client traffic to the configured threshold. Configure parameters for this
6350 # action in rateLimitOptions. Requires rate_limit_options to be set for
6351 # this.
6352 # - fairshare (preview only): when traffic reaches the
6353 # threshold limit, requests from the clients matching this rule begin to be
6354 # rate-limited using the Fair Share algorithm. This action is only allowed
6355 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
6356 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
6357 # create the resource.
6358 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
6359 # specified when versioned_expr is set to FIREWALL.
6360 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
6361 # enabled, logs will be exported to the configured export destination in
6362 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
6363 # cannot enable logging on &quot;goto_next&quot; rules.
6364 #
6365 # This field may only be specified when the versioned_expr is set to
6366 # FIREWALL.
6367 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
6368 # This field is only supported in Global Security Policies of type
6369 # CLOUD_ARMOR.
6370 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
6371 # present.
6372 {
6373 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
6374 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
6375 },
6376 ],
6377 },
6378 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
6379 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
6380 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
6381 # Exactly one field must be specified.
6382 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
6383 # This field must be specified if versioned_expr is specified and cannot
6384 # be specified if versioned_expr is not specified.
6385 &quot;destIpRanges&quot;: [ # CIDR IP address range.
6386 #
6387 # This field may only be specified when versioned_expr is set to
6388 # FIREWALL.
6389 &quot;A String&quot;,
6390 ],
6391 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
6392 #
6393 # This field may only be specified when versioned_expr is set to
6394 # FIREWALL.
6395 {
6396 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
6397 # required when creating a firewall rule. This value can either be
6398 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
6399 # protocol number.
6400 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
6401 # only applicable for UDP or TCP protocol. Each entry must be either
6402 # an integer or a range. If not specified, this rule applies to
6403 # connections through any port.
6404 #
6405 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
6406 #
6407 # This field may only be specified when versioned_expr is set to
6408 # FIREWALL.
6409 &quot;A String&quot;,
6410 ],
6411 },
6412 ],
6413 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
6414 # Maximum number of src_ip_ranges allowed is 10.
6415 &quot;A String&quot;,
6416 ],
6417 },
6418 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
6419 # A CEVAL expression is used to specify match criteria such as origin.ip,
6420 # source.region_code and contents in the request header.
6421 # Expressions containing `evaluateThreatIntelligence` require a Cloud
6422 # Armor Enterprise subscription and are not supported in Edge Policies
6423 # nor in Regional Policies. Expressions containing
6424 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
6425 # Enterprise subscription and are only supported in Global Security
6426 # Policies.
6427 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
6428 # are documented at https://github.com/google/cel-spec.
6429 #
6430 # Example (Comparison):
6431 #
6432 # title: &quot;Summary size limit&quot;
6433 # description: &quot;Determines if a summary is less than 100 chars&quot;
6434 # expression: &quot;document.summary.size() &lt; 100&quot;
6435 #
6436 # Example (Equality):
6437 #
6438 # title: &quot;Requestor is owner&quot;
6439 # description: &quot;Determines if requestor is the document owner&quot;
6440 # expression: &quot;document.owner == request.auth.claims.email&quot;
6441 #
6442 # Example (Logic):
6443 #
6444 # title: &quot;Public documents&quot;
6445 # description: &quot;Determine whether the document should be publicly visible&quot;
6446 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
6447 #
6448 # Example (Data Manipulation):
6449 #
6450 # title: &quot;Notification string&quot;
6451 # description: &quot;Create a notification string with a timestamp.&quot;
6452 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
6453 #
6454 # The exact variables and functions that may be referenced within an expression
6455 # are determined by the service that evaluates it. See the service
6456 # documentation for additional information.
6457 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
6458 # describes the expression, e.g. when hovered over it in a UI.
6459 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
6460 # syntax.
6461 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
6462 # reporting, e.g. a file name and a position in the file.
6463 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
6464 # its purpose. This can be used e.g. in UIs which allow to enter the
6465 # expression.
6466 },
6467 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
6468 # CEVAL expression (i.e., &#x27;expr&#x27;).
6469 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
6470 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
6471 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6472 # action-tokens. The provided site keys need to be created from
6473 # reCAPTCHA API under the same project where the security policy is
6474 # created.
6475 &quot;A String&quot;,
6476 ],
6477 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6478 # session-tokens. The provided site keys need to be created from
6479 # reCAPTCHA API under the same project where the security policy is
6480 # created.
6481 &quot;A String&quot;,
6482 ],
6483 },
6484 },
6485 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
6486 # If this field is specified, config must also be specified.
6487 # Available preconfigured expressions along with their requirements are:
6488 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
6489 # config.
6490 },
6491 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
6492 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
6493 # &#x27;action&#x27; is enforced.
6494 #
6495 # The match criteria for a rule consists of built-in match fields (like
6496 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
6497 # (&#x27;userDefinedFields&#x27;).
6498 #
6499 # Field values may be extracted directly from the packet or derived from it
6500 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
6501 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
6502 # header is found in the packet and the entire field is in bounds.
6503 #
6504 # Each match field may specify which values can match it, listing one or
6505 # more ranges, prefixes, or exact values that are considered a match for
6506 # the field. A field value must be present in order to match a specified
6507 # match field. If no match values are specified for a match field, then any
6508 # field value is considered to match it, and it&#x27;s not required to be
6509 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
6510 #
6511 # For a packet to match a rule, all specified match fields must match the
6512 # corresponding field values derived from the packet.
6513 #
6514 # Example:
6515 #
6516 # networkMatch:
6517 # srcIpRanges:
6518 # - &quot;192.0.2.0/24&quot;
6519 # - &quot;198.51.100.0/24&quot;
6520 # userDefinedFields:
6521 # - name: &quot;ipv4_fragment_offset&quot;
6522 # values:
6523 # - &quot;1-0x1fff&quot;
6524 #
6525 # The above match condition matches packets with a source IP in
6526 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
6527 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
6528 # against.
6529 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
6530 # format.
6531 &quot;A String&quot;,
6532 ],
6533 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6534 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6535 &quot;A String&quot;,
6536 ],
6537 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
6538 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
6539 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
6540 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
6541 &quot;A String&quot;,
6542 ],
6543 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
6544 42,
6545 ],
6546 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
6547 &quot;A String&quot;,
6548 ],
6549 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6550 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6551 &quot;A String&quot;,
6552 ],
6553 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
6554 # IP address.
6555 &quot;A String&quot;,
6556 ],
6557 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
6558 # matching values for that field.
6559 {
6560 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
6561 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
6562 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
6563 # range (e.g. &quot;0x400-0x7ff&quot;).
6564 &quot;A String&quot;,
6565 ],
6566 },
6567 ],
6568 },
6569 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
6570 # does not evaluate preconfigured WAF rules, i.e., if
6571 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
6572 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
6573 {
6574 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
6575 # preconfigured WAF evaluation.
6576 {
6577 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6578 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6579 },
6580 ],
6581 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
6582 # inspection during preconfigured WAF evaluation.
6583 {
6584 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6585 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6586 },
6587 ],
6588 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
6589 # inspection during preconfigured WAF evaluation.
6590 {
6591 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6592 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6593 },
6594 ],
6595 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
6596 # from inspection during preconfigured WAF evaluation. Note that the
6597 # parameter can be in the query string or in the POST body.
6598 {
6599 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6600 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6601 },
6602 ],
6603 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
6604 # inspection during preconfigured WAF evaluation. When specifying this
6605 # field, the query or fragment part should be excluded.
6606 {
6607 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6608 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6609 },
6610 ],
6611 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
6612 # preconfigured WAF exclusion. If omitted, it refers to all the rule
6613 # IDs under the WAF rule set.
6614 &quot;A String&quot;,
6615 ],
6616 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
6617 },
6618 ],
6619 },
6620 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
6621 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
6622 # must be a positive value between 0 and 2147483647.
6623 # Rules are evaluated from highest to lowest priority where 0 is the
6624 # highest priority and 2147483647 is the lowest priority.
6625 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
6626 # &quot;fairshare&quot;. Cannot be specified for any other actions.
6627 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
6628 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
6629 # the traffic will continue to be banned by the rate limit after the
6630 # rate falls below the threshold.
6631 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
6632 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
6633 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
6634 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
6635 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6636 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6637 },
6638 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
6639 # threshold. Valid option is &quot;allow&quot; only.
6640 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6641 # values are:
6642 #
6643 # - ALL: A single rate limit threshold is applied to all
6644 # the requests matching this rule. This is the default value if
6645 # &quot;enforceOnKey&quot; is not configured.
6646 # - IP: The source IP address of
6647 # the request is the key. Each IP has this limit enforced
6648 # separately.
6649 # - HTTP_HEADER: The value of the HTTP
6650 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6651 # value is truncated to the first 128 bytes of the header value. If no
6652 # such header is present in the request, the key type defaults toALL.
6653 # - XFF_IP: The first IP address (i.e. the
6654 # originating client IP address) specified in the list of IPs under
6655 # X-Forwarded-For HTTP header. If no such header is present or the value
6656 # is not a valid IP, the key defaults to the source IP address of
6657 # the request i.e. key type IP.
6658 # - HTTP_COOKIE: The value of the HTTP
6659 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6660 # value is truncated to the first 128 bytes of the cookie value. If no
6661 # such cookie is present in the request, the key type defaults toALL.
6662 # - HTTP_PATH: The URL path of the HTTP request. The key
6663 # value is truncated to the first 128 bytes.
6664 # - SNI: Server name indication in the TLS session of the
6665 # HTTPS request. The key value is truncated to the first 128 bytes. The
6666 # key type defaults to ALL on a HTTP session.
6667 # - REGION_CODE: The country/region from which the request
6668 # originates.
6669 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6670 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6671 # key type defaults to ALL.
6672 # - USER_IP: The IP address of the originating client,
6673 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6674 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
6675 # an IP address cannot be resolved from it, the key type defaults toIP.
6676 #
6677 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6678 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6679 # key type defaults to ALL.
6680 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
6681 # limit threshold is enforced for all the requests matching the rule.
6682 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
6683 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
6684 # ratelimit threshold/action is enforced. You can specify up to 3
6685 # enforce_on_key_configs. If enforce_on_key_configs is specified,
6686 # enforce_on_key must not be specified.
6687 {
6688 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6689 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
6690 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
6691 # taken as the key value.
6692 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6693 # values are:
6694 #
6695 # - ALL: A single rate limit threshold is applied to all
6696 # the requests matching this rule. This is the default value if
6697 # &quot;enforceOnKeyConfigs&quot; is not configured.
6698 # - IP: The source IP address of
6699 # the request is the key. Each IP has this limit enforced
6700 # separately.
6701 # - HTTP_HEADER: The value of the HTTP
6702 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6703 # value is truncated to the first 128 bytes of the header value. If no
6704 # such header is present in the request, the key type defaults toALL.
6705 # - XFF_IP: The first IP address (i.e. the
6706 # originating client IP address) specified in the list of IPs under
6707 # X-Forwarded-For HTTP header. If no such header is present or the
6708 # value is not a valid IP, the key defaults to the source IP address of
6709 # the request i.e. key type IP.
6710 # - HTTP_COOKIE: The value of the HTTP
6711 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6712 # value is truncated to the first 128 bytes of the cookie value. If no
6713 # such cookie is present in the request, the key type defaults toALL.
6714 # - HTTP_PATH: The URL path of the HTTP request. The key
6715 # value is truncated to the first 128 bytes.
6716 # - SNI: Server name indication in the TLS session of
6717 # the HTTPS request. The key value is truncated to the first 128 bytes.
6718 # The key type defaults to ALL on a HTTP session.
6719 # - REGION_CODE: The country/region from which the
6720 # request originates.
6721 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6722 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6723 # key type defaults to ALL.
6724 # - USER_IP: The IP address of the originating client,
6725 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6726 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
6727 # or an IP address cannot be resolved from it, the key type defaults toIP.
6728 #
6729 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6730 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6731 # key type defaults to ALL.
6732 },
6733 ],
6734 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6735 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
6736 # value.
6737 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
6738 # value.
6739 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
6740 # threshold, to either deny with a specified HTTP response code, or
6741 # redirect to a different endpoint.
6742 # Valid options are `deny(STATUS)`, where valid values for
6743 # `STATUS` are 403, 404, 429, and 502, and
6744 # `redirect`, where the redirect parameters come from
6745 # `exceedRedirectOptions` below.
6746 # The `redirect` action is only supported in Global Security Policies of
6747 # type CLOUD_ARMOR.
6748 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
6749 # action. Cannot be specified if the exceed action is not redirect.
6750 # This field is only supported in Global Security Policies of type
6751 # CLOUD_ARMOR.
6752 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6753 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6754 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6755 #
6756 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6757 # challenge assessment.
6758 # - EXTERNAL_302: redirect to a different URL via a 302
6759 # response.
6760 },
6761 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
6762 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6763 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6764 },
6765 },
6766 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
6767 # other actions.
6768 # This field is only supported in Global Security Policies of type
6769 # CLOUD_ARMOR.
6770 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6771 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6772 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6773 #
6774 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6775 # challenge assessment.
6776 # - EXTERNAL_302: redirect to a different URL via a 302
6777 # response.
6778 },
6779 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
6780 # policy. This can only be set during rule creation, if rule number is not
6781 # specified it will be generated by the server.
6782 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
6783 # policy rule.
6784 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
6785 # allows you to control which network&#x27;s VMs get this rule. If this field
6786 # is left blank, all VMs within the organization will receive the rule.
6787 #
6788 # This field may only be specified when versioned_expr is set to FIREWALL.
6789 &quot;A String&quot;,
6790 ],
6791 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
6792 # applied with this rule.
6793 &quot;A String&quot;,
6794 ],
6795 }
6796
6797 priority: integer, The priority of the rule to patch.
6798 updateMask: string, Indicates fields to be cleared as part of this request.
6799 validateOnly: boolean, If true, the request will not be committed.
6800 x__xgafv: string, V1 error format.
6801 Allowed values
6802 1 - v1 error format
6803 2 - v2 error format
6804
6805 Returns:
6806 An object of the form:
6807
6808 { # Represents an Operation resource.
6809 #
6810 # Google Compute Engine has three Operation resources:
6811 #
6812 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
6813 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
6814 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
6815 #
6816 # You can use an operation resource to manage asynchronous API requests.
6817 # For more information, readHandling
6818 # API responses.
6819 #
6820 # Operations can be global, regional or zonal.
6821 #
6822 # - For global operations, use the `globalOperations`
6823 # resource.
6824 # - For regional operations, use the
6825 # `regionOperations` resource.
6826 # - For zonal operations, use
6827 # the `zoneOperations` resource.
6828 #
6829 #
6830 #
6831 # For more information, read
6832 # Global, Regional, and Zonal Resources.
6833 #
6834 # Note that completed Operation resources have a limited
6835 # retention period.
6836 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
6837 # Not present otherwise.
6838 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6839 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
6840 # set when the operation is created.
6841 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
6842 # text format.
6843 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
6844 # this field will be populated.
6845 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
6846 # operation.
6847 {
6848 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6849 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
6850 # details. There is a set of defined message types to use for providing
6851 # details.The syntax depends on the error code. For example,
6852 # QuotaExceededInfo will have details when the error code is
6853 # QUOTA_EXCEEDED.
6854 {
6855 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
6856 #
6857 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
6858 # is not enabled:
6859 #
6860 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
6861 # &quot;domain&quot;: &quot;googleapis.com&quot;
6862 # &quot;metadata&quot;: {
6863 # &quot;resource&quot;: &quot;projects/123&quot;,
6864 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
6865 # }
6866 # }
6867 #
6868 # This response indicates that the pubsub.googleapis.com API is not enabled.
6869 #
6870 # Example of an error that is returned when attempting to create a Spanner
6871 # instance in a region that is out of stock:
6872 #
6873 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
6874 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
6875 # &quot;metadata&quot;: {
6876 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
6877 # }
6878 # }
6879 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
6880 # is typically the registered service name of the tool or product that
6881 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
6882 # generated by some common infrastructure, the error domain must be a
6883 # globally unique value that identifies the infrastructure. For Google API
6884 # infrastructure, the error domain is &quot;googleapis.com&quot;.
6885 &quot;metadatas&quot;: { # Additional structured details about this error.
6886 #
6887 # Keys must match a regular expression of `a-z+` but should
6888 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
6889 # length. When identifying the current value of an exceeded limit, the units
6890 # should be contained in the key, not the value. For example, rather than
6891 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
6892 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
6893 # instances that can be created in a single (batch) request.
6894 &quot;a_key&quot;: &quot;A String&quot;,
6895 },
6896 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
6897 # proximate cause of the error. Error reasons are unique within a particular
6898 # domain of errors. This should be at most 63 characters and match a
6899 # regular expression of `A-Z+[A-Z0-9]`, which represents
6900 # UPPER_SNAKE_CASE.
6901 },
6902 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
6903 #
6904 # For example, if a quota check failed with an error indicating the calling
6905 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
6906 # directly to the right place in the developer console to flip the bit.
6907 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
6908 { # Describes a URL link.
6909 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
6910 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
6911 },
6912 ],
6913 },
6914 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
6915 # which can be attached to an RPC error.
6916 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
6917 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
6918 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
6919 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
6920 },
6921 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
6922 &quot;dimensions&quot;: { # The map holding related quota dimensions.
6923 &quot;a_key&quot;: &quot;A String&quot;,
6924 },
6925 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
6926 # type or metric.
6927 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
6928 # or metric.
6929 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
6930 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
6931 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
6932 },
6933 },
6934 ],
6935 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
6936 # This property is optional.
6937 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
6938 },
6939 ],
6940 },
6941 &quot;getVersionOperationMetadata&quot;: {
6942 &quot;inlineSbomInfo&quot;: {
6943 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
6944 # appropriate identifiers.
6945 &quot;a_key&quot;: &quot;A String&quot;,
6946 },
6947 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
6948 # identifiers.
6949 &quot;a_key&quot;: &quot;A String&quot;,
6950 },
6951 },
6952 },
6953 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
6954 # message that was returned, such as `NOT FOUND`.
6955 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
6956 # status code that was returned. For example, a `404` means the
6957 # resource was not found.
6958 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
6959 # defined by the server.
6960 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
6961 # This value is inRFC3339
6962 # text format.
6963 &quot;instancesBulkInsertOperationMetadata&quot;: {
6964 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
6965 # Example key: zones/us-central1-a
6966 &quot;a_key&quot;: {
6967 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
6968 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
6969 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
6970 # error.
6971 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
6972 # if the flow is rolling forward or rolling back.
6973 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
6974 },
6975 },
6976 },
6977 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
6978 # Operation resources.
6979 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6980 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
6981 # group of operations results from a `bulkInsert` API request.
6982 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
6983 # `update`, or `delete`, and so on.
6984 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
6985 # There is no requirement that this be linear or support any granularity of
6986 # operations. This should not be used to guess when the operation will be
6987 # complete. This number should monotonically increase as the operation
6988 # progresses.
6989 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
6990 # applicable when performing regional operations.
6991 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6992 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
6993 # this field will contain information on all underlying zonal actions and
6994 # their state.
6995 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
6996 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
6997 # Example key: zones/us-central1-a
6998 &quot;a_key&quot;: {
6999 &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
7000 # populated.
7001 # different programming environments, including REST APIs and RPC APIs. It is
7002 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7003 # three pieces of data: error code, error message, and error details.
7004 #
7005 # You can find out more about this error model and how to work with it in the
7006 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7007 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7008 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7009 # message types for APIs to use.
7010 {
7011 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7012 },
7013 ],
7014 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7015 # user-facing error message should be localized and sent in the
7016 # google.rpc.Status.details field, or localized by the client.
7017 },
7018 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7019 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7020 },
7021 },
7022 },
7023 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7024 # This value is inRFC3339
7025 # text format.
7026 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7027 # following:
7028 # `PENDING`, `RUNNING`, or `DONE`.
7029 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7030 # operation.
7031 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7032 # of the target resource.
7033 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7034 # operations related to creating a snapshot, this points to the disk
7035 # that the snapshot was created from.
7036 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7037 # `[email protected]` or
7038 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7039 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7040 # operation, this field will be populated.
7041 {
7042 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7043 # Engine returns NO_RESULTS_ON_PAGE if there
7044 # are no results in the response.
7045 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7046 # value format. For example:
7047 #
7048 # &quot;data&quot;: [
7049 # {
7050 # &quot;key&quot;: &quot;scope&quot;,
7051 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7052 # }
7053 {
7054 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7055 # returned. For example, for warnings where there are no results in a list
7056 # request for a particular zone, this key might be scope and
7057 # the key value might be the zone name. Other examples might be a key
7058 # indicating a deprecated resource and a suggested replacement, or a
7059 # warning about invalid network settings (for example, if an instance
7060 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7061 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7062 },
7063 ],
7064 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7065 },
7066 ],
7067 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7068 # applicable when performing per-zone operations.
7069 }</pre>
7070 </div>
7071
7072 <div class="method">
7073 <code class="details" id="removeRule">removeRule(project, securityPolicy, priority=None, x__xgafv=None)</code>
7074 <pre>Deletes a rule at the specified priority.
7075
7076 Args:
7077 project: string, Project ID for this request. (required)
7078 securityPolicy: string, Name of the security policy to update. (required)
7079 priority: integer, The priority of the rule to remove from the security policy.
7080 x__xgafv: string, V1 error format.
7081 Allowed values
7082 1 - v1 error format
7083 2 - v2 error format
7084
7085 Returns:
7086 An object of the form:
7087
7088 { # Represents an Operation resource.
7089 #
7090 # Google Compute Engine has three Operation resources:
7091 #
7092 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
7093 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
7094 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
7095 #
7096 # You can use an operation resource to manage asynchronous API requests.
7097 # For more information, readHandling
7098 # API responses.
7099 #
7100 # Operations can be global, regional or zonal.
7101 #
7102 # - For global operations, use the `globalOperations`
7103 # resource.
7104 # - For regional operations, use the
7105 # `regionOperations` resource.
7106 # - For zonal operations, use
7107 # the `zoneOperations` resource.
7108 #
7109 #
7110 #
7111 # For more information, read
7112 # Global, Regional, and Zonal Resources.
7113 #
7114 # Note that completed Operation resources have a limited
7115 # retention period.
7116 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7117 # Not present otherwise.
7118 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7119 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7120 # set when the operation is created.
7121 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7122 # text format.
7123 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7124 # this field will be populated.
7125 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7126 # operation.
7127 {
7128 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7129 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7130 # details. There is a set of defined message types to use for providing
7131 # details.The syntax depends on the error code. For example,
7132 # QuotaExceededInfo will have details when the error code is
7133 # QUOTA_EXCEEDED.
7134 {
7135 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7136 #
7137 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7138 # is not enabled:
7139 #
7140 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7141 # &quot;domain&quot;: &quot;googleapis.com&quot;
7142 # &quot;metadata&quot;: {
7143 # &quot;resource&quot;: &quot;projects/123&quot;,
7144 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7145 # }
7146 # }
7147 #
7148 # This response indicates that the pubsub.googleapis.com API is not enabled.
7149 #
7150 # Example of an error that is returned when attempting to create a Spanner
7151 # instance in a region that is out of stock:
7152 #
7153 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7154 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7155 # &quot;metadata&quot;: {
7156 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7157 # }
7158 # }
7159 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7160 # is typically the registered service name of the tool or product that
7161 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7162 # generated by some common infrastructure, the error domain must be a
7163 # globally unique value that identifies the infrastructure. For Google API
7164 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7165 &quot;metadatas&quot;: { # Additional structured details about this error.
7166 #
7167 # Keys must match a regular expression of `a-z+` but should
7168 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7169 # length. When identifying the current value of an exceeded limit, the units
7170 # should be contained in the key, not the value. For example, rather than
7171 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7172 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7173 # instances that can be created in a single (batch) request.
7174 &quot;a_key&quot;: &quot;A String&quot;,
7175 },
7176 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7177 # proximate cause of the error. Error reasons are unique within a particular
7178 # domain of errors. This should be at most 63 characters and match a
7179 # regular expression of `A-Z+[A-Z0-9]`, which represents
7180 # UPPER_SNAKE_CASE.
7181 },
7182 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7183 #
7184 # For example, if a quota check failed with an error indicating the calling
7185 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7186 # directly to the right place in the developer console to flip the bit.
7187 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7188 { # Describes a URL link.
7189 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7190 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7191 },
7192 ],
7193 },
7194 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7195 # which can be attached to an RPC error.
7196 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7197 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7198 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7199 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7200 },
7201 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7202 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7203 &quot;a_key&quot;: &quot;A String&quot;,
7204 },
7205 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7206 # type or metric.
7207 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7208 # or metric.
7209 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7210 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7211 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7212 },
7213 },
7214 ],
7215 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7216 # This property is optional.
7217 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7218 },
7219 ],
7220 },
7221 &quot;getVersionOperationMetadata&quot;: {
7222 &quot;inlineSbomInfo&quot;: {
7223 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7224 # appropriate identifiers.
7225 &quot;a_key&quot;: &quot;A String&quot;,
7226 },
7227 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7228 # identifiers.
7229 &quot;a_key&quot;: &quot;A String&quot;,
7230 },
7231 },
7232 },
7233 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7234 # message that was returned, such as `NOT FOUND`.
7235 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7236 # status code that was returned. For example, a `404` means the
7237 # resource was not found.
7238 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7239 # defined by the server.
7240 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7241 # This value is inRFC3339
7242 # text format.
7243 &quot;instancesBulkInsertOperationMetadata&quot;: {
7244 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7245 # Example key: zones/us-central1-a
7246 &quot;a_key&quot;: {
7247 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7248 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7249 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7250 # error.
7251 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7252 # if the flow is rolling forward or rolling back.
7253 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7254 },
7255 },
7256 },
7257 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7258 # Operation resources.
7259 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7260 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7261 # group of operations results from a `bulkInsert` API request.
7262 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7263 # `update`, or `delete`, and so on.
7264 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7265 # There is no requirement that this be linear or support any granularity of
7266 # operations. This should not be used to guess when the operation will be
7267 # complete. This number should monotonically increase as the operation
7268 # progresses.
7269 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7270 # applicable when performing regional operations.
7271 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7272 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7273 # this field will contain information on all underlying zonal actions and
7274 # their state.
7275 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7276 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7277 # Example key: zones/us-central1-a
7278 &quot;a_key&quot;: {
7279 &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
7280 # populated.
7281 # different programming environments, including REST APIs and RPC APIs. It is
7282 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7283 # three pieces of data: error code, error message, and error details.
7284 #
7285 # You can find out more about this error model and how to work with it in the
7286 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7287 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7288 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7289 # message types for APIs to use.
7290 {
7291 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7292 },
7293 ],
7294 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7295 # user-facing error message should be localized and sent in the
7296 # google.rpc.Status.details field, or localized by the client.
7297 },
7298 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7299 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7300 },
7301 },
7302 },
7303 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7304 # This value is inRFC3339
7305 # text format.
7306 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7307 # following:
7308 # `PENDING`, `RUNNING`, or `DONE`.
7309 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7310 # operation.
7311 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7312 # of the target resource.
7313 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7314 # operations related to creating a snapshot, this points to the disk
7315 # that the snapshot was created from.
7316 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7317 # `[email protected]` or
7318 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7319 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7320 # operation, this field will be populated.
7321 {
7322 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7323 # Engine returns NO_RESULTS_ON_PAGE if there
7324 # are no results in the response.
7325 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7326 # value format. For example:
7327 #
7328 # &quot;data&quot;: [
7329 # {
7330 # &quot;key&quot;: &quot;scope&quot;,
7331 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7332 # }
7333 {
7334 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7335 # returned. For example, for warnings where there are no results in a list
7336 # request for a particular zone, this key might be scope and
7337 # the key value might be the zone name. Other examples might be a key
7338 # indicating a deprecated resource and a suggested replacement, or a
7339 # warning about invalid network settings (for example, if an instance
7340 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7341 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7342 },
7343 ],
7344 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7345 },
7346 ],
7347 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7348 # applicable when performing per-zone operations.
7349 }</pre>
7350 </div>
7351
7352 <div class="method">
7353 <code class="details" id="setLabels">setLabels(project, resource, body=None, x__xgafv=None)</code>
7354 <pre>Sets the labels on a security policy. To learn more about labels,
7355 read the Labeling Resources
7356 documentation.
7357
7358 Args:
7359 project: string, Project ID for this request. (required)
7360 resource: string, Name or id of the resource for this request. (required)
7361 body: object, The request body.
7362 The object takes the form of:
7363
7364 {
7365 &quot;labelFingerprint&quot;: &quot;A String&quot;, # The fingerprint of the previous set of labels for this resource,
7366 # used to detect conflicts. The fingerprint is initially generated by Compute
7367 # Engine and changes after every request to modify or update labels. You must
7368 # always provide an up-to-date fingerprint hash when updating or changing
7369 # labels, otherwise the request will fail with error412 conditionNotMet. Make a get() request to the
7370 # resource to get the latest fingerprint.
7371 &quot;labels&quot;: { # A list of labels to apply for this resource. Each label must comply with
7372 # the
7373 # requirements for labels. For example,&quot;webserver-frontend&quot;: &quot;images&quot;. A label value can also be
7374 # empty (e.g. &quot;my-label&quot;: &quot;&quot;).
7375 &quot;a_key&quot;: &quot;A String&quot;,
7376 },
7377 }
7378
7379 x__xgafv: string, V1 error format.
7380 Allowed values
7381 1 - v1 error format
7382 2 - v2 error format
7383
7384 Returns:
7385 An object of the form:
7386
7387 { # Represents an Operation resource.
7388 #
7389 # Google Compute Engine has three Operation resources:
7390 #
7391 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
7392 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
7393 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
7394 #
7395 # You can use an operation resource to manage asynchronous API requests.
7396 # For more information, readHandling
7397 # API responses.
7398 #
7399 # Operations can be global, regional or zonal.
7400 #
7401 # - For global operations, use the `globalOperations`
7402 # resource.
7403 # - For regional operations, use the
7404 # `regionOperations` resource.
7405 # - For zonal operations, use
7406 # the `zoneOperations` resource.
7407 #
7408 #
7409 #
7410 # For more information, read
7411 # Global, Regional, and Zonal Resources.
7412 #
7413 # Note that completed Operation resources have a limited
7414 # retention period.
7415 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7416 # Not present otherwise.
7417 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7418 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7419 # set when the operation is created.
7420 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7421 # text format.
7422 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7423 # this field will be populated.
7424 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7425 # operation.
7426 {
7427 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7428 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7429 # details. There is a set of defined message types to use for providing
7430 # details.The syntax depends on the error code. For example,
7431 # QuotaExceededInfo will have details when the error code is
7432 # QUOTA_EXCEEDED.
7433 {
7434 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7435 #
7436 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7437 # is not enabled:
7438 #
7439 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7440 # &quot;domain&quot;: &quot;googleapis.com&quot;
7441 # &quot;metadata&quot;: {
7442 # &quot;resource&quot;: &quot;projects/123&quot;,
7443 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7444 # }
7445 # }
7446 #
7447 # This response indicates that the pubsub.googleapis.com API is not enabled.
7448 #
7449 # Example of an error that is returned when attempting to create a Spanner
7450 # instance in a region that is out of stock:
7451 #
7452 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7453 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7454 # &quot;metadata&quot;: {
7455 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7456 # }
7457 # }
7458 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7459 # is typically the registered service name of the tool or product that
7460 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7461 # generated by some common infrastructure, the error domain must be a
7462 # globally unique value that identifies the infrastructure. For Google API
7463 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7464 &quot;metadatas&quot;: { # Additional structured details about this error.
7465 #
7466 # Keys must match a regular expression of `a-z+` but should
7467 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7468 # length. When identifying the current value of an exceeded limit, the units
7469 # should be contained in the key, not the value. For example, rather than
7470 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7471 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7472 # instances that can be created in a single (batch) request.
7473 &quot;a_key&quot;: &quot;A String&quot;,
7474 },
7475 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7476 # proximate cause of the error. Error reasons are unique within a particular
7477 # domain of errors. This should be at most 63 characters and match a
7478 # regular expression of `A-Z+[A-Z0-9]`, which represents
7479 # UPPER_SNAKE_CASE.
7480 },
7481 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7482 #
7483 # For example, if a quota check failed with an error indicating the calling
7484 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7485 # directly to the right place in the developer console to flip the bit.
7486 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7487 { # Describes a URL link.
7488 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7489 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7490 },
7491 ],
7492 },
7493 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7494 # which can be attached to an RPC error.
7495 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7496 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7497 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7498 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7499 },
7500 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7501 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7502 &quot;a_key&quot;: &quot;A String&quot;,
7503 },
7504 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7505 # type or metric.
7506 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7507 # or metric.
7508 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7509 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7510 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7511 },
7512 },
7513 ],
7514 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7515 # This property is optional.
7516 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7517 },
7518 ],
7519 },
7520 &quot;getVersionOperationMetadata&quot;: {
7521 &quot;inlineSbomInfo&quot;: {
7522 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7523 # appropriate identifiers.
7524 &quot;a_key&quot;: &quot;A String&quot;,
7525 },
7526 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7527 # identifiers.
7528 &quot;a_key&quot;: &quot;A String&quot;,
7529 },
7530 },
7531 },
7532 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7533 # message that was returned, such as `NOT FOUND`.
7534 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7535 # status code that was returned. For example, a `404` means the
7536 # resource was not found.
7537 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7538 # defined by the server.
7539 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7540 # This value is inRFC3339
7541 # text format.
7542 &quot;instancesBulkInsertOperationMetadata&quot;: {
7543 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7544 # Example key: zones/us-central1-a
7545 &quot;a_key&quot;: {
7546 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7547 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7548 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7549 # error.
7550 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7551 # if the flow is rolling forward or rolling back.
7552 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7553 },
7554 },
7555 },
7556 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7557 # Operation resources.
7558 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7559 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7560 # group of operations results from a `bulkInsert` API request.
7561 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7562 # `update`, or `delete`, and so on.
7563 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7564 # There is no requirement that this be linear or support any granularity of
7565 # operations. This should not be used to guess when the operation will be
7566 # complete. This number should monotonically increase as the operation
7567 # progresses.
7568 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7569 # applicable when performing regional operations.
7570 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7571 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7572 # this field will contain information on all underlying zonal actions and
7573 # their state.
7574 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7575 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7576 # Example key: zones/us-central1-a
7577 &quot;a_key&quot;: {
7578 &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
7579 # populated.
7580 # different programming environments, including REST APIs and RPC APIs. It is
7581 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7582 # three pieces of data: error code, error message, and error details.
7583 #
7584 # You can find out more about this error model and how to work with it in the
7585 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7586 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7587 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7588 # message types for APIs to use.
7589 {
7590 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7591 },
7592 ],
7593 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7594 # user-facing error message should be localized and sent in the
7595 # google.rpc.Status.details field, or localized by the client.
7596 },
7597 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7598 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7599 },
7600 },
7601 },
7602 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7603 # This value is inRFC3339
7604 # text format.
7605 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7606 # following:
7607 # `PENDING`, `RUNNING`, or `DONE`.
7608 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7609 # operation.
7610 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7611 # of the target resource.
7612 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7613 # operations related to creating a snapshot, this points to the disk
7614 # that the snapshot was created from.
7615 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7616 # `[email protected]` or
7617 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7618 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7619 # operation, this field will be populated.
7620 {
7621 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7622 # Engine returns NO_RESULTS_ON_PAGE if there
7623 # are no results in the response.
7624 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7625 # value format. For example:
7626 #
7627 # &quot;data&quot;: [
7628 # {
7629 # &quot;key&quot;: &quot;scope&quot;,
7630 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7631 # }
7632 {
7633 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7634 # returned. For example, for warnings where there are no results in a list
7635 # request for a particular zone, this key might be scope and
7636 # the key value might be the zone name. Other examples might be a key
7637 # indicating a deprecated resource and a suggested replacement, or a
7638 # warning about invalid network settings (for example, if an instance
7639 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7640 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7641 },
7642 ],
7643 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7644 },
7645 ],
7646 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7647 # applicable when performing per-zone operations.
7648 }</pre>
7649 </div>
7650
7651 <div class="method">
7652 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</code>
7653 <pre>Returns permissions that a caller has on the specified resource.
7654
7655 Args:
7656 project: string, Project ID for this request. (required)
7657 resource: string, Name or id of the resource for this request. (required)
7658 body: object, The request body.
7659 The object takes the form of:
7660
7661 {
7662 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with
7663 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
7664 &quot;A String&quot;,
7665 ],
7666 }
7667
7668 x__xgafv: string, V1 error format.
7669 Allowed values
7670 1 - v1 error format
7671 2 - v2 error format
7672
7673 Returns:
7674 An object of the form:
7675
7676 {
7677 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
7678 # allowed.
7679 &quot;A String&quot;,
7680 ],
7681 }</pre>
7682 </div>
7683
7684 </body></html>