Debian Codegraph @

docs/dyn/compute_alpha.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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.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, paths=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;destPorts&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;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
220 #
221 # This field may only be specified when versioned_expr is set to
222 # FIREWALL.
223 {
224 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
225 # required when creating a firewall rule. This value can either be
226 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
227 # protocol number.
228 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
229 # only applicable for UDP or TCP protocol. Each entry must be either
230 # an integer or a range. If not specified, this rule applies to
231 # connections through any port.
232 #
233 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
234 #
235 # This field may only be specified when versioned_expr is set to
236 # FIREWALL.
237 &quot;A String&quot;,
238 ],
239 },
240 ],
241 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
242 # Maximum number of src_ip_ranges allowed is 10.
243 &quot;A String&quot;,
244 ],
245 },
246 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
247 # A CEVAL expression is used to specify match criteria such as origin.ip,
248 # source.region_code and contents in the request header.
249 # Expressions containing `evaluateThreatIntelligence` require a Cloud
250 # Armor Enterprise subscription and are not supported in Edge Policies
251 # nor in Regional Policies. Expressions containing
252 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
253 # Enterprise subscription and are only supported in Global Security
254 # Policies.
255 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
256 # are documented at https://github.com/google/cel-spec.
257 #
258 # Example (Comparison):
259 #
260 # title: &quot;Summary size limit&quot;
261 # description: &quot;Determines if a summary is less than 100 chars&quot;
262 # expression: &quot;document.summary.size() &lt; 100&quot;
263 #
264 # Example (Equality):
265 #
266 # title: &quot;Requestor is owner&quot;
267 # description: &quot;Determines if requestor is the document owner&quot;
268 # expression: &quot;document.owner == request.auth.claims.email&quot;
269 #
270 # Example (Logic):
271 #
272 # title: &quot;Public documents&quot;
273 # description: &quot;Determine whether the document should be publicly visible&quot;
274 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
275 #
276 # Example (Data Manipulation):
277 #
278 # title: &quot;Notification string&quot;
279 # description: &quot;Create a notification string with a timestamp.&quot;
280 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
281 #
282 # The exact variables and functions that may be referenced within an expression
283 # are determined by the service that evaluates it. See the service
284 # documentation for additional information.
285 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
286 # describes the expression, e.g. when hovered over it in a UI.
287 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
288 # syntax.
289 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
290 # reporting, e.g. a file name and a position in the file.
291 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
292 # its purpose. This can be used e.g. in UIs which allow to enter the
293 # expression.
294 },
295 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
296 # CEVAL expression (i.e., &#x27;expr&#x27;).
297 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
298 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
299 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
300 # action-tokens. The provided site keys need to be created from
301 # reCAPTCHA API under the same project where the security policy is
302 # created.
303 &quot;A String&quot;,
304 ],
305 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
306 # session-tokens. The provided site keys need to be created from
307 # reCAPTCHA API under the same project where the security policy is
308 # created.
309 &quot;A String&quot;,
310 ],
311 },
312 },
313 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
314 # If this field is specified, config must also be specified.
315 # Available preconfigured expressions along with their requirements are:
316 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
317 # config.
318 },
319 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
320 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
321 # &#x27;action&#x27; is enforced.
322 #
323 # The match criteria for a rule consists of built-in match fields (like
324 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
325 # (&#x27;userDefinedFields&#x27;).
326 #
327 # Field values may be extracted directly from the packet or derived from it
328 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
329 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
330 # header is found in the packet and the entire field is in bounds.
331 #
332 # Each match field may specify which values can match it, listing one or
333 # more ranges, prefixes, or exact values that are considered a match for
334 # the field. A field value must be present in order to match a specified
335 # match field. If no match values are specified for a match field, then any
336 # field value is considered to match it, and it&#x27;s not required to be
337 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
338 #
339 # For a packet to match a rule, all specified match fields must match the
340 # corresponding field values derived from the packet.
341 #
342 # Example:
343 #
344 # networkMatch:
345 # srcIpRanges:
346 # - &quot;192.0.2.0/24&quot;
347 # - &quot;198.51.100.0/24&quot;
348 # userDefinedFields:
349 # - name: &quot;ipv4_fragment_offset&quot;
350 # values:
351 # - &quot;1-0x1fff&quot;
352 #
353 # The above match condition matches packets with a source IP in
354 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
355 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
356 # against.
357 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
358 # format.
359 &quot;A String&quot;,
360 ],
361 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
362 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
363 &quot;A String&quot;,
364 ],
365 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
366 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
367 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
368 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
369 &quot;A String&quot;,
370 ],
371 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
372 42,
373 ],
374 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
375 &quot;A String&quot;,
376 ],
377 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
378 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
379 &quot;A String&quot;,
380 ],
381 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
382 # IP address.
383 &quot;A String&quot;,
384 ],
385 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
386 # matching values for that field.
387 {
388 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
389 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
390 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
391 # range (e.g. &quot;0x400-0x7ff&quot;).
392 &quot;A String&quot;,
393 ],
394 },
395 ],
396 },
397 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
398 # does not evaluate preconfigured WAF rules, i.e., if
399 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
400 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
401 {
402 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
403 # preconfigured WAF evaluation.
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;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
410 # inspection during preconfigured WAF evaluation.
411 {
412 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
413 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
414 },
415 ],
416 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
417 # inspection during preconfigured WAF evaluation.
418 {
419 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
420 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
421 },
422 ],
423 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
424 # from inspection during preconfigured WAF evaluation. Note that the
425 # parameter can be in the query string or in the POST body.
426 {
427 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
428 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
429 },
430 ],
431 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
432 # inspection during preconfigured WAF evaluation. When specifying this
433 # field, the query or fragment part should be excluded.
434 {
435 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
436 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
437 },
438 ],
439 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
440 # preconfigured WAF exclusion. If omitted, it refers to all the rule
441 # IDs under the WAF rule set.
442 &quot;A String&quot;,
443 ],
444 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
445 },
446 ],
447 },
448 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
449 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
450 # must be a positive value between 0 and 2147483647.
451 # Rules are evaluated from highest to lowest priority where 0 is the
452 # highest priority and 2147483647 is the lowest priority.
453 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
454 # &quot;fairshare&quot;. Cannot be specified for any other actions.
455 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
456 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
457 # the traffic will continue to be banned by the rate limit after the
458 # rate falls below the threshold.
459 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
460 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
461 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
462 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
463 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
464 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
465 },
466 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
467 # threshold. Valid option is &quot;allow&quot; only.
468 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
469 # values are:
470 #
471 # - ALL: A single rate limit threshold is applied to all
472 # the requests matching this rule. This is the default value if
473 # &quot;enforceOnKey&quot; is not configured.
474 # - IP: The source IP address of
475 # the request is the key. Each IP has this limit enforced
476 # separately.
477 # - HTTP_HEADER: The value of the HTTP
478 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
479 # value is truncated to the first 128 bytes of the header value. If no
480 # such header is present in the request, the key type defaults toALL.
481 # - XFF_IP: The first IP address (i.e. the
482 # originating client IP address) specified in the list of IPs under
483 # X-Forwarded-For HTTP header. If no such header is present or the value
484 # is not a valid IP, the key defaults to the source IP address of
485 # the request i.e. key type IP.
486 # - HTTP_COOKIE: The value of the HTTP
487 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
488 # value is truncated to the first 128 bytes of the cookie value. If no
489 # such cookie is present in the request, the key type defaults toALL.
490 # - HTTP_PATH: The URL path of the HTTP request. The key
491 # value is truncated to the first 128 bytes.
492 # - SNI: Server name indication in the TLS session of the
493 # HTTPS request. The key value is truncated to the first 128 bytes. The
494 # key type defaults to ALL on a HTTP session.
495 # - REGION_CODE: The country/region from which the request
496 # originates.
497 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
498 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
499 # key type defaults to ALL.
500 # - USER_IP: The IP address of the originating client,
501 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
502 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
503 # an IP address cannot be resolved from it, the key type defaults toIP.
504 #
505 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
506 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
507 # key type defaults to ALL.
508 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
509 # limit threshold is enforced for all the requests matching the rule.
510 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
511 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
512 # ratelimit threshold/action is enforced. You can specify up to 3
513 # enforce_on_key_configs. If enforce_on_key_configs is specified,
514 # enforce_on_key must not be specified.
515 {
516 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
517 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
518 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
519 # taken as the key value.
520 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
521 # values are:
522 #
523 # - ALL: A single rate limit threshold is applied to all
524 # the requests matching this rule. This is the default value if
525 # &quot;enforceOnKeyConfigs&quot; is not configured.
526 # - IP: The source IP address of
527 # the request is the key. Each IP has this limit enforced
528 # separately.
529 # - HTTP_HEADER: The value of the HTTP
530 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
531 # value is truncated to the first 128 bytes of the header value. If no
532 # such header is present in the request, the key type defaults toALL.
533 # - XFF_IP: The first IP address (i.e. the
534 # originating client IP address) specified in the list of IPs under
535 # X-Forwarded-For HTTP header. If no such header is present or the
536 # value is not a valid IP, the key defaults to the source IP address of
537 # the request i.e. key type IP.
538 # - HTTP_COOKIE: The value of the HTTP
539 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
540 # value is truncated to the first 128 bytes of the cookie value. If no
541 # such cookie is present in the request, the key type defaults toALL.
542 # - HTTP_PATH: The URL path of the HTTP request. The key
543 # value is truncated to the first 128 bytes.
544 # - SNI: Server name indication in the TLS session of
545 # the HTTPS request. The key value is truncated to the first 128 bytes.
546 # The key type defaults to ALL on a HTTP session.
547 # - REGION_CODE: The country/region from which the
548 # request originates.
549 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
550 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
551 # key type defaults to ALL.
552 # - USER_IP: The IP address of the originating client,
553 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
554 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
555 # or an IP address cannot be resolved from it, the key type defaults toIP.
556 #
557 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
558 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
559 # key type defaults to ALL.
560 },
561 ],
562 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
563 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
564 # value.
565 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
566 # value.
567 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
568 # threshold, to either deny with a specified HTTP response code, or
569 # redirect to a different endpoint.
570 # Valid options are `deny(STATUS)`, where valid values for
571 # `STATUS` are 403, 404, 429, and 502, and
572 # `redirect`, where the redirect parameters come from
573 # `exceedRedirectOptions` below.
574 # The `redirect` action is only supported in Global Security Policies of
575 # type CLOUD_ARMOR.
576 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
577 # above the configured rate limit threshold
578 &quot;code&quot;: 42, # The status code, which should be an enum value of
579 # google.rpc.Code.
580 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
581 },
582 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
583 # action. Cannot be specified if the exceed action is not redirect.
584 # This field is only supported in Global Security Policies of type
585 # CLOUD_ARMOR.
586 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
587 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
588 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
589 #
590 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
591 # challenge assessment.
592 # - EXTERNAL_302: redirect to a different URL via a 302
593 # response.
594 },
595 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
596 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
597 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
598 },
599 },
600 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
601 # other actions.
602 # This field is only supported in Global Security Policies of type
603 # CLOUD_ARMOR.
604 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
605 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
606 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
607 #
608 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
609 # challenge assessment.
610 # - EXTERNAL_302: redirect to a different URL via a 302
611 # response.
612 },
613 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
614 # other actions.
615 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
616 # rule.
617 # [Deprecated] Use requiredManagedProtectionTiers instead.
618 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
619 # policy. This can only be set during rule creation, if rule number is not
620 # specified it will be generated by the server.
621 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
622 # policy rule.
623 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
624 # allows you to control which network&#x27;s VMs get this rule. If this field
625 # is left blank, all VMs within the organization will receive the rule.
626 #
627 # This field may only be specified when versioned_expr is set to FIREWALL.
628 &quot;A String&quot;,
629 ],
630 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
631 # applied with this rule.
632 &quot;A String&quot;,
633 ],
634 }
635
636 validateOnly: boolean, If true, the request will not be committed.
637 x__xgafv: string, V1 error format.
638 Allowed values
639 1 - v1 error format
640 2 - v2 error format
641
642 Returns:
643 An object of the form:
644
645 { # Represents an Operation resource.
646 #
647 # Google Compute Engine has three Operation resources:
648 #
649 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
650 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
651 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
652 #
653 # You can use an operation resource to manage asynchronous API requests.
654 # For more information, readHandling
655 # API responses.
656 #
657 # Operations can be global, regional or zonal.
658 #
659 # - For global operations, use the `globalOperations`
660 # resource.
661 # - For regional operations, use the
662 # `regionOperations` resource.
663 # - For zonal operations, use
664 # the `zoneOperations` resource.
665 #
666 #
667 #
668 # For more information, read
669 # Global, Regional, and Zonal Resources.
670 #
671 # Note that completed Operation resources have a limited
672 # retention period.
673 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
674 # Not present otherwise.
675 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
676 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
677 # set when the operation is created.
678 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
679 # text format.
680 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
681 # this field will be populated.
682 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
683 # operation.
684 {
685 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
686 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
687 # details. There is a set of defined message types to use for providing
688 # details.The syntax depends on the error code. For example,
689 # QuotaExceededInfo will have details when the error code is
690 # QUOTA_EXCEEDED.
691 {
692 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
693 #
694 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
695 # is not enabled:
696 #
697 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
698 # &quot;domain&quot;: &quot;googleapis.com&quot;
699 # &quot;metadata&quot;: {
700 # &quot;resource&quot;: &quot;projects/123&quot;,
701 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
702 # }
703 # }
704 #
705 # This response indicates that the pubsub.googleapis.com API is not enabled.
706 #
707 # Example of an error that is returned when attempting to create a Spanner
708 # instance in a region that is out of stock:
709 #
710 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
711 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
712 # &quot;metadata&quot;: {
713 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
714 # }
715 # }
716 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
717 # is typically the registered service name of the tool or product that
718 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
719 # generated by some common infrastructure, the error domain must be a
720 # globally unique value that identifies the infrastructure. For Google API
721 # infrastructure, the error domain is &quot;googleapis.com&quot;.
722 &quot;metadatas&quot;: { # Additional structured details about this error.
723 #
724 # Keys must match a regular expression of `a-z+` but should
725 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
726 # length. When identifying the current value of an exceeded limit, the units
727 # should be contained in the key, not the value. For example, rather than
728 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
729 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
730 # instances that can be created in a single (batch) request.
731 &quot;a_key&quot;: &quot;A String&quot;,
732 },
733 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
734 # proximate cause of the error. Error reasons are unique within a particular
735 # domain of errors. This should be at most 63 characters and match a
736 # regular expression of `A-Z+[A-Z0-9]`, which represents
737 # UPPER_SNAKE_CASE.
738 },
739 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
740 #
741 # For example, if a quota check failed with an error indicating the calling
742 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
743 # directly to the right place in the developer console to flip the bit.
744 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
745 { # Describes a URL link.
746 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
747 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
748 },
749 ],
750 },
751 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
752 # which can be attached to an RPC error.
753 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
754 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
755 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
756 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
757 },
758 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
759 &quot;dimensions&quot;: { # The map holding related quota dimensions.
760 &quot;a_key&quot;: &quot;A String&quot;,
761 },
762 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
763 # type or metric.
764 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
765 # or metric.
766 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
767 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
768 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
769 },
770 },
771 ],
772 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
773 # This property is optional.
774 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
775 },
776 ],
777 },
778 &quot;getVersionOperationMetadata&quot;: {
779 &quot;inlineSbomInfo&quot;: {
780 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
781 # appropriate identifiers.
782 &quot;a_key&quot;: &quot;A String&quot;,
783 },
784 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
785 # identifiers.
786 &quot;a_key&quot;: &quot;A String&quot;,
787 },
788 },
789 },
790 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
791 # message that was returned, such as `NOT FOUND`.
792 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
793 # status code that was returned. For example, a `404` means the
794 # resource was not found.
795 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
796 # defined by the server.
797 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
798 # This value is inRFC3339
799 # text format.
800 &quot;instancesBulkInsertOperationMetadata&quot;: {
801 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
802 # Example key: zones/us-central1-a
803 &quot;a_key&quot;: {
804 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
805 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
806 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
807 # error.
808 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
809 # if the flow is rolling forward or rolling back.
810 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
811 },
812 },
813 },
814 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
815 # Operation resources.
816 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
817 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
818 # group of operations results from a `bulkInsert` API request.
819 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
820 # `update`, or `delete`, and so on.
821 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
822 # There is no requirement that this be linear or support any granularity of
823 # operations. This should not be used to guess when the operation will be
824 # complete. This number should monotonically increase as the operation
825 # progresses.
826 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
827 # applicable when performing regional operations.
828 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
829 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
830 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
831 # this field will contain information on all underlying zonal actions and
832 # their state.
833 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
834 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
835 # Example key: zones/us-central1-a
836 &quot;a_key&quot;: {
837 &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
838 # populated.
839 # different programming environments, including REST APIs and RPC APIs. It is
840 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
841 # three pieces of data: error code, error message, and error details.
842 #
843 # You can find out more about this error model and how to work with it in the
844 # [API Design Guide](https://cloud.google.com/apis/design/errors).
845 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
846 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
847 # message types for APIs to use.
848 {
849 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
850 },
851 ],
852 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
853 # user-facing error message should be localized and sent in the
854 # google.rpc.Status.details field, or localized by the client.
855 },
856 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
857 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
858 },
859 },
860 },
861 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
862 # This value is inRFC3339
863 # text format.
864 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
865 # following:
866 # `PENDING`, `RUNNING`, or `DONE`.
867 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
868 # operation.
869 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
870 # of the target resource.
871 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
872 # operations related to creating a snapshot, this points to the disk
873 # that the snapshot was created from.
874 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
875 # `[email protected]` or
876 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
877 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
878 # operation, this field will be populated.
879 {
880 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
881 # Engine returns NO_RESULTS_ON_PAGE if there
882 # are no results in the response.
883 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
884 # value format. For example:
885 #
886 # &quot;data&quot;: [
887 # {
888 # &quot;key&quot;: &quot;scope&quot;,
889 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
890 # }
891 {
892 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
893 # returned. For example, for warnings where there are no results in a list
894 # request for a particular zone, this key might be scope and
895 # the key value might be the zone name. Other examples might be a key
896 # indicating a deprecated resource and a suggested replacement, or a
897 # warning about invalid network settings (for example, if an instance
898 # attempts to perform IP forwarding but is not enabled for IP forwarding).
899 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
900 },
901 ],
902 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
903 },
904 ],
905 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
906 # applicable when performing per-zone operations.
907 }</pre>
908 </div>
909
910 <div class="method">
911 <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>
912 <pre>Retrieves the list of all SecurityPolicy resources, regional and global,
913 available to the specified project.
914
915 To prevent failure, Google recommends that you set the
916 `returnPartialSuccess` parameter to `true`.
917
918 Args:
919 project: string, Name of the project scoping this request. (required)
920 filter: string, A filter expression that filters resources listed in the response. Most
921 Compute resources support two types of filter expressions:
922 expressions that support regular expressions and expressions that follow
923 API improvement proposal AIP-160.
924 These two types of filter expressions cannot be mixed in one request.
925
926 If you want to use AIP-160, your expression must specify the field name, an
927 operator, and the value that you want to use for filtering. The value
928 must be a string, a number, or a boolean. The operator
929 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
930
931 For example, if you are filtering Compute Engine instances, you can
932 exclude instances named `example-instance` by specifying
933 `name != example-instance`.
934
935 The `:*` comparison can be used to test whether a key has been defined.
936 For example, to find all objects with `owner` label use:
937 ```
938 labels.owner:*
939 ```
940
941 You can also filter nested fields. For example, you could specify
942 `scheduling.automaticRestart = false` to include instances only
943 if they are not scheduled for automatic restarts. You can use filtering
944 on nested fields to filter based onresource labels.
945
946 To filter on multiple expressions, provide each separate expression within
947 parentheses. For example:
948 ```
949 (scheduling.automaticRestart = true)
950 (cpuPlatform = &quot;Intel Skylake&quot;)
951 ```
952 By default, each expression is an `AND` expression. However, you
953 can include `AND` and `OR` expressions explicitly.
954 For example:
955 ```
956 (cpuPlatform = &quot;Intel Skylake&quot;) OR
957 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
958 (scheduling.automaticRestart = true)
959 ```
960
961 If you want to use a regular expression, use the `eq` (equal) or `ne`
962 (not equal) operator against a single un-parenthesized expression with or
963 without quotes or against multiple parenthesized expressions. Examples:
964
965 `fieldname eq unquoted literal`
966 `fieldname eq &#x27;single quoted literal&#x27;`
967 `fieldname eq &quot;double quoted literal&quot;`
968 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
969
970 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
971 The literal value must match the entire field.
972
973 For example, to filter for instances that do not end with name &quot;instance&quot;,
974 you would use `name ne .*instance`.
975
976 You cannot combine constraints on multiple fields using regular
977 expressions.
978 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region,
979 global) should be included in the response. For new resource types added
980 after this field, the flag has no effect as new resource types will always
981 include every visible scope for each scope type in response. For resource
982 types which predate this field, if this flag is omitted or false, only
983 scopes of the scope types where the resource type is expected to be found
984 will be included.
985 maxResults: integer, The maximum number of results per page that should be returned.
986 If the number of available results is larger than `maxResults`,
987 Compute Engine returns a `nextPageToken` that can be used to get
988 the next page of results in subsequent list requests. Acceptable values are
989 `0` to `500`, inclusive. (Default: `500`)
990 orderBy: string, Sorts list results by a certain order. By default, results
991 are returned in alphanumerical order based on the resource name.
992
993 You can also sort results in descending order based on the creation
994 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
995 results based on the `creationTimestamp` field in
996 reverse chronological order (newest result first). Use this to sort
997 resources like operations so that the newest operation is returned first.
998
999 Currently, only sorting by `name` or
1000 `creationTimestamp desc` is supported.
1001 pageToken: string, Specifies a page token to use. Set `pageToken` to the
1002 `nextPageToken` returned by a previous list request to get
1003 the next page of results.
1004 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
1005 of failure. The default value is false.
1006
1007 For example, when partial success behavior is enabled, aggregatedList for a
1008 single zone scope either returns all resources in the zone or no resources,
1009 with an error code.
1010 serviceProjectNumber: string, The Shared VPC service project id or service project number for which
1011 aggregated list request is invoked for subnetworks list-usable api.
1012 x__xgafv: string, V1 error format.
1013 Allowed values
1014 1 - v1 error format
1015 2 - v2 error format
1016
1017 Returns:
1018 An object of the form:
1019
1020 {
1021 &quot;etag&quot;: &quot;A String&quot;,
1022 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1023 &quot;items&quot;: { # A list of SecurityPoliciesScopedList resources.
1024 &quot;a_key&quot;: { # Name of the scope containing this set of security policies.
1025 &quot;securityPolicies&quot;: [ # A list of SecurityPolicies contained in this scope.
1026 { # Represents a Google Cloud Armor security policy resource.
1027 #
1028 # Only external backend services that use load balancers can
1029 # reference a security policy. For more information, see
1030 # Google Cloud Armor security policy overview.
1031 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
1032 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
1033 &quot;confidenceThreshold&quot;: 3.14,
1034 &quot;expirationSec&quot;: 42,
1035 &quot;impactedBaselineThreshold&quot;: 3.14,
1036 &quot;loadThreshold&quot;: 3.14,
1037 },
1038 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
1039 # This field is only supported in Global Security Policies of type
1040 # CLOUD_ARMOR.
1041 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
1042 # This field is only supported in Global Security Policies of type
1043 # CLOUD_ARMOR.
1044 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
1045 # STANDARD - opaque rules. (default)
1046 # PREMIUM - transparent rules.
1047 # This field is only supported in Global Security Policies of type
1048 # CLOUD_ARMOR.
1049 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
1050 # customizable thresholds.
1051 {
1052 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
1053 &quot;autoDeployExpirationSec&quot;: 42,
1054 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
1055 &quot;autoDeployLoadThreshold&quot;: 3.14,
1056 &quot;detectionAbsoluteQps&quot;: 3.14,
1057 &quot;detectionLoadThreshold&quot;: 3.14,
1058 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
1059 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
1060 # The name must be unique within the security policy.
1061 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
1062 # on specified granular traffic units.
1063 { # Configurations to specifc granular traffic units processed by
1064 # Adaptive Protection.
1065 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
1066 # type constitutes a separate traffic unit.
1067 # It can only be set to true if `value` is empty.
1068 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
1069 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
1070 },
1071 ],
1072 },
1073 ],
1074 },
1075 },
1076 &quot;advancedOptionsConfig&quot;: {
1077 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
1078 # json_parsing is set to STANDARD.
1079 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
1080 #
1081 # As per RFC 1341, a Content-Type header value has the following format:
1082 #
1083 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
1084 #
1085 # When configuring a custom Content-Type header value, only the
1086 # type/subtype needs to be specified, and the parameters should be
1087 # excluded.
1088 &quot;A String&quot;,
1089 ],
1090 },
1091 &quot;jsonParsing&quot;: &quot;A String&quot;,
1092 &quot;logLevel&quot;: &quot;A String&quot;,
1093 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
1094 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
1095 # Values are case insensitive.
1096 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
1097 # resolving the callers client IP address.
1098 &quot;A String&quot;,
1099 ],
1100 },
1101 &quot;associations&quot;: [ # A list of associations that belong to this policy.
1102 {
1103 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1104 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
1105 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
1106 &quot;A String&quot;,
1107 ],
1108 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
1109 &quot;A String&quot;,
1110 ],
1111 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1112 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
1113 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
1114 },
1115 ],
1116 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
1117 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
1118 },
1119 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1120 # text format.
1121 &quot;ddosProtectionConfig&quot;: {
1122 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
1123 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
1124 # builds DDoS mitigations that minimize collateral damage. It quantifies
1125 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
1126 # blocked.
1127 #
1128 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
1129 # not be deployed. Using a lower value will prioritize keeping collateral
1130 # damage low, possibly at the cost of its effectiveness in rate limiting
1131 # some or all of the attack. It should typically be unset, so Advanced DDoS
1132 # (and Adaptive Protection) uses the best mitigation it can find. Setting
1133 # the threshold is advised if there are logs for false positive detections
1134 # with high collateral damage, and will cause Advanced DDoS to attempt to
1135 # find a less aggressive rule that satisfies the constraint. If a suitable
1136 # rule cannot be found, the system falls back to either no mitigation for
1137 # smaller attacks or broader network throttles for larger ones.
1138 &quot;ddosProtection&quot;: &quot;A String&quot;,
1139 },
1140 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1141 # create the resource.
1142 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
1143 # unique in the organization in which the security policy is created. This
1144 # should only be used when SecurityPolicyType is FIREWALL.
1145 # The name must be 1-63 characters long, and comply with
1146 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
1147 # characters long and match the regular expression
1148 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
1149 # lowercase letter, and all following characters must be a dash, lowercase
1150 # letter, or digit, except the last character, which cannot be a dash.
1151 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
1152 # the metadata&#x27;s contents and used for optimistic locking. The
1153 # fingerprint is initially generated by Compute Engine and changes after
1154 # every request to modify or update metadata. You must always provide an
1155 # up-to-date fingerprint hash in order to update or change metadata,
1156 # otherwise the request will fail with error412 conditionNotMet.
1157 #
1158 # To see the latest fingerprint, make get() request to the
1159 # security policy.
1160 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1161 # defined by the server.
1162 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
1163 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
1164 # is essentially a hash of the labels set used for optimistic locking. The
1165 # fingerprint is initially generated by Compute Engine and changes after
1166 # every request to modify or update labels. You must always provide an
1167 # up-to-date fingerprint hash in order to update or change labels.
1168 #
1169 # To see the latest fingerprint, make get() request to the
1170 # security policy.
1171 &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.
1172 # Label values may be empty.
1173 &quot;a_key&quot;: &quot;A String&quot;,
1174 },
1175 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
1176 # The name must be 1-63 characters long, and comply withRFC1035.
1177 # Specifically, the name must be 1-63 characters long and match the regular
1178 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
1179 # character must be a lowercase letter, and all following characters must
1180 # be a dash, lowercase letter, or digit, except the last character, which
1181 # cannot be a dash.
1182 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
1183 &quot;recaptchaOptionsConfig&quot;: {
1184 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
1185 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
1186 # the security policy. The specified site key needs to be created from the
1187 # reCAPTCHA API. The user is responsible for the validity of the specified
1188 # site key. If not specified, a Google-managed site key is used.
1189 # This field is only supported in Global Security Policies of type
1190 # CLOUD_ARMOR.
1191 },
1192 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
1193 # resides. This field is not applicable to global security policies.
1194 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
1195 # policy can not exceed a set number of tuples.
1196 &quot;rules&quot;: [ # A list of rules that belong to this policy.
1197 # There must always be a default rule which is a rule with priority
1198 # 2147483647 and match all condition (for the match condition this means
1199 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
1200 # must be either match &quot;*&quot; or not set). If no rules are provided when
1201 # creating a security policy, a default rule with action &quot;allow&quot; will be
1202 # added.
1203 { # Represents a rule that describes one or more match conditions along with
1204 # the action to be taken when traffic matches this condition (allow or deny).
1205 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
1206 # The following are the valid actions:
1207 #
1208 # - allow: allow access to target.
1209 # - deny(STATUS): deny access to target, returns the
1210 # HTTP response code specified. Valid values for `STATUS`
1211 # are 403, 404, and 502.
1212 # - rate_based_ban: limit client traffic to the configured
1213 # threshold and ban the client if the traffic exceeds the threshold.
1214 # Configure parameters for this action in RateLimitOptions. Requires
1215 # rate_limit_options to be set.
1216 # - redirect: redirect to a different target. This can
1217 # either be an internal reCAPTCHA redirect, or an external URL-based
1218 # redirect via a 302 response. Parameters for this action can be configured
1219 # via redirectOptions. This action is only supported in Global Security
1220 # Policies of type CLOUD_ARMOR.
1221 # - throttle: limit
1222 # client traffic to the configured threshold. Configure parameters for this
1223 # action in rateLimitOptions. Requires rate_limit_options to be set for
1224 # this.
1225 # - fairshare (preview only): when traffic reaches the
1226 # threshold limit, requests from the clients matching this rule begin to be
1227 # rate-limited using the Fair Share algorithm. This action is only allowed
1228 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
1229 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1230 # create the resource.
1231 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
1232 # specified when versioned_expr is set to FIREWALL.
1233 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
1234 # enabled, logs will be exported to the configured export destination in
1235 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
1236 # cannot enable logging on &quot;goto_next&quot; rules.
1237 #
1238 # This field may only be specified when the versioned_expr is set to
1239 # FIREWALL.
1240 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
1241 # This field is only supported in Global Security Policies of type
1242 # CLOUD_ARMOR.
1243 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
1244 # present.
1245 {
1246 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
1247 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
1248 },
1249 ],
1250 },
1251 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
1252 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
1253 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1254 # Exactly one field must be specified.
1255 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
1256 # This field must be specified if versioned_expr is specified and cannot
1257 # be specified if versioned_expr is not specified.
1258 &quot;destIpRanges&quot;: [ # CIDR IP address range.
1259 #
1260 # This field may only be specified when versioned_expr is set to
1261 # FIREWALL.
1262 &quot;A String&quot;,
1263 ],
1264 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1265 #
1266 # This field may only be specified when versioned_expr is set to
1267 # FIREWALL.
1268 {
1269 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1270 # required when creating a firewall rule. This value can either be
1271 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
1272 # protocol number.
1273 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
1274 # only applicable for UDP or TCP protocol. Each entry must be either
1275 # an integer or a range. If not specified, this rule applies to
1276 # connections through any port.
1277 #
1278 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1279 #
1280 # This field may only be specified when versioned_expr is set to
1281 # FIREWALL.
1282 &quot;A String&quot;,
1283 ],
1284 },
1285 ],
1286 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
1287 #
1288 # This field may only be specified when versioned_expr is set to
1289 # FIREWALL.
1290 {
1291 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
1292 # required when creating a firewall rule. This value can either be
1293 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
1294 # protocol number.
1295 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
1296 # only applicable for UDP or TCP protocol. Each entry must be either
1297 # an integer or a range. If not specified, this rule applies to
1298 # connections through any port.
1299 #
1300 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1301 #
1302 # This field may only be specified when versioned_expr is set to
1303 # FIREWALL.
1304 &quot;A String&quot;,
1305 ],
1306 },
1307 ],
1308 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
1309 # Maximum number of src_ip_ranges allowed is 10.
1310 &quot;A String&quot;,
1311 ],
1312 },
1313 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
1314 # A CEVAL expression is used to specify match criteria such as origin.ip,
1315 # source.region_code and contents in the request header.
1316 # Expressions containing `evaluateThreatIntelligence` require a Cloud
1317 # Armor Enterprise subscription and are not supported in Edge Policies
1318 # nor in Regional Policies. Expressions containing
1319 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
1320 # Enterprise subscription and are only supported in Global Security
1321 # Policies.
1322 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1323 # are documented at https://github.com/google/cel-spec.
1324 #
1325 # Example (Comparison):
1326 #
1327 # title: &quot;Summary size limit&quot;
1328 # description: &quot;Determines if a summary is less than 100 chars&quot;
1329 # expression: &quot;document.summary.size() &lt; 100&quot;
1330 #
1331 # Example (Equality):
1332 #
1333 # title: &quot;Requestor is owner&quot;
1334 # description: &quot;Determines if requestor is the document owner&quot;
1335 # expression: &quot;document.owner == request.auth.claims.email&quot;
1336 #
1337 # Example (Logic):
1338 #
1339 # title: &quot;Public documents&quot;
1340 # description: &quot;Determine whether the document should be publicly visible&quot;
1341 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1342 #
1343 # Example (Data Manipulation):
1344 #
1345 # title: &quot;Notification string&quot;
1346 # description: &quot;Create a notification string with a timestamp.&quot;
1347 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1348 #
1349 # The exact variables and functions that may be referenced within an expression
1350 # are determined by the service that evaluates it. See the service
1351 # documentation for additional information.
1352 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1353 # describes the expression, e.g. when hovered over it in a UI.
1354 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1355 # syntax.
1356 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1357 # reporting, e.g. a file name and a position in the file.
1358 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1359 # its purpose. This can be used e.g. in UIs which allow to enter the
1360 # expression.
1361 },
1362 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
1363 # CEVAL expression (i.e., &#x27;expr&#x27;).
1364 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
1365 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
1366 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
1367 # action-tokens. The provided site keys need to be created from
1368 # reCAPTCHA API under the same project where the security policy is
1369 # created.
1370 &quot;A String&quot;,
1371 ],
1372 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
1373 # session-tokens. The provided site keys need to be created from
1374 # reCAPTCHA API under the same project where the security policy is
1375 # created.
1376 &quot;A String&quot;,
1377 ],
1378 },
1379 },
1380 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
1381 # If this field is specified, config must also be specified.
1382 # Available preconfigured expressions along with their requirements are:
1383 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
1384 # config.
1385 },
1386 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
1387 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
1388 # &#x27;action&#x27; is enforced.
1389 #
1390 # The match criteria for a rule consists of built-in match fields (like
1391 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
1392 # (&#x27;userDefinedFields&#x27;).
1393 #
1394 # Field values may be extracted directly from the packet or derived from it
1395 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
1396 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
1397 # header is found in the packet and the entire field is in bounds.
1398 #
1399 # Each match field may specify which values can match it, listing one or
1400 # more ranges, prefixes, or exact values that are considered a match for
1401 # the field. A field value must be present in order to match a specified
1402 # match field. If no match values are specified for a match field, then any
1403 # field value is considered to match it, and it&#x27;s not required to be
1404 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
1405 #
1406 # For a packet to match a rule, all specified match fields must match the
1407 # corresponding field values derived from the packet.
1408 #
1409 # Example:
1410 #
1411 # networkMatch:
1412 # srcIpRanges:
1413 # - &quot;192.0.2.0/24&quot;
1414 # - &quot;198.51.100.0/24&quot;
1415 # userDefinedFields:
1416 # - name: &quot;ipv4_fragment_offset&quot;
1417 # values:
1418 # - &quot;1-0x1fff&quot;
1419 #
1420 # The above match condition matches packets with a source IP in
1421 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
1422 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
1423 # against.
1424 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
1425 # format.
1426 &quot;A String&quot;,
1427 ],
1428 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
1429 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
1430 &quot;A String&quot;,
1431 ],
1432 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
1433 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
1434 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
1435 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
1436 &quot;A String&quot;,
1437 ],
1438 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
1439 42,
1440 ],
1441 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
1442 &quot;A String&quot;,
1443 ],
1444 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
1445 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
1446 &quot;A String&quot;,
1447 ],
1448 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
1449 # IP address.
1450 &quot;A String&quot;,
1451 ],
1452 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
1453 # matching values for that field.
1454 {
1455 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
1456 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
1457 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
1458 # range (e.g. &quot;0x400-0x7ff&quot;).
1459 &quot;A String&quot;,
1460 ],
1461 },
1462 ],
1463 },
1464 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
1465 # does not evaluate preconfigured WAF rules, i.e., if
1466 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
1467 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
1468 {
1469 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
1470 # preconfigured WAF evaluation.
1471 {
1472 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1473 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1474 },
1475 ],
1476 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
1477 # inspection during preconfigured WAF evaluation.
1478 {
1479 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1480 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1481 },
1482 ],
1483 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
1484 # inspection during preconfigured WAF evaluation.
1485 {
1486 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1487 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1488 },
1489 ],
1490 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
1491 # from inspection during preconfigured WAF evaluation. Note that the
1492 # parameter can be in the query string or in the POST body.
1493 {
1494 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1495 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1496 },
1497 ],
1498 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
1499 # inspection during preconfigured WAF evaluation. When specifying this
1500 # field, the query or fragment part should be excluded.
1501 {
1502 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
1503 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
1504 },
1505 ],
1506 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
1507 # preconfigured WAF exclusion. If omitted, it refers to all the rule
1508 # IDs under the WAF rule set.
1509 &quot;A String&quot;,
1510 ],
1511 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
1512 },
1513 ],
1514 },
1515 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
1516 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
1517 # must be a positive value between 0 and 2147483647.
1518 # Rules are evaluated from highest to lowest priority where 0 is the
1519 # highest priority and 2147483647 is the lowest priority.
1520 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
1521 # &quot;fairshare&quot;. Cannot be specified for any other actions.
1522 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
1523 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
1524 # the traffic will continue to be banned by the rate limit after the
1525 # rate falls below the threshold.
1526 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
1527 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
1528 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
1529 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
1530 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1531 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1532 },
1533 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
1534 # threshold. Valid option is &quot;allow&quot; only.
1535 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
1536 # values are:
1537 #
1538 # - ALL: A single rate limit threshold is applied to all
1539 # the requests matching this rule. This is the default value if
1540 # &quot;enforceOnKey&quot; is not configured.
1541 # - IP: The source IP address of
1542 # the request is the key. Each IP has this limit enforced
1543 # separately.
1544 # - HTTP_HEADER: The value of the HTTP
1545 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
1546 # value is truncated to the first 128 bytes of the header value. If no
1547 # such header is present in the request, the key type defaults toALL.
1548 # - XFF_IP: The first IP address (i.e. the
1549 # originating client IP address) specified in the list of IPs under
1550 # X-Forwarded-For HTTP header. If no such header is present or the value
1551 # is not a valid IP, the key defaults to the source IP address of
1552 # the request i.e. key type IP.
1553 # - HTTP_COOKIE: The value of the HTTP
1554 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
1555 # value is truncated to the first 128 bytes of the cookie value. If no
1556 # such cookie is present in the request, the key type defaults toALL.
1557 # - HTTP_PATH: The URL path of the HTTP request. The key
1558 # value is truncated to the first 128 bytes.
1559 # - SNI: Server name indication in the TLS session of the
1560 # HTTPS request. The key value is truncated to the first 128 bytes. The
1561 # key type defaults to ALL on a HTTP session.
1562 # - REGION_CODE: The country/region from which the request
1563 # originates.
1564 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
1565 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
1566 # key type defaults to ALL.
1567 # - USER_IP: The IP address of the originating client,
1568 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
1569 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
1570 # an IP address cannot be resolved from it, the key type defaults toIP.
1571 #
1572 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
1573 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
1574 # key type defaults to ALL.
1575 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
1576 # limit threshold is enforced for all the requests matching the rule.
1577 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
1578 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
1579 # ratelimit threshold/action is enforced. You can specify up to 3
1580 # enforce_on_key_configs. If enforce_on_key_configs is specified,
1581 # enforce_on_key must not be specified.
1582 {
1583 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
1584 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
1585 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
1586 # taken as the key value.
1587 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
1588 # values are:
1589 #
1590 # - ALL: A single rate limit threshold is applied to all
1591 # the requests matching this rule. This is the default value if
1592 # &quot;enforceOnKeyConfigs&quot; is not configured.
1593 # - IP: The source IP address of
1594 # the request is the key. Each IP has this limit enforced
1595 # separately.
1596 # - HTTP_HEADER: The value of the HTTP
1597 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
1598 # value is truncated to the first 128 bytes of the header value. If no
1599 # such header is present in the request, the key type defaults toALL.
1600 # - XFF_IP: The first IP address (i.e. the
1601 # originating client IP address) specified in the list of IPs under
1602 # X-Forwarded-For HTTP header. If no such header is present or the
1603 # value is not a valid IP, the key defaults to the source IP address of
1604 # the request i.e. key type IP.
1605 # - HTTP_COOKIE: The value of the HTTP
1606 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
1607 # value is truncated to the first 128 bytes of the cookie value. If no
1608 # such cookie is present in the request, the key type defaults toALL.
1609 # - HTTP_PATH: The URL path of the HTTP request. The key
1610 # value is truncated to the first 128 bytes.
1611 # - SNI: Server name indication in the TLS session of
1612 # the HTTPS request. The key value is truncated to the first 128 bytes.
1613 # The key type defaults to ALL on a HTTP session.
1614 # - REGION_CODE: The country/region from which the
1615 # request originates.
1616 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
1617 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
1618 # key type defaults to ALL.
1619 # - USER_IP: The IP address of the originating client,
1620 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
1621 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
1622 # or an IP address cannot be resolved from it, the key type defaults toIP.
1623 #
1624 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
1625 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
1626 # key type defaults to ALL.
1627 },
1628 ],
1629 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
1630 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
1631 # value.
1632 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
1633 # value.
1634 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
1635 # threshold, to either deny with a specified HTTP response code, or
1636 # redirect to a different endpoint.
1637 # Valid options are `deny(STATUS)`, where valid values for
1638 # `STATUS` are 403, 404, 429, and 502, and
1639 # `redirect`, where the redirect parameters come from
1640 # `exceedRedirectOptions` below.
1641 # The `redirect` action is only supported in Global Security Policies of
1642 # type CLOUD_ARMOR.
1643 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
1644 # above the configured rate limit threshold
1645 &quot;code&quot;: 42, # The status code, which should be an enum value of
1646 # google.rpc.Code.
1647 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
1648 },
1649 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
1650 # action. Cannot be specified if the exceed action is not redirect.
1651 # This field is only supported in Global Security Policies of type
1652 # CLOUD_ARMOR.
1653 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
1654 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1655 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
1656 #
1657 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
1658 # challenge assessment.
1659 # - EXTERNAL_302: redirect to a different URL via a 302
1660 # response.
1661 },
1662 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
1663 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1664 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1665 },
1666 },
1667 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
1668 # other actions.
1669 # This field is only supported in Global Security Policies of type
1670 # CLOUD_ARMOR.
1671 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
1672 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1673 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
1674 #
1675 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
1676 # challenge assessment.
1677 # - EXTERNAL_302: redirect to a different URL via a 302
1678 # response.
1679 },
1680 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
1681 # other actions.
1682 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
1683 # rule.
1684 # [Deprecated] Use requiredManagedProtectionTiers instead.
1685 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
1686 # policy. This can only be set during rule creation, if rule number is not
1687 # specified it will be generated by the server.
1688 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
1689 # policy rule.
1690 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
1691 # allows you to control which network&#x27;s VMs get this rule. If this field
1692 # is left blank, all VMs within the organization will receive the rule.
1693 #
1694 # This field may only be specified when versioned_expr is set to FIREWALL.
1695 &quot;A String&quot;,
1696 ],
1697 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
1698 # applied with this rule.
1699 &quot;A String&quot;,
1700 ],
1701 },
1702 ],
1703 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
1704 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
1705 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
1706 # unique in the organization in which the security policy is created. This
1707 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
1708 # The name must be 1-63 characters long, and comply with
1709 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
1710 # characters long and match the regular expression
1711 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
1712 # lowercase letter, and all following characters must be a dash, lowercase
1713 # letter, or digit, except the last character, which cannot be a dash.
1714 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
1715 #
1716 # - CLOUD_ARMOR: Cloud Armor backend security policies can
1717 # be configured to filter incoming HTTP requests targeting backend services.
1718 # They filter requests before they hit the origin servers.
1719 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
1720 # be configured to filter incoming HTTP requests targeting backend services
1721 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
1722 # They filter requests before the request is served from Google&#x27;s cache.
1723 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
1724 # internal service policies can be configured to filter HTTP requests
1725 # targeting services managed by Traffic Director in a service mesh. They
1726 # filter requests before the request is served from the application.
1727 #
1728 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
1729 # can be configured to filter packets targeting network load balancing
1730 # resources such as backend services, target pools, target instances, and
1731 # instances with external IPs. They filter requests before the request is
1732 # served from the application.
1733 #
1734 #
1735 # This field can be set only at resource creation time.
1736 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
1737 # user-defined field consists of up to 4 bytes extracted from a fixed offset
1738 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
1739 # optional mask to select certain bits. Rules may then specify matching
1740 # values for these fields.
1741 #
1742 # Example:
1743 #
1744 # userDefinedFields:
1745 # - name: &quot;ipv4_fragment_offset&quot;
1746 # base: IPV4
1747 # offset: 6
1748 # size: 2
1749 # mask: &quot;0x1fff&quot;
1750 {
1751 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
1752 #
1753 # - IPV4: Points to the beginning of the IPv4 header.
1754 # - IPV6: Points to the beginning of the IPv6 header.
1755 # - TCP: Points to the beginning of the TCP header, skipping
1756 # over any IPv4 options or IPv6 extension headers. Not present for
1757 # non-first fragments.
1758 # - UDP: Points to the beginning of the UDP header, skipping
1759 # over any IPv4 options or IPv6 extension headers. Not present for
1760 # non-first fragments.
1761 #
1762 #
1763 # required
1764 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
1765 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
1766 # The last byte of the field (in network byte order) corresponds to the
1767 # least significant byte of the mask.
1768 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
1769 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
1770 # &#x27;base&#x27;.
1771 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
1772 },
1773 ],
1774 },
1775 ],
1776 &quot;warning&quot;: { # Informational warning which replaces the list of
1777 # security policies when the list is empty.
1778 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1779 # Engine returns NO_RESULTS_ON_PAGE if there
1780 # are no results in the response.
1781 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1782 # value format. For example:
1783 #
1784 # &quot;data&quot;: [
1785 # {
1786 # &quot;key&quot;: &quot;scope&quot;,
1787 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1788 # }
1789 {
1790 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1791 # returned. For example, for warnings where there are no results in a list
1792 # request for a particular zone, this key might be scope and
1793 # the key value might be the zone name. Other examples might be a key
1794 # indicating a deprecated resource and a suggested replacement, or a
1795 # warning about invalid network settings (for example, if an instance
1796 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1797 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1798 },
1799 ],
1800 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1801 },
1802 },
1803 },
1804 &quot;kind&quot;: &quot;compute#securityPoliciesAggregatedList&quot;, # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyAggregatedList for lists of Security
1805 # Policies.
1806 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
1807 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
1808 # the query parameter pageToken in the next list request.
1809 # Subsequent list requests will have their own nextPageToken to
1810 # continue paging through the results.
1811 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource.
1812 &quot;unreachables&quot;: [ # Output only. [Output Only] Unreachable resources.
1813 &quot;A String&quot;,
1814 ],
1815 &quot;warning&quot;: { # [Output Only] Informational warning message.
1816 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1817 # Engine returns NO_RESULTS_ON_PAGE if there
1818 # are no results in the response.
1819 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1820 # value format. For example:
1821 #
1822 # &quot;data&quot;: [
1823 # {
1824 # &quot;key&quot;: &quot;scope&quot;,
1825 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1826 # }
1827 {
1828 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1829 # returned. For example, for warnings where there are no results in a list
1830 # request for a particular zone, this key might be scope and
1831 # the key value might be the zone name. Other examples might be a key
1832 # indicating a deprecated resource and a suggested replacement, or a
1833 # warning about invalid network settings (for example, if an instance
1834 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1835 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1836 },
1837 ],
1838 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1839 },
1840 }</pre>
1841 </div>
1842
1843 <div class="method">
1844 <code class="details" id="aggregatedList_next">aggregatedList_next()</code>
1845 <pre>Retrieves the next page of results.
1846
1847 Args:
1848 previous_request: The request for the previous page. (required)
1849 previous_response: The response from the request for the previous page. (required)
1850
1851 Returns:
1852 A request object that you can call &#x27;execute()&#x27; on to request the next
1853 page. Returns None if there are no more items in the collection.
1854 </pre>
1855 </div>
1856
1857 <div class="method">
1858 <code class="details" id="close">close()</code>
1859 <pre>Close httplib2 connections.</pre>
1860 </div>
1861
1862 <div class="method">
1863 <code class="details" id="delete">delete(project, securityPolicy, requestId=None, x__xgafv=None)</code>
1864 <pre>Deletes the specified policy.
1865
1866 Args:
1867 project: string, Project ID for this request. (required)
1868 securityPolicy: string, Name of the security policy to delete. (required)
1869 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1870 that if you must retry your request, the server will know to ignore the
1871 request if it has already been completed.
1872
1873 For example, consider a situation where you make an initial request and
1874 the request times out. If you make the request again with the same
1875 request ID, the server can check if original operation with the same
1876 request ID was received, and if so, will ignore the second request. This
1877 prevents clients from accidentally creating duplicate commitments.
1878
1879 The request ID must be
1880 a valid UUID with the exception that zero UUID is not supported
1881 (00000000-0000-0000-0000-000000000000).
1882 x__xgafv: string, V1 error format.
1883 Allowed values
1884 1 - v1 error format
1885 2 - v2 error format
1886
1887 Returns:
1888 An object of the form:
1889
1890 { # Represents an Operation resource.
1891 #
1892 # Google Compute Engine has three Operation resources:
1893 #
1894 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
1895 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
1896 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
1897 #
1898 # You can use an operation resource to manage asynchronous API requests.
1899 # For more information, readHandling
1900 # API responses.
1901 #
1902 # Operations can be global, regional or zonal.
1903 #
1904 # - For global operations, use the `globalOperations`
1905 # resource.
1906 # - For regional operations, use the
1907 # `regionOperations` resource.
1908 # - For zonal operations, use
1909 # the `zoneOperations` resource.
1910 #
1911 #
1912 #
1913 # For more information, read
1914 # Global, Regional, and Zonal Resources.
1915 #
1916 # Note that completed Operation resources have a limited
1917 # retention period.
1918 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1919 # Not present otherwise.
1920 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1921 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1922 # set when the operation is created.
1923 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1924 # text format.
1925 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1926 # this field will be populated.
1927 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1928 # operation.
1929 {
1930 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1931 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1932 # details. There is a set of defined message types to use for providing
1933 # details.The syntax depends on the error code. For example,
1934 # QuotaExceededInfo will have details when the error code is
1935 # QUOTA_EXCEEDED.
1936 {
1937 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1938 #
1939 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1940 # is not enabled:
1941 #
1942 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1943 # &quot;domain&quot;: &quot;googleapis.com&quot;
1944 # &quot;metadata&quot;: {
1945 # &quot;resource&quot;: &quot;projects/123&quot;,
1946 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1947 # }
1948 # }
1949 #
1950 # This response indicates that the pubsub.googleapis.com API is not enabled.
1951 #
1952 # Example of an error that is returned when attempting to create a Spanner
1953 # instance in a region that is out of stock:
1954 #
1955 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1956 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1957 # &quot;metadata&quot;: {
1958 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1959 # }
1960 # }
1961 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1962 # is typically the registered service name of the tool or product that
1963 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1964 # generated by some common infrastructure, the error domain must be a
1965 # globally unique value that identifies the infrastructure. For Google API
1966 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1967 &quot;metadatas&quot;: { # Additional structured details about this error.
1968 #
1969 # Keys must match a regular expression of `a-z+` but should
1970 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1971 # length. When identifying the current value of an exceeded limit, the units
1972 # should be contained in the key, not the value. For example, rather than
1973 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1974 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1975 # instances that can be created in a single (batch) request.
1976 &quot;a_key&quot;: &quot;A String&quot;,
1977 },
1978 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1979 # proximate cause of the error. Error reasons are unique within a particular
1980 # domain of errors. This should be at most 63 characters and match a
1981 # regular expression of `A-Z+[A-Z0-9]`, which represents
1982 # UPPER_SNAKE_CASE.
1983 },
1984 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1985 #
1986 # For example, if a quota check failed with an error indicating the calling
1987 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1988 # directly to the right place in the developer console to flip the bit.
1989 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1990 { # Describes a URL link.
1991 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1992 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1993 },
1994 ],
1995 },
1996 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1997 # which can be attached to an RPC error.
1998 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1999 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
2000 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
2001 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
2002 },
2003 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
2004 &quot;dimensions&quot;: { # The map holding related quota dimensions.
2005 &quot;a_key&quot;: &quot;A String&quot;,
2006 },
2007 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
2008 # type or metric.
2009 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
2010 # or metric.
2011 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
2012 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
2013 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
2014 },
2015 },
2016 ],
2017 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
2018 # This property is optional.
2019 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
2020 },
2021 ],
2022 },
2023 &quot;getVersionOperationMetadata&quot;: {
2024 &quot;inlineSbomInfo&quot;: {
2025 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
2026 # appropriate identifiers.
2027 &quot;a_key&quot;: &quot;A String&quot;,
2028 },
2029 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
2030 # identifiers.
2031 &quot;a_key&quot;: &quot;A String&quot;,
2032 },
2033 },
2034 },
2035 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
2036 # message that was returned, such as `NOT FOUND`.
2037 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
2038 # status code that was returned. For example, a `404` means the
2039 # resource was not found.
2040 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
2041 # defined by the server.
2042 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
2043 # This value is inRFC3339
2044 # text format.
2045 &quot;instancesBulkInsertOperationMetadata&quot;: {
2046 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
2047 # Example key: zones/us-central1-a
2048 &quot;a_key&quot;: {
2049 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
2050 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
2051 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
2052 # error.
2053 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
2054 # if the flow is rolling forward or rolling back.
2055 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
2056 },
2057 },
2058 },
2059 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
2060 # Operation resources.
2061 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2062 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
2063 # group of operations results from a `bulkInsert` API request.
2064 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
2065 # `update`, or `delete`, and so on.
2066 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
2067 # There is no requirement that this be linear or support any granularity of
2068 # operations. This should not be used to guess when the operation will be
2069 # complete. This number should monotonically increase as the operation
2070 # progresses.
2071 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
2072 # applicable when performing regional operations.
2073 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2074 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
2075 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
2076 # this field will contain information on all underlying zonal actions and
2077 # their state.
2078 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
2079 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
2080 # Example key: zones/us-central1-a
2081 &quot;a_key&quot;: {
2082 &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
2083 # populated.
2084 # different programming environments, including REST APIs and RPC APIs. It is
2085 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2086 # three pieces of data: error code, error message, and error details.
2087 #
2088 # You can find out more about this error model and how to work with it in the
2089 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2090 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2091 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2092 # message types for APIs to use.
2093 {
2094 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2095 },
2096 ],
2097 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2098 # user-facing error message should be localized and sent in the
2099 # google.rpc.Status.details field, or localized by the client.
2100 },
2101 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
2102 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
2103 },
2104 },
2105 },
2106 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
2107 # This value is inRFC3339
2108 # text format.
2109 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
2110 # following:
2111 # `PENDING`, `RUNNING`, or `DONE`.
2112 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
2113 # operation.
2114 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
2115 # of the target resource.
2116 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
2117 # operations related to creating a snapshot, this points to the disk
2118 # that the snapshot was created from.
2119 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
2120 # `[email protected]` or
2121 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
2122 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
2123 # operation, this field will be populated.
2124 {
2125 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
2126 # Engine returns NO_RESULTS_ON_PAGE if there
2127 # are no results in the response.
2128 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
2129 # value format. For example:
2130 #
2131 # &quot;data&quot;: [
2132 # {
2133 # &quot;key&quot;: &quot;scope&quot;,
2134 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
2135 # }
2136 {
2137 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
2138 # returned. For example, for warnings where there are no results in a list
2139 # request for a particular zone, this key might be scope and
2140 # the key value might be the zone name. Other examples might be a key
2141 # indicating a deprecated resource and a suggested replacement, or a
2142 # warning about invalid network settings (for example, if an instance
2143 # attempts to perform IP forwarding but is not enabled for IP forwarding).
2144 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2145 },
2146 ],
2147 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2148 },
2149 ],
2150 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
2151 # applicable when performing per-zone operations.
2152 }</pre>
2153 </div>
2154
2155 <div class="method">
2156 <code class="details" id="get">get(project, securityPolicy, x__xgafv=None)</code>
2157 <pre>List all of the ordered rules present in a single specified policy.
2158
2159 Args:
2160 project: string, Project ID for this request. (required)
2161 securityPolicy: string, Name of the security policy to get. (required)
2162 x__xgafv: string, V1 error format.
2163 Allowed values
2164 1 - v1 error format
2165 2 - v2 error format
2166
2167 Returns:
2168 An object of the form:
2169
2170 { # Represents a Google Cloud Armor security policy resource.
2171 #
2172 # Only external backend services that use load balancers can
2173 # reference a security policy. For more information, see
2174 # Google Cloud Armor security policy overview.
2175 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
2176 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
2177 &quot;confidenceThreshold&quot;: 3.14,
2178 &quot;expirationSec&quot;: 42,
2179 &quot;impactedBaselineThreshold&quot;: 3.14,
2180 &quot;loadThreshold&quot;: 3.14,
2181 },
2182 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
2183 # This field is only supported in Global Security Policies of type
2184 # CLOUD_ARMOR.
2185 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
2186 # This field is only supported in Global Security Policies of type
2187 # CLOUD_ARMOR.
2188 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
2189 # STANDARD - opaque rules. (default)
2190 # PREMIUM - transparent rules.
2191 # This field is only supported in Global Security Policies of type
2192 # CLOUD_ARMOR.
2193 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
2194 # customizable thresholds.
2195 {
2196 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
2197 &quot;autoDeployExpirationSec&quot;: 42,
2198 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
2199 &quot;autoDeployLoadThreshold&quot;: 3.14,
2200 &quot;detectionAbsoluteQps&quot;: 3.14,
2201 &quot;detectionLoadThreshold&quot;: 3.14,
2202 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
2203 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
2204 # The name must be unique within the security policy.
2205 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
2206 # on specified granular traffic units.
2207 { # Configurations to specifc granular traffic units processed by
2208 # Adaptive Protection.
2209 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
2210 # type constitutes a separate traffic unit.
2211 # It can only be set to true if `value` is empty.
2212 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
2213 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
2214 },
2215 ],
2216 },
2217 ],
2218 },
2219 },
2220 &quot;advancedOptionsConfig&quot;: {
2221 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
2222 # json_parsing is set to STANDARD.
2223 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
2224 #
2225 # As per RFC 1341, a Content-Type header value has the following format:
2226 #
2227 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
2228 #
2229 # When configuring a custom Content-Type header value, only the
2230 # type/subtype needs to be specified, and the parameters should be
2231 # excluded.
2232 &quot;A String&quot;,
2233 ],
2234 },
2235 &quot;jsonParsing&quot;: &quot;A String&quot;,
2236 &quot;logLevel&quot;: &quot;A String&quot;,
2237 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
2238 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
2239 # Values are case insensitive.
2240 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
2241 # resolving the callers client IP address.
2242 &quot;A String&quot;,
2243 ],
2244 },
2245 &quot;associations&quot;: [ # A list of associations that belong to this policy.
2246 {
2247 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
2248 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
2249 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
2250 &quot;A String&quot;,
2251 ],
2252 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
2253 &quot;A String&quot;,
2254 ],
2255 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
2256 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
2257 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
2258 },
2259 ],
2260 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
2261 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
2262 },
2263 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
2264 # text format.
2265 &quot;ddosProtectionConfig&quot;: {
2266 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
2267 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
2268 # builds DDoS mitigations that minimize collateral damage. It quantifies
2269 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
2270 # blocked.
2271 #
2272 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
2273 # not be deployed. Using a lower value will prioritize keeping collateral
2274 # damage low, possibly at the cost of its effectiveness in rate limiting
2275 # some or all of the attack. It should typically be unset, so Advanced DDoS
2276 # (and Adaptive Protection) uses the best mitigation it can find. Setting
2277 # the threshold is advised if there are logs for false positive detections
2278 # with high collateral damage, and will cause Advanced DDoS to attempt to
2279 # find a less aggressive rule that satisfies the constraint. If a suitable
2280 # rule cannot be found, the system falls back to either no mitigation for
2281 # smaller attacks or broader network throttles for larger ones.
2282 &quot;ddosProtection&quot;: &quot;A String&quot;,
2283 },
2284 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2285 # create the resource.
2286 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
2287 # unique in the organization in which the security policy is created. This
2288 # should only be used when SecurityPolicyType is FIREWALL.
2289 # The name must be 1-63 characters long, and comply with
2290 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
2291 # characters long and match the regular expression
2292 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
2293 # lowercase letter, and all following characters must be a dash, lowercase
2294 # letter, or digit, except the last character, which cannot be a dash.
2295 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
2296 # the metadata&#x27;s contents and used for optimistic locking. The
2297 # fingerprint is initially generated by Compute Engine and changes after
2298 # every request to modify or update metadata. You must always provide an
2299 # up-to-date fingerprint hash in order to update or change metadata,
2300 # otherwise the request will fail with error412 conditionNotMet.
2301 #
2302 # To see the latest fingerprint, make get() request to the
2303 # security policy.
2304 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
2305 # defined by the server.
2306 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
2307 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
2308 # is essentially a hash of the labels set used for optimistic locking. The
2309 # fingerprint is initially generated by Compute Engine and changes after
2310 # every request to modify or update labels. You must always provide an
2311 # up-to-date fingerprint hash in order to update or change labels.
2312 #
2313 # To see the latest fingerprint, make get() request to the
2314 # security policy.
2315 &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.
2316 # Label values may be empty.
2317 &quot;a_key&quot;: &quot;A String&quot;,
2318 },
2319 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
2320 # The name must be 1-63 characters long, and comply withRFC1035.
2321 # Specifically, the name must be 1-63 characters long and match the regular
2322 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
2323 # character must be a lowercase letter, and all following characters must
2324 # be a dash, lowercase letter, or digit, except the last character, which
2325 # cannot be a dash.
2326 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
2327 &quot;recaptchaOptionsConfig&quot;: {
2328 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
2329 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
2330 # the security policy. The specified site key needs to be created from the
2331 # reCAPTCHA API. The user is responsible for the validity of the specified
2332 # site key. If not specified, a Google-managed site key is used.
2333 # This field is only supported in Global Security Policies of type
2334 # CLOUD_ARMOR.
2335 },
2336 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
2337 # resides. This field is not applicable to global security policies.
2338 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
2339 # policy can not exceed a set number of tuples.
2340 &quot;rules&quot;: [ # A list of rules that belong to this policy.
2341 # There must always be a default rule which is a rule with priority
2342 # 2147483647 and match all condition (for the match condition this means
2343 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
2344 # must be either match &quot;*&quot; or not set). If no rules are provided when
2345 # creating a security policy, a default rule with action &quot;allow&quot; will be
2346 # added.
2347 { # Represents a rule that describes one or more match conditions along with
2348 # the action to be taken when traffic matches this condition (allow or deny).
2349 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2350 # The following are the valid actions:
2351 #
2352 # - allow: allow access to target.
2353 # - deny(STATUS): deny access to target, returns the
2354 # HTTP response code specified. Valid values for `STATUS`
2355 # are 403, 404, and 502.
2356 # - rate_based_ban: limit client traffic to the configured
2357 # threshold and ban the client if the traffic exceeds the threshold.
2358 # Configure parameters for this action in RateLimitOptions. Requires
2359 # rate_limit_options to be set.
2360 # - redirect: redirect to a different target. This can
2361 # either be an internal reCAPTCHA redirect, or an external URL-based
2362 # redirect via a 302 response. Parameters for this action can be configured
2363 # via redirectOptions. This action is only supported in Global Security
2364 # Policies of type CLOUD_ARMOR.
2365 # - throttle: limit
2366 # client traffic to the configured threshold. Configure parameters for this
2367 # action in rateLimitOptions. Requires rate_limit_options to be set for
2368 # this.
2369 # - fairshare (preview only): when traffic reaches the
2370 # threshold limit, requests from the clients matching this rule begin to be
2371 # rate-limited using the Fair Share algorithm. This action is only allowed
2372 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2373 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2374 # create the resource.
2375 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
2376 # specified when versioned_expr is set to FIREWALL.
2377 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
2378 # enabled, logs will be exported to the configured export destination in
2379 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
2380 # cannot enable logging on &quot;goto_next&quot; rules.
2381 #
2382 # This field may only be specified when the versioned_expr is set to
2383 # FIREWALL.
2384 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2385 # This field is only supported in Global Security Policies of type
2386 # CLOUD_ARMOR.
2387 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2388 # present.
2389 {
2390 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2391 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2392 },
2393 ],
2394 },
2395 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2396 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2397 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2398 # Exactly one field must be specified.
2399 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2400 # This field must be specified if versioned_expr is specified and cannot
2401 # be specified if versioned_expr is not specified.
2402 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2403 #
2404 # This field may only be specified when versioned_expr is set to
2405 # FIREWALL.
2406 &quot;A String&quot;,
2407 ],
2408 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2409 #
2410 # This field may only be specified when versioned_expr is set to
2411 # FIREWALL.
2412 {
2413 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2414 # required when creating a firewall rule. This value can either be
2415 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2416 # protocol number.
2417 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2418 # only applicable for UDP or TCP protocol. Each entry must be either
2419 # an integer or a range. If not specified, this rule applies to
2420 # connections through any port.
2421 #
2422 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2423 #
2424 # This field may only be specified when versioned_expr is set to
2425 # FIREWALL.
2426 &quot;A String&quot;,
2427 ],
2428 },
2429 ],
2430 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2431 #
2432 # This field may only be specified when versioned_expr is set to
2433 # FIREWALL.
2434 {
2435 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
2436 # required when creating a firewall rule. This value can either be
2437 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
2438 # protocol number.
2439 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
2440 # only applicable for UDP or TCP protocol. Each entry must be either
2441 # an integer or a range. If not specified, this rule applies to
2442 # connections through any port.
2443 #
2444 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2445 #
2446 # This field may only be specified when versioned_expr is set to
2447 # FIREWALL.
2448 &quot;A String&quot;,
2449 ],
2450 },
2451 ],
2452 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2453 # Maximum number of src_ip_ranges allowed is 10.
2454 &quot;A String&quot;,
2455 ],
2456 },
2457 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
2458 # A CEVAL expression is used to specify match criteria such as origin.ip,
2459 # source.region_code and contents in the request header.
2460 # Expressions containing `evaluateThreatIntelligence` require a Cloud
2461 # Armor Enterprise subscription and are not supported in Edge Policies
2462 # nor in Regional Policies. Expressions containing
2463 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
2464 # Enterprise subscription and are only supported in Global Security
2465 # Policies.
2466 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2467 # are documented at https://github.com/google/cel-spec.
2468 #
2469 # Example (Comparison):
2470 #
2471 # title: &quot;Summary size limit&quot;
2472 # description: &quot;Determines if a summary is less than 100 chars&quot;
2473 # expression: &quot;document.summary.size() &lt; 100&quot;
2474 #
2475 # Example (Equality):
2476 #
2477 # title: &quot;Requestor is owner&quot;
2478 # description: &quot;Determines if requestor is the document owner&quot;
2479 # expression: &quot;document.owner == request.auth.claims.email&quot;
2480 #
2481 # Example (Logic):
2482 #
2483 # title: &quot;Public documents&quot;
2484 # description: &quot;Determine whether the document should be publicly visible&quot;
2485 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2486 #
2487 # Example (Data Manipulation):
2488 #
2489 # title: &quot;Notification string&quot;
2490 # description: &quot;Create a notification string with a timestamp.&quot;
2491 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2492 #
2493 # The exact variables and functions that may be referenced within an expression
2494 # are determined by the service that evaluates it. See the service
2495 # documentation for additional information.
2496 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2497 # describes the expression, e.g. when hovered over it in a UI.
2498 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2499 # syntax.
2500 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2501 # reporting, e.g. a file name and a position in the file.
2502 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2503 # its purpose. This can be used e.g. in UIs which allow to enter the
2504 # expression.
2505 },
2506 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
2507 # CEVAL expression (i.e., &#x27;expr&#x27;).
2508 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
2509 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
2510 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2511 # action-tokens. The provided site keys need to be created from
2512 # reCAPTCHA API under the same project where the security policy is
2513 # created.
2514 &quot;A String&quot;,
2515 ],
2516 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
2517 # session-tokens. The provided site keys need to be created from
2518 # reCAPTCHA API under the same project where the security policy is
2519 # created.
2520 &quot;A String&quot;,
2521 ],
2522 },
2523 },
2524 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
2525 # If this field is specified, config must also be specified.
2526 # Available preconfigured expressions along with their requirements are:
2527 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
2528 # config.
2529 },
2530 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
2531 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
2532 # &#x27;action&#x27; is enforced.
2533 #
2534 # The match criteria for a rule consists of built-in match fields (like
2535 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
2536 # (&#x27;userDefinedFields&#x27;).
2537 #
2538 # Field values may be extracted directly from the packet or derived from it
2539 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
2540 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
2541 # header is found in the packet and the entire field is in bounds.
2542 #
2543 # Each match field may specify which values can match it, listing one or
2544 # more ranges, prefixes, or exact values that are considered a match for
2545 # the field. A field value must be present in order to match a specified
2546 # match field. If no match values are specified for a match field, then any
2547 # field value is considered to match it, and it&#x27;s not required to be
2548 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
2549 #
2550 # For a packet to match a rule, all specified match fields must match the
2551 # corresponding field values derived from the packet.
2552 #
2553 # Example:
2554 #
2555 # networkMatch:
2556 # srcIpRanges:
2557 # - &quot;192.0.2.0/24&quot;
2558 # - &quot;198.51.100.0/24&quot;
2559 # userDefinedFields:
2560 # - name: &quot;ipv4_fragment_offset&quot;
2561 # values:
2562 # - &quot;1-0x1fff&quot;
2563 #
2564 # The above match condition matches packets with a source IP in
2565 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
2566 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
2567 # against.
2568 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
2569 # format.
2570 &quot;A String&quot;,
2571 ],
2572 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2573 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2574 &quot;A String&quot;,
2575 ],
2576 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
2577 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
2578 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
2579 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
2580 &quot;A String&quot;,
2581 ],
2582 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
2583 42,
2584 ],
2585 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
2586 &quot;A String&quot;,
2587 ],
2588 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
2589 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
2590 &quot;A String&quot;,
2591 ],
2592 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
2593 # IP address.
2594 &quot;A String&quot;,
2595 ],
2596 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
2597 # matching values for that field.
2598 {
2599 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
2600 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
2601 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
2602 # range (e.g. &quot;0x400-0x7ff&quot;).
2603 &quot;A String&quot;,
2604 ],
2605 },
2606 ],
2607 },
2608 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
2609 # does not evaluate preconfigured WAF rules, i.e., if
2610 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
2611 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
2612 {
2613 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
2614 # preconfigured WAF evaluation.
2615 {
2616 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2617 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2618 },
2619 ],
2620 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
2621 # inspection during preconfigured WAF evaluation.
2622 {
2623 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2624 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2625 },
2626 ],
2627 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
2628 # inspection during preconfigured WAF evaluation.
2629 {
2630 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2631 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2632 },
2633 ],
2634 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
2635 # from inspection during preconfigured WAF evaluation. Note that the
2636 # parameter can be in the query string or in the POST body.
2637 {
2638 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2639 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2640 },
2641 ],
2642 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
2643 # inspection during preconfigured WAF evaluation. When specifying this
2644 # field, the query or fragment part should be excluded.
2645 {
2646 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
2647 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
2648 },
2649 ],
2650 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
2651 # preconfigured WAF exclusion. If omitted, it refers to all the rule
2652 # IDs under the WAF rule set.
2653 &quot;A String&quot;,
2654 ],
2655 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
2656 },
2657 ],
2658 },
2659 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2660 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
2661 # must be a positive value between 0 and 2147483647.
2662 # Rules are evaluated from highest to lowest priority where 0 is the
2663 # highest priority and 2147483647 is the lowest priority.
2664 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
2665 # &quot;fairshare&quot;. Cannot be specified for any other actions.
2666 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
2667 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
2668 # the traffic will continue to be banned by the rate limit after the
2669 # rate falls below the threshold.
2670 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
2671 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
2672 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
2673 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2674 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2675 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2676 },
2677 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
2678 # threshold. Valid option is &quot;allow&quot; only.
2679 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2680 # values are:
2681 #
2682 # - ALL: A single rate limit threshold is applied to all
2683 # the requests matching this rule. This is the default value if
2684 # &quot;enforceOnKey&quot; is not configured.
2685 # - IP: The source IP address of
2686 # the request is the key. Each IP has this limit enforced
2687 # separately.
2688 # - HTTP_HEADER: The value of the HTTP
2689 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2690 # value is truncated to the first 128 bytes of the header value. If no
2691 # such header is present in the request, the key type defaults toALL.
2692 # - XFF_IP: The first IP address (i.e. the
2693 # originating client IP address) specified in the list of IPs under
2694 # X-Forwarded-For HTTP header. If no such header is present or the value
2695 # is not a valid IP, the key defaults to the source IP address of
2696 # the request i.e. key type IP.
2697 # - HTTP_COOKIE: The value of the HTTP
2698 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2699 # value is truncated to the first 128 bytes of the cookie value. If no
2700 # such cookie is present in the request, the key type defaults toALL.
2701 # - HTTP_PATH: The URL path of the HTTP request. The key
2702 # value is truncated to the first 128 bytes.
2703 # - SNI: Server name indication in the TLS session of the
2704 # HTTPS request. The key value is truncated to the first 128 bytes. The
2705 # key type defaults to ALL on a HTTP session.
2706 # - REGION_CODE: The country/region from which the request
2707 # originates.
2708 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2709 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2710 # key type defaults to ALL.
2711 # - USER_IP: The IP address of the originating client,
2712 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2713 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
2714 # an IP address cannot be resolved from it, the key type defaults toIP.
2715 #
2716 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2717 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2718 # key type defaults to ALL.
2719 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
2720 # limit threshold is enforced for all the requests matching the rule.
2721 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
2722 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
2723 # ratelimit threshold/action is enforced. You can specify up to 3
2724 # enforce_on_key_configs. If enforce_on_key_configs is specified,
2725 # enforce_on_key must not be specified.
2726 {
2727 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2728 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
2729 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
2730 # taken as the key value.
2731 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
2732 # values are:
2733 #
2734 # - ALL: A single rate limit threshold is applied to all
2735 # the requests matching this rule. This is the default value if
2736 # &quot;enforceOnKeyConfigs&quot; is not configured.
2737 # - IP: The source IP address of
2738 # the request is the key. Each IP has this limit enforced
2739 # separately.
2740 # - HTTP_HEADER: The value of the HTTP
2741 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
2742 # value is truncated to the first 128 bytes of the header value. If no
2743 # such header is present in the request, the key type defaults toALL.
2744 # - XFF_IP: The first IP address (i.e. the
2745 # originating client IP address) specified in the list of IPs under
2746 # X-Forwarded-For HTTP header. If no such header is present or the
2747 # value is not a valid IP, the key defaults to the source IP address of
2748 # the request i.e. key type IP.
2749 # - HTTP_COOKIE: The value of the HTTP
2750 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
2751 # value is truncated to the first 128 bytes of the cookie value. If no
2752 # such cookie is present in the request, the key type defaults toALL.
2753 # - HTTP_PATH: The URL path of the HTTP request. The key
2754 # value is truncated to the first 128 bytes.
2755 # - SNI: Server name indication in the TLS session of
2756 # the HTTPS request. The key value is truncated to the first 128 bytes.
2757 # The key type defaults to ALL on a HTTP session.
2758 # - REGION_CODE: The country/region from which the
2759 # request originates.
2760 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
2761 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2762 # key type defaults to ALL.
2763 # - USER_IP: The IP address of the originating client,
2764 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
2765 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
2766 # or an IP address cannot be resolved from it, the key type defaults toIP.
2767 #
2768 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
2769 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
2770 # key type defaults to ALL.
2771 },
2772 ],
2773 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
2774 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
2775 # value.
2776 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
2777 # value.
2778 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
2779 # threshold, to either deny with a specified HTTP response code, or
2780 # redirect to a different endpoint.
2781 # Valid options are `deny(STATUS)`, where valid values for
2782 # `STATUS` are 403, 404, 429, and 502, and
2783 # `redirect`, where the redirect parameters come from
2784 # `exceedRedirectOptions` below.
2785 # The `redirect` action is only supported in Global Security Policies of
2786 # type CLOUD_ARMOR.
2787 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
2788 # above the configured rate limit threshold
2789 &quot;code&quot;: 42, # The status code, which should be an enum value of
2790 # google.rpc.Code.
2791 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
2792 },
2793 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
2794 # action. Cannot be specified if the exceed action is not redirect.
2795 # This field is only supported in Global Security Policies of type
2796 # CLOUD_ARMOR.
2797 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2798 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2799 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2800 #
2801 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2802 # challenge assessment.
2803 # - EXTERNAL_302: redirect to a different URL via a 302
2804 # response.
2805 },
2806 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
2807 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2808 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2809 },
2810 },
2811 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
2812 # other actions.
2813 # This field is only supported in Global Security Policies of type
2814 # CLOUD_ARMOR.
2815 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
2816 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
2817 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
2818 #
2819 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
2820 # challenge assessment.
2821 # - EXTERNAL_302: redirect to a different URL via a 302
2822 # response.
2823 },
2824 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
2825 # other actions.
2826 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
2827 # rule.
2828 # [Deprecated] Use requiredManagedProtectionTiers instead.
2829 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
2830 # policy. This can only be set during rule creation, if rule number is not
2831 # specified it will be generated by the server.
2832 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
2833 # policy rule.
2834 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
2835 # allows you to control which network&#x27;s VMs get this rule. If this field
2836 # is left blank, all VMs within the organization will receive the rule.
2837 #
2838 # This field may only be specified when versioned_expr is set to FIREWALL.
2839 &quot;A String&quot;,
2840 ],
2841 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
2842 # applied with this rule.
2843 &quot;A String&quot;,
2844 ],
2845 },
2846 ],
2847 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
2848 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
2849 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
2850 # unique in the organization in which the security policy is created. This
2851 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
2852 # The name must be 1-63 characters long, and comply with
2853 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
2854 # characters long and match the regular expression
2855 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
2856 # lowercase letter, and all following characters must be a dash, lowercase
2857 # letter, or digit, except the last character, which cannot be a dash.
2858 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
2859 #
2860 # - CLOUD_ARMOR: Cloud Armor backend security policies can
2861 # be configured to filter incoming HTTP requests targeting backend services.
2862 # They filter requests before they hit the origin servers.
2863 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
2864 # be configured to filter incoming HTTP requests targeting backend services
2865 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
2866 # They filter requests before the request is served from Google&#x27;s cache.
2867 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
2868 # internal service policies can be configured to filter HTTP requests
2869 # targeting services managed by Traffic Director in a service mesh. They
2870 # filter requests before the request is served from the application.
2871 #
2872 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
2873 # can be configured to filter packets targeting network load balancing
2874 # resources such as backend services, target pools, target instances, and
2875 # instances with external IPs. They filter requests before the request is
2876 # served from the application.
2877 #
2878 #
2879 # This field can be set only at resource creation time.
2880 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
2881 # user-defined field consists of up to 4 bytes extracted from a fixed offset
2882 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
2883 # optional mask to select certain bits. Rules may then specify matching
2884 # values for these fields.
2885 #
2886 # Example:
2887 #
2888 # userDefinedFields:
2889 # - name: &quot;ipv4_fragment_offset&quot;
2890 # base: IPV4
2891 # offset: 6
2892 # size: 2
2893 # mask: &quot;0x1fff&quot;
2894 {
2895 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
2896 #
2897 # - IPV4: Points to the beginning of the IPv4 header.
2898 # - IPV6: Points to the beginning of the IPv6 header.
2899 # - TCP: Points to the beginning of the TCP header, skipping
2900 # over any IPv4 options or IPv6 extension headers. Not present for
2901 # non-first fragments.
2902 # - UDP: Points to the beginning of the UDP header, skipping
2903 # over any IPv4 options or IPv6 extension headers. Not present for
2904 # non-first fragments.
2905 #
2906 #
2907 # required
2908 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
2909 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
2910 # The last byte of the field (in network byte order) corresponds to the
2911 # least significant byte of the mask.
2912 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
2913 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
2914 # &#x27;base&#x27;.
2915 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
2916 },
2917 ],
2918 }</pre>
2919 </div>
2920
2921 <div class="method">
2922 <code class="details" id="getRule">getRule(project, securityPolicy, priority=None, x__xgafv=None)</code>
2923 <pre>Gets a rule at the specified priority.
2924
2925 Args:
2926 project: string, Project ID for this request. (required)
2927 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
2928 priority: integer, The priority of the rule to get from the security policy.
2929 x__xgafv: string, V1 error format.
2930 Allowed values
2931 1 - v1 error format
2932 2 - v2 error format
2933
2934 Returns:
2935 An object of the form:
2936
2937 { # Represents a rule that describes one or more match conditions along with
2938 # the action to be taken when traffic matches this condition (allow or deny).
2939 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
2940 # The following are the valid actions:
2941 #
2942 # - allow: allow access to target.
2943 # - deny(STATUS): deny access to target, returns the
2944 # HTTP response code specified. Valid values for `STATUS`
2945 # are 403, 404, and 502.
2946 # - rate_based_ban: limit client traffic to the configured
2947 # threshold and ban the client if the traffic exceeds the threshold.
2948 # Configure parameters for this action in RateLimitOptions. Requires
2949 # rate_limit_options to be set.
2950 # - redirect: redirect to a different target. This can
2951 # either be an internal reCAPTCHA redirect, or an external URL-based
2952 # redirect via a 302 response. Parameters for this action can be configured
2953 # via redirectOptions. This action is only supported in Global Security
2954 # Policies of type CLOUD_ARMOR.
2955 # - throttle: limit
2956 # client traffic to the configured threshold. Configure parameters for this
2957 # action in rateLimitOptions. Requires rate_limit_options to be set for
2958 # this.
2959 # - fairshare (preview only): when traffic reaches the
2960 # threshold limit, requests from the clients matching this rule begin to be
2961 # rate-limited using the Fair Share algorithm. This action is only allowed
2962 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
2963 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2964 # create the resource.
2965 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
2966 # specified when versioned_expr is set to FIREWALL.
2967 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
2968 # enabled, logs will be exported to the configured export destination in
2969 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
2970 # cannot enable logging on &quot;goto_next&quot; rules.
2971 #
2972 # This field may only be specified when the versioned_expr is set to
2973 # FIREWALL.
2974 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
2975 # This field is only supported in Global Security Policies of type
2976 # CLOUD_ARMOR.
2977 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
2978 # present.
2979 {
2980 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
2981 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
2982 },
2983 ],
2984 },
2985 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
2986 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
2987 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
2988 # Exactly one field must be specified.
2989 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
2990 # This field must be specified if versioned_expr is specified and cannot
2991 # be specified if versioned_expr is not specified.
2992 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2993 #
2994 # This field may only be specified when versioned_expr is set to
2995 # FIREWALL.
2996 &quot;A String&quot;,
2997 ],
2998 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2999 #
3000 # This field may only be specified when versioned_expr is set to
3001 # FIREWALL.
3002 {
3003 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
3004 # required when creating a firewall rule. This value can either be
3005 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
3006 # protocol number.
3007 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
3008 # only applicable for UDP or TCP protocol. Each entry must be either
3009 # an integer or a range. If not specified, this rule applies to
3010 # connections through any port.
3011 #
3012 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
3013 #
3014 # This field may only be specified when versioned_expr is set to
3015 # FIREWALL.
3016 &quot;A String&quot;,
3017 ],
3018 },
3019 ],
3020 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
3021 #
3022 # This field may only be specified when versioned_expr is set to
3023 # FIREWALL.
3024 {
3025 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
3026 # required when creating a firewall rule. This value can either be
3027 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
3028 # protocol number.
3029 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
3030 # only applicable for UDP or TCP protocol. Each entry must be either
3031 # an integer or a range. If not specified, this rule applies to
3032 # connections through any port.
3033 #
3034 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
3035 #
3036 # This field may only be specified when versioned_expr is set to
3037 # FIREWALL.
3038 &quot;A String&quot;,
3039 ],
3040 },
3041 ],
3042 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
3043 # Maximum number of src_ip_ranges allowed is 10.
3044 &quot;A String&quot;,
3045 ],
3046 },
3047 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
3048 # A CEVAL expression is used to specify match criteria such as origin.ip,
3049 # source.region_code and contents in the request header.
3050 # Expressions containing `evaluateThreatIntelligence` require a Cloud
3051 # Armor Enterprise subscription and are not supported in Edge Policies
3052 # nor in Regional Policies. Expressions containing
3053 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
3054 # Enterprise subscription and are only supported in Global Security
3055 # Policies.
3056 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3057 # are documented at https://github.com/google/cel-spec.
3058 #
3059 # Example (Comparison):
3060 #
3061 # title: &quot;Summary size limit&quot;
3062 # description: &quot;Determines if a summary is less than 100 chars&quot;
3063 # expression: &quot;document.summary.size() &lt; 100&quot;
3064 #
3065 # Example (Equality):
3066 #
3067 # title: &quot;Requestor is owner&quot;
3068 # description: &quot;Determines if requestor is the document owner&quot;
3069 # expression: &quot;document.owner == request.auth.claims.email&quot;
3070 #
3071 # Example (Logic):
3072 #
3073 # title: &quot;Public documents&quot;
3074 # description: &quot;Determine whether the document should be publicly visible&quot;
3075 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3076 #
3077 # Example (Data Manipulation):
3078 #
3079 # title: &quot;Notification string&quot;
3080 # description: &quot;Create a notification string with a timestamp.&quot;
3081 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3082 #
3083 # The exact variables and functions that may be referenced within an expression
3084 # are determined by the service that evaluates it. See the service
3085 # documentation for additional information.
3086 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3087 # describes the expression, e.g. when hovered over it in a UI.
3088 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3089 # syntax.
3090 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3091 # reporting, e.g. a file name and a position in the file.
3092 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3093 # its purpose. This can be used e.g. in UIs which allow to enter the
3094 # expression.
3095 },
3096 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
3097 # CEVAL expression (i.e., &#x27;expr&#x27;).
3098 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
3099 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
3100 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3101 # action-tokens. The provided site keys need to be created from
3102 # reCAPTCHA API under the same project where the security policy is
3103 # created.
3104 &quot;A String&quot;,
3105 ],
3106 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3107 # session-tokens. The provided site keys need to be created from
3108 # reCAPTCHA API under the same project where the security policy is
3109 # created.
3110 &quot;A String&quot;,
3111 ],
3112 },
3113 },
3114 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
3115 # If this field is specified, config must also be specified.
3116 # Available preconfigured expressions along with their requirements are:
3117 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
3118 # config.
3119 },
3120 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
3121 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
3122 # &#x27;action&#x27; is enforced.
3123 #
3124 # The match criteria for a rule consists of built-in match fields (like
3125 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
3126 # (&#x27;userDefinedFields&#x27;).
3127 #
3128 # Field values may be extracted directly from the packet or derived from it
3129 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
3130 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
3131 # header is found in the packet and the entire field is in bounds.
3132 #
3133 # Each match field may specify which values can match it, listing one or
3134 # more ranges, prefixes, or exact values that are considered a match for
3135 # the field. A field value must be present in order to match a specified
3136 # match field. If no match values are specified for a match field, then any
3137 # field value is considered to match it, and it&#x27;s not required to be
3138 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
3139 #
3140 # For a packet to match a rule, all specified match fields must match the
3141 # corresponding field values derived from the packet.
3142 #
3143 # Example:
3144 #
3145 # networkMatch:
3146 # srcIpRanges:
3147 # - &quot;192.0.2.0/24&quot;
3148 # - &quot;198.51.100.0/24&quot;
3149 # userDefinedFields:
3150 # - name: &quot;ipv4_fragment_offset&quot;
3151 # values:
3152 # - &quot;1-0x1fff&quot;
3153 #
3154 # The above match condition matches packets with a source IP in
3155 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
3156 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
3157 # against.
3158 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
3159 # format.
3160 &quot;A String&quot;,
3161 ],
3162 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3163 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3164 &quot;A String&quot;,
3165 ],
3166 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
3167 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
3168 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
3169 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
3170 &quot;A String&quot;,
3171 ],
3172 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
3173 42,
3174 ],
3175 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
3176 &quot;A String&quot;,
3177 ],
3178 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3179 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3180 &quot;A String&quot;,
3181 ],
3182 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
3183 # IP address.
3184 &quot;A String&quot;,
3185 ],
3186 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
3187 # matching values for that field.
3188 {
3189 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
3190 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
3191 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
3192 # range (e.g. &quot;0x400-0x7ff&quot;).
3193 &quot;A String&quot;,
3194 ],
3195 },
3196 ],
3197 },
3198 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
3199 # does not evaluate preconfigured WAF rules, i.e., if
3200 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
3201 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
3202 {
3203 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
3204 # preconfigured WAF evaluation.
3205 {
3206 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3207 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3208 },
3209 ],
3210 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
3211 # inspection during preconfigured WAF evaluation.
3212 {
3213 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3214 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3215 },
3216 ],
3217 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
3218 # inspection during preconfigured WAF evaluation.
3219 {
3220 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3221 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3222 },
3223 ],
3224 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
3225 # from inspection during preconfigured WAF evaluation. Note that the
3226 # parameter can be in the query string or in the POST body.
3227 {
3228 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3229 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3230 },
3231 ],
3232 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
3233 # inspection during preconfigured WAF evaluation. When specifying this
3234 # field, the query or fragment part should be excluded.
3235 {
3236 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3237 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3238 },
3239 ],
3240 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
3241 # preconfigured WAF exclusion. If omitted, it refers to all the rule
3242 # IDs under the WAF rule set.
3243 &quot;A String&quot;,
3244 ],
3245 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
3246 },
3247 ],
3248 },
3249 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
3250 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
3251 # must be a positive value between 0 and 2147483647.
3252 # Rules are evaluated from highest to lowest priority where 0 is the
3253 # highest priority and 2147483647 is the lowest priority.
3254 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
3255 # &quot;fairshare&quot;. Cannot be specified for any other actions.
3256 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
3257 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
3258 # the traffic will continue to be banned by the rate limit after the
3259 # rate falls below the threshold.
3260 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
3261 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
3262 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
3263 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
3264 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3265 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3266 },
3267 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
3268 # threshold. Valid option is &quot;allow&quot; only.
3269 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3270 # values are:
3271 #
3272 # - ALL: A single rate limit threshold is applied to all
3273 # the requests matching this rule. This is the default value if
3274 # &quot;enforceOnKey&quot; is not configured.
3275 # - IP: The source IP address of
3276 # the request is the key. Each IP has this limit enforced
3277 # separately.
3278 # - HTTP_HEADER: The value of the HTTP
3279 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3280 # value is truncated to the first 128 bytes of the header value. If no
3281 # such header is present in the request, the key type defaults toALL.
3282 # - XFF_IP: The first IP address (i.e. the
3283 # originating client IP address) specified in the list of IPs under
3284 # X-Forwarded-For HTTP header. If no such header is present or the value
3285 # is not a valid IP, the key defaults to the source IP address of
3286 # the request i.e. key type IP.
3287 # - HTTP_COOKIE: The value of the HTTP
3288 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3289 # value is truncated to the first 128 bytes of the cookie value. If no
3290 # such cookie is present in the request, the key type defaults toALL.
3291 # - HTTP_PATH: The URL path of the HTTP request. The key
3292 # value is truncated to the first 128 bytes.
3293 # - SNI: Server name indication in the TLS session of the
3294 # HTTPS request. The key value is truncated to the first 128 bytes. The
3295 # key type defaults to ALL on a HTTP session.
3296 # - REGION_CODE: The country/region from which the request
3297 # originates.
3298 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3299 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3300 # key type defaults to ALL.
3301 # - USER_IP: The IP address of the originating client,
3302 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3303 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
3304 # an IP address cannot be resolved from it, the key type defaults toIP.
3305 #
3306 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3307 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3308 # key type defaults to ALL.
3309 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
3310 # limit threshold is enforced for all the requests matching the rule.
3311 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
3312 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
3313 # ratelimit threshold/action is enforced. You can specify up to 3
3314 # enforce_on_key_configs. If enforce_on_key_configs is specified,
3315 # enforce_on_key must not be specified.
3316 {
3317 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3318 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
3319 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
3320 # taken as the key value.
3321 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3322 # values are:
3323 #
3324 # - ALL: A single rate limit threshold is applied to all
3325 # the requests matching this rule. This is the default value if
3326 # &quot;enforceOnKeyConfigs&quot; is not configured.
3327 # - IP: The source IP address of
3328 # the request is the key. Each IP has this limit enforced
3329 # separately.
3330 # - HTTP_HEADER: The value of the HTTP
3331 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3332 # value is truncated to the first 128 bytes of the header value. If no
3333 # such header is present in the request, the key type defaults toALL.
3334 # - XFF_IP: The first IP address (i.e. the
3335 # originating client IP address) specified in the list of IPs under
3336 # X-Forwarded-For HTTP header. If no such header is present or the
3337 # value is not a valid IP, the key defaults to the source IP address of
3338 # the request i.e. key type IP.
3339 # - HTTP_COOKIE: The value of the HTTP
3340 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3341 # value is truncated to the first 128 bytes of the cookie value. If no
3342 # such cookie is present in the request, the key type defaults toALL.
3343 # - HTTP_PATH: The URL path of the HTTP request. The key
3344 # value is truncated to the first 128 bytes.
3345 # - SNI: Server name indication in the TLS session of
3346 # the HTTPS request. The key value is truncated to the first 128 bytes.
3347 # The key type defaults to ALL on a HTTP session.
3348 # - REGION_CODE: The country/region from which the
3349 # request originates.
3350 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3351 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3352 # key type defaults to ALL.
3353 # - USER_IP: The IP address of the originating client,
3354 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3355 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
3356 # or an IP address cannot be resolved from it, the key type defaults toIP.
3357 #
3358 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3359 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3360 # key type defaults to ALL.
3361 },
3362 ],
3363 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
3364 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
3365 # value.
3366 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
3367 # value.
3368 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
3369 # threshold, to either deny with a specified HTTP response code, or
3370 # redirect to a different endpoint.
3371 # Valid options are `deny(STATUS)`, where valid values for
3372 # `STATUS` are 403, 404, 429, and 502, and
3373 # `redirect`, where the redirect parameters come from
3374 # `exceedRedirectOptions` below.
3375 # The `redirect` action is only supported in Global Security Policies of
3376 # type CLOUD_ARMOR.
3377 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
3378 # above the configured rate limit threshold
3379 &quot;code&quot;: 42, # The status code, which should be an enum value of
3380 # google.rpc.Code.
3381 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
3382 },
3383 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
3384 # action. Cannot be specified if the exceed action is not redirect.
3385 # This field is only supported in Global Security Policies of type
3386 # CLOUD_ARMOR.
3387 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3388 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3389 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3390 #
3391 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3392 # challenge assessment.
3393 # - EXTERNAL_302: redirect to a different URL via a 302
3394 # response.
3395 },
3396 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
3397 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3398 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3399 },
3400 },
3401 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
3402 # other actions.
3403 # This field is only supported in Global Security Policies of type
3404 # CLOUD_ARMOR.
3405 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
3406 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
3407 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
3408 #
3409 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
3410 # challenge assessment.
3411 # - EXTERNAL_302: redirect to a different URL via a 302
3412 # response.
3413 },
3414 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
3415 # other actions.
3416 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
3417 # rule.
3418 # [Deprecated] Use requiredManagedProtectionTiers instead.
3419 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
3420 # policy. This can only be set during rule creation, if rule number is not
3421 # specified it will be generated by the server.
3422 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
3423 # policy rule.
3424 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
3425 # allows you to control which network&#x27;s VMs get this rule. If this field
3426 # is left blank, all VMs within the organization will receive the rule.
3427 #
3428 # This field may only be specified when versioned_expr is set to FIREWALL.
3429 &quot;A String&quot;,
3430 ],
3431 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
3432 # applied with this rule.
3433 &quot;A String&quot;,
3434 ],
3435 }</pre>
3436 </div>
3437
3438 <div class="method">
3439 <code class="details" id="insert">insert(project, body=None, requestId=None, validateOnly=None, x__xgafv=None)</code>
3440 <pre>Creates a new policy in the specified project using the data included in
3441 the request.
3442
3443 Args:
3444 project: string, Project ID for this request. (required)
3445 body: object, The request body.
3446 The object takes the form of:
3447
3448 { # Represents a Google Cloud Armor security policy resource.
3449 #
3450 # Only external backend services that use load balancers can
3451 # reference a security policy. For more information, see
3452 # Google Cloud Armor security policy overview.
3453 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
3454 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
3455 &quot;confidenceThreshold&quot;: 3.14,
3456 &quot;expirationSec&quot;: 42,
3457 &quot;impactedBaselineThreshold&quot;: 3.14,
3458 &quot;loadThreshold&quot;: 3.14,
3459 },
3460 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
3461 # This field is only supported in Global Security Policies of type
3462 # CLOUD_ARMOR.
3463 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
3464 # This field is only supported in Global Security Policies of type
3465 # CLOUD_ARMOR.
3466 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
3467 # STANDARD - opaque rules. (default)
3468 # PREMIUM - transparent rules.
3469 # This field is only supported in Global Security Policies of type
3470 # CLOUD_ARMOR.
3471 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
3472 # customizable thresholds.
3473 {
3474 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
3475 &quot;autoDeployExpirationSec&quot;: 42,
3476 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
3477 &quot;autoDeployLoadThreshold&quot;: 3.14,
3478 &quot;detectionAbsoluteQps&quot;: 3.14,
3479 &quot;detectionLoadThreshold&quot;: 3.14,
3480 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
3481 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
3482 # The name must be unique within the security policy.
3483 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
3484 # on specified granular traffic units.
3485 { # Configurations to specifc granular traffic units processed by
3486 # Adaptive Protection.
3487 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
3488 # type constitutes a separate traffic unit.
3489 # It can only be set to true if `value` is empty.
3490 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
3491 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
3492 },
3493 ],
3494 },
3495 ],
3496 },
3497 },
3498 &quot;advancedOptionsConfig&quot;: {
3499 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
3500 # json_parsing is set to STANDARD.
3501 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
3502 #
3503 # As per RFC 1341, a Content-Type header value has the following format:
3504 #
3505 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
3506 #
3507 # When configuring a custom Content-Type header value, only the
3508 # type/subtype needs to be specified, and the parameters should be
3509 # excluded.
3510 &quot;A String&quot;,
3511 ],
3512 },
3513 &quot;jsonParsing&quot;: &quot;A String&quot;,
3514 &quot;logLevel&quot;: &quot;A String&quot;,
3515 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
3516 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
3517 # Values are case insensitive.
3518 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
3519 # resolving the callers client IP address.
3520 &quot;A String&quot;,
3521 ],
3522 },
3523 &quot;associations&quot;: [ # A list of associations that belong to this policy.
3524 {
3525 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
3526 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
3527 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
3528 &quot;A String&quot;,
3529 ],
3530 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
3531 &quot;A String&quot;,
3532 ],
3533 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
3534 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
3535 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
3536 },
3537 ],
3538 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
3539 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
3540 },
3541 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
3542 # text format.
3543 &quot;ddosProtectionConfig&quot;: {
3544 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
3545 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
3546 # builds DDoS mitigations that minimize collateral damage. It quantifies
3547 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
3548 # blocked.
3549 #
3550 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
3551 # not be deployed. Using a lower value will prioritize keeping collateral
3552 # damage low, possibly at the cost of its effectiveness in rate limiting
3553 # some or all of the attack. It should typically be unset, so Advanced DDoS
3554 # (and Adaptive Protection) uses the best mitigation it can find. Setting
3555 # the threshold is advised if there are logs for false positive detections
3556 # with high collateral damage, and will cause Advanced DDoS to attempt to
3557 # find a less aggressive rule that satisfies the constraint. If a suitable
3558 # rule cannot be found, the system falls back to either no mitigation for
3559 # smaller attacks or broader network throttles for larger ones.
3560 &quot;ddosProtection&quot;: &quot;A String&quot;,
3561 },
3562 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3563 # create the resource.
3564 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
3565 # unique in the organization in which the security policy is created. This
3566 # should only be used when SecurityPolicyType is FIREWALL.
3567 # The name must be 1-63 characters long, and comply with
3568 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
3569 # characters long and match the regular expression
3570 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
3571 # lowercase letter, and all following characters must be a dash, lowercase
3572 # letter, or digit, except the last character, which cannot be a dash.
3573 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
3574 # the metadata&#x27;s contents and used for optimistic locking. The
3575 # fingerprint is initially generated by Compute Engine and changes after
3576 # every request to modify or update metadata. You must always provide an
3577 # up-to-date fingerprint hash in order to update or change metadata,
3578 # otherwise the request will fail with error412 conditionNotMet.
3579 #
3580 # To see the latest fingerprint, make get() request to the
3581 # security policy.
3582 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
3583 # defined by the server.
3584 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
3585 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
3586 # is essentially a hash of the labels set used for optimistic locking. The
3587 # fingerprint is initially generated by Compute Engine and changes after
3588 # every request to modify or update labels. You must always provide an
3589 # up-to-date fingerprint hash in order to update or change labels.
3590 #
3591 # To see the latest fingerprint, make get() request to the
3592 # security policy.
3593 &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.
3594 # Label values may be empty.
3595 &quot;a_key&quot;: &quot;A String&quot;,
3596 },
3597 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
3598 # The name must be 1-63 characters long, and comply withRFC1035.
3599 # Specifically, the name must be 1-63 characters long and match the regular
3600 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
3601 # character must be a lowercase letter, and all following characters must
3602 # be a dash, lowercase letter, or digit, except the last character, which
3603 # cannot be a dash.
3604 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
3605 &quot;recaptchaOptionsConfig&quot;: {
3606 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
3607 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
3608 # the security policy. The specified site key needs to be created from the
3609 # reCAPTCHA API. The user is responsible for the validity of the specified
3610 # site key. If not specified, a Google-managed site key is used.
3611 # This field is only supported in Global Security Policies of type
3612 # CLOUD_ARMOR.
3613 },
3614 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
3615 # resides. This field is not applicable to global security policies.
3616 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
3617 # policy can not exceed a set number of tuples.
3618 &quot;rules&quot;: [ # A list of rules that belong to this policy.
3619 # There must always be a default rule which is a rule with priority
3620 # 2147483647 and match all condition (for the match condition this means
3621 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
3622 # must be either match &quot;*&quot; or not set). If no rules are provided when
3623 # creating a security policy, a default rule with action &quot;allow&quot; will be
3624 # added.
3625 { # Represents a rule that describes one or more match conditions along with
3626 # the action to be taken when traffic matches this condition (allow or deny).
3627 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
3628 # The following are the valid actions:
3629 #
3630 # - allow: allow access to target.
3631 # - deny(STATUS): deny access to target, returns the
3632 # HTTP response code specified. Valid values for `STATUS`
3633 # are 403, 404, and 502.
3634 # - rate_based_ban: limit client traffic to the configured
3635 # threshold and ban the client if the traffic exceeds the threshold.
3636 # Configure parameters for this action in RateLimitOptions. Requires
3637 # rate_limit_options to be set.
3638 # - redirect: redirect to a different target. This can
3639 # either be an internal reCAPTCHA redirect, or an external URL-based
3640 # redirect via a 302 response. Parameters for this action can be configured
3641 # via redirectOptions. This action is only supported in Global Security
3642 # Policies of type CLOUD_ARMOR.
3643 # - throttle: limit
3644 # client traffic to the configured threshold. Configure parameters for this
3645 # action in rateLimitOptions. Requires rate_limit_options to be set for
3646 # this.
3647 # - fairshare (preview only): when traffic reaches the
3648 # threshold limit, requests from the clients matching this rule begin to be
3649 # rate-limited using the Fair Share algorithm. This action is only allowed
3650 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
3651 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3652 # create the resource.
3653 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
3654 # specified when versioned_expr is set to FIREWALL.
3655 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
3656 # enabled, logs will be exported to the configured export destination in
3657 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
3658 # cannot enable logging on &quot;goto_next&quot; rules.
3659 #
3660 # This field may only be specified when the versioned_expr is set to
3661 # FIREWALL.
3662 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
3663 # This field is only supported in Global Security Policies of type
3664 # CLOUD_ARMOR.
3665 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
3666 # present.
3667 {
3668 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
3669 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
3670 },
3671 ],
3672 },
3673 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
3674 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
3675 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
3676 # Exactly one field must be specified.
3677 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
3678 # This field must be specified if versioned_expr is specified and cannot
3679 # be specified if versioned_expr is not specified.
3680 &quot;destIpRanges&quot;: [ # CIDR IP address range.
3681 #
3682 # This field may only be specified when versioned_expr is set to
3683 # FIREWALL.
3684 &quot;A String&quot;,
3685 ],
3686 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
3687 #
3688 # This field may only be specified when versioned_expr is set to
3689 # FIREWALL.
3690 {
3691 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
3692 # required when creating a firewall rule. This value can either be
3693 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
3694 # protocol number.
3695 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
3696 # only applicable for UDP or TCP protocol. Each entry must be either
3697 # an integer or a range. If not specified, this rule applies to
3698 # connections through any port.
3699 #
3700 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
3701 #
3702 # This field may only be specified when versioned_expr is set to
3703 # FIREWALL.
3704 &quot;A String&quot;,
3705 ],
3706 },
3707 ],
3708 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
3709 #
3710 # This field may only be specified when versioned_expr is set to
3711 # FIREWALL.
3712 {
3713 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
3714 # required when creating a firewall rule. This value can either be
3715 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
3716 # protocol number.
3717 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
3718 # only applicable for UDP or TCP protocol. Each entry must be either
3719 # an integer or a range. If not specified, this rule applies to
3720 # connections through any port.
3721 #
3722 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
3723 #
3724 # This field may only be specified when versioned_expr is set to
3725 # FIREWALL.
3726 &quot;A String&quot;,
3727 ],
3728 },
3729 ],
3730 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
3731 # Maximum number of src_ip_ranges allowed is 10.
3732 &quot;A String&quot;,
3733 ],
3734 },
3735 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
3736 # A CEVAL expression is used to specify match criteria such as origin.ip,
3737 # source.region_code and contents in the request header.
3738 # Expressions containing `evaluateThreatIntelligence` require a Cloud
3739 # Armor Enterprise subscription and are not supported in Edge Policies
3740 # nor in Regional Policies. Expressions containing
3741 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
3742 # Enterprise subscription and are only supported in Global Security
3743 # Policies.
3744 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3745 # are documented at https://github.com/google/cel-spec.
3746 #
3747 # Example (Comparison):
3748 #
3749 # title: &quot;Summary size limit&quot;
3750 # description: &quot;Determines if a summary is less than 100 chars&quot;
3751 # expression: &quot;document.summary.size() &lt; 100&quot;
3752 #
3753 # Example (Equality):
3754 #
3755 # title: &quot;Requestor is owner&quot;
3756 # description: &quot;Determines if requestor is the document owner&quot;
3757 # expression: &quot;document.owner == request.auth.claims.email&quot;
3758 #
3759 # Example (Logic):
3760 #
3761 # title: &quot;Public documents&quot;
3762 # description: &quot;Determine whether the document should be publicly visible&quot;
3763 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3764 #
3765 # Example (Data Manipulation):
3766 #
3767 # title: &quot;Notification string&quot;
3768 # description: &quot;Create a notification string with a timestamp.&quot;
3769 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3770 #
3771 # The exact variables and functions that may be referenced within an expression
3772 # are determined by the service that evaluates it. See the service
3773 # documentation for additional information.
3774 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3775 # describes the expression, e.g. when hovered over it in a UI.
3776 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3777 # syntax.
3778 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3779 # reporting, e.g. a file name and a position in the file.
3780 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3781 # its purpose. This can be used e.g. in UIs which allow to enter the
3782 # expression.
3783 },
3784 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
3785 # CEVAL expression (i.e., &#x27;expr&#x27;).
3786 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
3787 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
3788 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3789 # action-tokens. The provided site keys need to be created from
3790 # reCAPTCHA API under the same project where the security policy is
3791 # created.
3792 &quot;A String&quot;,
3793 ],
3794 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
3795 # session-tokens. The provided site keys need to be created from
3796 # reCAPTCHA API under the same project where the security policy is
3797 # created.
3798 &quot;A String&quot;,
3799 ],
3800 },
3801 },
3802 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
3803 # If this field is specified, config must also be specified.
3804 # Available preconfigured expressions along with their requirements are:
3805 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
3806 # config.
3807 },
3808 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
3809 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
3810 # &#x27;action&#x27; is enforced.
3811 #
3812 # The match criteria for a rule consists of built-in match fields (like
3813 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
3814 # (&#x27;userDefinedFields&#x27;).
3815 #
3816 # Field values may be extracted directly from the packet or derived from it
3817 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
3818 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
3819 # header is found in the packet and the entire field is in bounds.
3820 #
3821 # Each match field may specify which values can match it, listing one or
3822 # more ranges, prefixes, or exact values that are considered a match for
3823 # the field. A field value must be present in order to match a specified
3824 # match field. If no match values are specified for a match field, then any
3825 # field value is considered to match it, and it&#x27;s not required to be
3826 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
3827 #
3828 # For a packet to match a rule, all specified match fields must match the
3829 # corresponding field values derived from the packet.
3830 #
3831 # Example:
3832 #
3833 # networkMatch:
3834 # srcIpRanges:
3835 # - &quot;192.0.2.0/24&quot;
3836 # - &quot;198.51.100.0/24&quot;
3837 # userDefinedFields:
3838 # - name: &quot;ipv4_fragment_offset&quot;
3839 # values:
3840 # - &quot;1-0x1fff&quot;
3841 #
3842 # The above match condition matches packets with a source IP in
3843 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
3844 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
3845 # against.
3846 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
3847 # format.
3848 &quot;A String&quot;,
3849 ],
3850 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3851 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3852 &quot;A String&quot;,
3853 ],
3854 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
3855 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
3856 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
3857 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
3858 &quot;A String&quot;,
3859 ],
3860 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
3861 42,
3862 ],
3863 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
3864 &quot;A String&quot;,
3865 ],
3866 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
3867 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
3868 &quot;A String&quot;,
3869 ],
3870 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
3871 # IP address.
3872 &quot;A String&quot;,
3873 ],
3874 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
3875 # matching values for that field.
3876 {
3877 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
3878 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
3879 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
3880 # range (e.g. &quot;0x400-0x7ff&quot;).
3881 &quot;A String&quot;,
3882 ],
3883 },
3884 ],
3885 },
3886 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
3887 # does not evaluate preconfigured WAF rules, i.e., if
3888 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
3889 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
3890 {
3891 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
3892 # preconfigured WAF evaluation.
3893 {
3894 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3895 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3896 },
3897 ],
3898 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
3899 # inspection during preconfigured WAF evaluation.
3900 {
3901 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3902 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3903 },
3904 ],
3905 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
3906 # inspection during preconfigured WAF evaluation.
3907 {
3908 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3909 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3910 },
3911 ],
3912 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
3913 # from inspection during preconfigured WAF evaluation. Note that the
3914 # parameter can be in the query string or in the POST body.
3915 {
3916 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3917 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3918 },
3919 ],
3920 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
3921 # inspection during preconfigured WAF evaluation. When specifying this
3922 # field, the query or fragment part should be excluded.
3923 {
3924 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
3925 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
3926 },
3927 ],
3928 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
3929 # preconfigured WAF exclusion. If omitted, it refers to all the rule
3930 # IDs under the WAF rule set.
3931 &quot;A String&quot;,
3932 ],
3933 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
3934 },
3935 ],
3936 },
3937 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
3938 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
3939 # must be a positive value between 0 and 2147483647.
3940 # Rules are evaluated from highest to lowest priority where 0 is the
3941 # highest priority and 2147483647 is the lowest priority.
3942 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
3943 # &quot;fairshare&quot;. Cannot be specified for any other actions.
3944 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
3945 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
3946 # the traffic will continue to be banned by the rate limit after the
3947 # rate falls below the threshold.
3948 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
3949 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
3950 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
3951 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
3952 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
3953 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
3954 },
3955 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
3956 # threshold. Valid option is &quot;allow&quot; only.
3957 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
3958 # values are:
3959 #
3960 # - ALL: A single rate limit threshold is applied to all
3961 # the requests matching this rule. This is the default value if
3962 # &quot;enforceOnKey&quot; is not configured.
3963 # - IP: The source IP address of
3964 # the request is the key. Each IP has this limit enforced
3965 # separately.
3966 # - HTTP_HEADER: The value of the HTTP
3967 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
3968 # value is truncated to the first 128 bytes of the header value. If no
3969 # such header is present in the request, the key type defaults toALL.
3970 # - XFF_IP: The first IP address (i.e. the
3971 # originating client IP address) specified in the list of IPs under
3972 # X-Forwarded-For HTTP header. If no such header is present or the value
3973 # is not a valid IP, the key defaults to the source IP address of
3974 # the request i.e. key type IP.
3975 # - HTTP_COOKIE: The value of the HTTP
3976 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
3977 # value is truncated to the first 128 bytes of the cookie value. If no
3978 # such cookie is present in the request, the key type defaults toALL.
3979 # - HTTP_PATH: The URL path of the HTTP request. The key
3980 # value is truncated to the first 128 bytes.
3981 # - SNI: Server name indication in the TLS session of the
3982 # HTTPS request. The key value is truncated to the first 128 bytes. The
3983 # key type defaults to ALL on a HTTP session.
3984 # - REGION_CODE: The country/region from which the request
3985 # originates.
3986 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
3987 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3988 # key type defaults to ALL.
3989 # - USER_IP: The IP address of the originating client,
3990 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
3991 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
3992 # an IP address cannot be resolved from it, the key type defaults toIP.
3993 #
3994 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
3995 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
3996 # key type defaults to ALL.
3997 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
3998 # limit threshold is enforced for all the requests matching the rule.
3999 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
4000 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
4001 # ratelimit threshold/action is enforced. You can specify up to 3
4002 # enforce_on_key_configs. If enforce_on_key_configs is specified,
4003 # enforce_on_key must not be specified.
4004 {
4005 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4006 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
4007 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
4008 # taken as the key value.
4009 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
4010 # values are:
4011 #
4012 # - ALL: A single rate limit threshold is applied to all
4013 # the requests matching this rule. This is the default value if
4014 # &quot;enforceOnKeyConfigs&quot; is not configured.
4015 # - IP: The source IP address of
4016 # the request is the key. Each IP has this limit enforced
4017 # separately.
4018 # - HTTP_HEADER: The value of the HTTP
4019 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
4020 # value is truncated to the first 128 bytes of the header value. If no
4021 # such header is present in the request, the key type defaults toALL.
4022 # - XFF_IP: The first IP address (i.e. the
4023 # originating client IP address) specified in the list of IPs under
4024 # X-Forwarded-For HTTP header. If no such header is present or the
4025 # value is not a valid IP, the key defaults to the source IP address of
4026 # the request i.e. key type IP.
4027 # - HTTP_COOKIE: The value of the HTTP
4028 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
4029 # value is truncated to the first 128 bytes of the cookie value. If no
4030 # such cookie is present in the request, the key type defaults toALL.
4031 # - HTTP_PATH: The URL path of the HTTP request. The key
4032 # value is truncated to the first 128 bytes.
4033 # - SNI: Server name indication in the TLS session of
4034 # the HTTPS request. The key value is truncated to the first 128 bytes.
4035 # The key type defaults to ALL on a HTTP session.
4036 # - REGION_CODE: The country/region from which the
4037 # request originates.
4038 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
4039 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4040 # key type defaults to ALL.
4041 # - USER_IP: The IP address of the originating client,
4042 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
4043 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
4044 # or an IP address cannot be resolved from it, the key type defaults toIP.
4045 #
4046 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
4047 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
4048 # key type defaults to ALL.
4049 },
4050 ],
4051 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
4052 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
4053 # value.
4054 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
4055 # value.
4056 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
4057 # threshold, to either deny with a specified HTTP response code, or
4058 # redirect to a different endpoint.
4059 # Valid options are `deny(STATUS)`, where valid values for
4060 # `STATUS` are 403, 404, 429, and 502, and
4061 # `redirect`, where the redirect parameters come from
4062 # `exceedRedirectOptions` below.
4063 # The `redirect` action is only supported in Global Security Policies of
4064 # type CLOUD_ARMOR.
4065 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
4066 # above the configured rate limit threshold
4067 &quot;code&quot;: 42, # The status code, which should be an enum value of
4068 # google.rpc.Code.
4069 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
4070 },
4071 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
4072 # action. Cannot be specified if the exceed action is not redirect.
4073 # This field is only supported in Global Security Policies of type
4074 # CLOUD_ARMOR.
4075 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
4076 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
4077 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
4078 #
4079 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
4080 # challenge assessment.
4081 # - EXTERNAL_302: redirect to a different URL via a 302
4082 # response.
4083 },
4084 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
4085 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
4086 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
4087 },
4088 },
4089 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
4090 # other actions.
4091 # This field is only supported in Global Security Policies of type
4092 # CLOUD_ARMOR.
4093 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
4094 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
4095 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
4096 #
4097 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
4098 # challenge assessment.
4099 # - EXTERNAL_302: redirect to a different URL via a 302
4100 # response.
4101 },
4102 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
4103 # other actions.
4104 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
4105 # rule.
4106 # [Deprecated] Use requiredManagedProtectionTiers instead.
4107 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
4108 # policy. This can only be set during rule creation, if rule number is not
4109 # specified it will be generated by the server.
4110 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
4111 # policy rule.
4112 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
4113 # allows you to control which network&#x27;s VMs get this rule. If this field
4114 # is left blank, all VMs within the organization will receive the rule.
4115 #
4116 # This field may only be specified when versioned_expr is set to FIREWALL.
4117 &quot;A String&quot;,
4118 ],
4119 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
4120 # applied with this rule.
4121 &quot;A String&quot;,
4122 ],
4123 },
4124 ],
4125 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
4126 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
4127 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
4128 # unique in the organization in which the security policy is created. This
4129 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
4130 # The name must be 1-63 characters long, and comply with
4131 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
4132 # characters long and match the regular expression
4133 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
4134 # lowercase letter, and all following characters must be a dash, lowercase
4135 # letter, or digit, except the last character, which cannot be a dash.
4136 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
4137 #
4138 # - CLOUD_ARMOR: Cloud Armor backend security policies can
4139 # be configured to filter incoming HTTP requests targeting backend services.
4140 # They filter requests before they hit the origin servers.
4141 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
4142 # be configured to filter incoming HTTP requests targeting backend services
4143 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
4144 # They filter requests before the request is served from Google&#x27;s cache.
4145 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
4146 # internal service policies can be configured to filter HTTP requests
4147 # targeting services managed by Traffic Director in a service mesh. They
4148 # filter requests before the request is served from the application.
4149 #
4150 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
4151 # can be configured to filter packets targeting network load balancing
4152 # resources such as backend services, target pools, target instances, and
4153 # instances with external IPs. They filter requests before the request is
4154 # served from the application.
4155 #
4156 #
4157 # This field can be set only at resource creation time.
4158 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
4159 # user-defined field consists of up to 4 bytes extracted from a fixed offset
4160 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
4161 # optional mask to select certain bits. Rules may then specify matching
4162 # values for these fields.
4163 #
4164 # Example:
4165 #
4166 # userDefinedFields:
4167 # - name: &quot;ipv4_fragment_offset&quot;
4168 # base: IPV4
4169 # offset: 6
4170 # size: 2
4171 # mask: &quot;0x1fff&quot;
4172 {
4173 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
4174 #
4175 # - IPV4: Points to the beginning of the IPv4 header.
4176 # - IPV6: Points to the beginning of the IPv6 header.
4177 # - TCP: Points to the beginning of the TCP header, skipping
4178 # over any IPv4 options or IPv6 extension headers. Not present for
4179 # non-first fragments.
4180 # - UDP: Points to the beginning of the UDP header, skipping
4181 # over any IPv4 options or IPv6 extension headers. Not present for
4182 # non-first fragments.
4183 #
4184 #
4185 # required
4186 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
4187 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
4188 # The last byte of the field (in network byte order) corresponds to the
4189 # least significant byte of the mask.
4190 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
4191 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
4192 # &#x27;base&#x27;.
4193 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
4194 },
4195 ],
4196 }
4197
4198 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
4199 that if you must retry your request, the server will know to ignore the
4200 request if it has already been completed.
4201
4202 For example, consider a situation where you make an initial request and
4203 the request times out. If you make the request again with the same
4204 request ID, the server can check if original operation with the same
4205 request ID was received, and if so, will ignore the second request. This
4206 prevents clients from accidentally creating duplicate commitments.
4207
4208 The request ID must be
4209 a valid UUID with the exception that zero UUID is not supported
4210 (00000000-0000-0000-0000-000000000000).
4211 validateOnly: boolean, If true, the request will not be committed.
4212 x__xgafv: string, V1 error format.
4213 Allowed values
4214 1 - v1 error format
4215 2 - v2 error format
4216
4217 Returns:
4218 An object of the form:
4219
4220 { # Represents an Operation resource.
4221 #
4222 # Google Compute Engine has three Operation resources:
4223 #
4224 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
4225 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
4226 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
4227 #
4228 # You can use an operation resource to manage asynchronous API requests.
4229 # For more information, readHandling
4230 # API responses.
4231 #
4232 # Operations can be global, regional or zonal.
4233 #
4234 # - For global operations, use the `globalOperations`
4235 # resource.
4236 # - For regional operations, use the
4237 # `regionOperations` resource.
4238 # - For zonal operations, use
4239 # the `zoneOperations` resource.
4240 #
4241 #
4242 #
4243 # For more information, read
4244 # Global, Regional, and Zonal Resources.
4245 #
4246 # Note that completed Operation resources have a limited
4247 # retention period.
4248 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
4249 # Not present otherwise.
4250 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4251 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
4252 # set when the operation is created.
4253 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
4254 # text format.
4255 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
4256 # this field will be populated.
4257 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
4258 # operation.
4259 {
4260 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4261 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
4262 # details. There is a set of defined message types to use for providing
4263 # details.The syntax depends on the error code. For example,
4264 # QuotaExceededInfo will have details when the error code is
4265 # QUOTA_EXCEEDED.
4266 {
4267 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
4268 #
4269 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
4270 # is not enabled:
4271 #
4272 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
4273 # &quot;domain&quot;: &quot;googleapis.com&quot;
4274 # &quot;metadata&quot;: {
4275 # &quot;resource&quot;: &quot;projects/123&quot;,
4276 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
4277 # }
4278 # }
4279 #
4280 # This response indicates that the pubsub.googleapis.com API is not enabled.
4281 #
4282 # Example of an error that is returned when attempting to create a Spanner
4283 # instance in a region that is out of stock:
4284 #
4285 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
4286 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
4287 # &quot;metadata&quot;: {
4288 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
4289 # }
4290 # }
4291 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
4292 # is typically the registered service name of the tool or product that
4293 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
4294 # generated by some common infrastructure, the error domain must be a
4295 # globally unique value that identifies the infrastructure. For Google API
4296 # infrastructure, the error domain is &quot;googleapis.com&quot;.
4297 &quot;metadatas&quot;: { # Additional structured details about this error.
4298 #
4299 # Keys must match a regular expression of `a-z+` but should
4300 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
4301 # length. When identifying the current value of an exceeded limit, the units
4302 # should be contained in the key, not the value. For example, rather than
4303 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
4304 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
4305 # instances that can be created in a single (batch) request.
4306 &quot;a_key&quot;: &quot;A String&quot;,
4307 },
4308 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
4309 # proximate cause of the error. Error reasons are unique within a particular
4310 # domain of errors. This should be at most 63 characters and match a
4311 # regular expression of `A-Z+[A-Z0-9]`, which represents
4312 # UPPER_SNAKE_CASE.
4313 },
4314 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
4315 #
4316 # For example, if a quota check failed with an error indicating the calling
4317 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
4318 # directly to the right place in the developer console to flip the bit.
4319 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
4320 { # Describes a URL link.
4321 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
4322 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
4323 },
4324 ],
4325 },
4326 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
4327 # which can be attached to an RPC error.
4328 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
4329 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
4330 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
4331 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
4332 },
4333 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
4334 &quot;dimensions&quot;: { # The map holding related quota dimensions.
4335 &quot;a_key&quot;: &quot;A String&quot;,
4336 },
4337 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
4338 # type or metric.
4339 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
4340 # or metric.
4341 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
4342 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
4343 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
4344 },
4345 },
4346 ],
4347 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
4348 # This property is optional.
4349 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4350 },
4351 ],
4352 },
4353 &quot;getVersionOperationMetadata&quot;: {
4354 &quot;inlineSbomInfo&quot;: {
4355 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
4356 # appropriate identifiers.
4357 &quot;a_key&quot;: &quot;A String&quot;,
4358 },
4359 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
4360 # identifiers.
4361 &quot;a_key&quot;: &quot;A String&quot;,
4362 },
4363 },
4364 },
4365 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
4366 # message that was returned, such as `NOT FOUND`.
4367 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
4368 # status code that was returned. For example, a `404` means the
4369 # resource was not found.
4370 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
4371 # defined by the server.
4372 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
4373 # This value is inRFC3339
4374 # text format.
4375 &quot;instancesBulkInsertOperationMetadata&quot;: {
4376 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
4377 # Example key: zones/us-central1-a
4378 &quot;a_key&quot;: {
4379 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
4380 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
4381 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
4382 # error.
4383 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
4384 # if the flow is rolling forward or rolling back.
4385 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
4386 },
4387 },
4388 },
4389 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
4390 # Operation resources.
4391 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4392 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
4393 # group of operations results from a `bulkInsert` API request.
4394 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
4395 # `update`, or `delete`, and so on.
4396 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
4397 # There is no requirement that this be linear or support any granularity of
4398 # operations. This should not be used to guess when the operation will be
4399 # complete. This number should monotonically increase as the operation
4400 # progresses.
4401 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
4402 # applicable when performing regional operations.
4403 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4404 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
4405 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
4406 # this field will contain information on all underlying zonal actions and
4407 # their state.
4408 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
4409 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
4410 # Example key: zones/us-central1-a
4411 &quot;a_key&quot;: {
4412 &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
4413 # populated.
4414 # different programming environments, including REST APIs and RPC APIs. It is
4415 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
4416 # three pieces of data: error code, error message, and error details.
4417 #
4418 # You can find out more about this error model and how to work with it in the
4419 # [API Design Guide](https://cloud.google.com/apis/design/errors).
4420 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
4421 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
4422 # message types for APIs to use.
4423 {
4424 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
4425 },
4426 ],
4427 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
4428 # user-facing error message should be localized and sent in the
4429 # google.rpc.Status.details field, or localized by the client.
4430 },
4431 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
4432 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
4433 },
4434 },
4435 },
4436 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
4437 # This value is inRFC3339
4438 # text format.
4439 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
4440 # following:
4441 # `PENDING`, `RUNNING`, or `DONE`.
4442 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
4443 # operation.
4444 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
4445 # of the target resource.
4446 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
4447 # operations related to creating a snapshot, this points to the disk
4448 # that the snapshot was created from.
4449 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
4450 # `[email protected]` or
4451 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
4452 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
4453 # operation, this field will be populated.
4454 {
4455 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
4456 # Engine returns NO_RESULTS_ON_PAGE if there
4457 # are no results in the response.
4458 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
4459 # value format. For example:
4460 #
4461 # &quot;data&quot;: [
4462 # {
4463 # &quot;key&quot;: &quot;scope&quot;,
4464 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
4465 # }
4466 {
4467 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
4468 # returned. For example, for warnings where there are no results in a list
4469 # request for a particular zone, this key might be scope and
4470 # the key value might be the zone name. Other examples might be a key
4471 # indicating a deprecated resource and a suggested replacement, or a
4472 # warning about invalid network settings (for example, if an instance
4473 # attempts to perform IP forwarding but is not enabled for IP forwarding).
4474 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4475 },
4476 ],
4477 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4478 },
4479 ],
4480 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
4481 # applicable when performing per-zone operations.
4482 }</pre>
4483 </div>
4484
4485 <div class="method">
4486 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code>
4487 <pre>List all the policies that have been configured for the specified project.
4488
4489 Args:
4490 project: string, Project ID for this request. (required)
4491 filter: string, A filter expression that filters resources listed in the response. Most
4492 Compute resources support two types of filter expressions:
4493 expressions that support regular expressions and expressions that follow
4494 API improvement proposal AIP-160.
4495 These two types of filter expressions cannot be mixed in one request.
4496
4497 If you want to use AIP-160, your expression must specify the field name, an
4498 operator, and the value that you want to use for filtering. The value
4499 must be a string, a number, or a boolean. The operator
4500 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
4501
4502 For example, if you are filtering Compute Engine instances, you can
4503 exclude instances named `example-instance` by specifying
4504 `name != example-instance`.
4505
4506 The `:*` comparison can be used to test whether a key has been defined.
4507 For example, to find all objects with `owner` label use:
4508 ```
4509 labels.owner:*
4510 ```
4511
4512 You can also filter nested fields. For example, you could specify
4513 `scheduling.automaticRestart = false` to include instances only
4514 if they are not scheduled for automatic restarts. You can use filtering
4515 on nested fields to filter based onresource labels.
4516
4517 To filter on multiple expressions, provide each separate expression within
4518 parentheses. For example:
4519 ```
4520 (scheduling.automaticRestart = true)
4521 (cpuPlatform = &quot;Intel Skylake&quot;)
4522 ```
4523 By default, each expression is an `AND` expression. However, you
4524 can include `AND` and `OR` expressions explicitly.
4525 For example:
4526 ```
4527 (cpuPlatform = &quot;Intel Skylake&quot;) OR
4528 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
4529 (scheduling.automaticRestart = true)
4530 ```
4531
4532 If you want to use a regular expression, use the `eq` (equal) or `ne`
4533 (not equal) operator against a single un-parenthesized expression with or
4534 without quotes or against multiple parenthesized expressions. Examples:
4535
4536 `fieldname eq unquoted literal`
4537 `fieldname eq &#x27;single quoted literal&#x27;`
4538 `fieldname eq &quot;double quoted literal&quot;`
4539 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
4540
4541 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
4542 The literal value must match the entire field.
4543
4544 For example, to filter for instances that do not end with name &quot;instance&quot;,
4545 you would use `name ne .*instance`.
4546
4547 You cannot combine constraints on multiple fields using regular
4548 expressions.
4549 maxResults: integer, The maximum number of results per page that should be returned.
4550 If the number of available results is larger than `maxResults`,
4551 Compute Engine returns a `nextPageToken` that can be used to get
4552 the next page of results in subsequent list requests. Acceptable values are
4553 `0` to `500`, inclusive. (Default: `500`)
4554 orderBy: string, Sorts list results by a certain order. By default, results
4555 are returned in alphanumerical order based on the resource name.
4556
4557 You can also sort results in descending order based on the creation
4558 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
4559 results based on the `creationTimestamp` field in
4560 reverse chronological order (newest result first). Use this to sort
4561 resources like operations so that the newest operation is returned first.
4562
4563 Currently, only sorting by `name` or
4564 `creationTimestamp desc` is supported.
4565 pageToken: string, Specifies a page token to use. Set `pageToken` to the
4566 `nextPageToken` returned by a previous list request to get
4567 the next page of results.
4568 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
4569 of failure. The default value is false.
4570
4571 For example, when partial success behavior is enabled, aggregatedList for a
4572 single zone scope either returns all resources in the zone or no resources,
4573 with an error code.
4574 x__xgafv: string, V1 error format.
4575 Allowed values
4576 1 - v1 error format
4577 2 - v2 error format
4578
4579 Returns:
4580 An object of the form:
4581
4582 {
4583 &quot;etag&quot;: &quot;A String&quot;,
4584 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
4585 &quot;items&quot;: [ # A list of SecurityPolicy resources.
4586 { # Represents a Google Cloud Armor security policy resource.
4587 #
4588 # Only external backend services that use load balancers can
4589 # reference a security policy. For more information, see
4590 # Google Cloud Armor security policy overview.
4591 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
4592 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
4593 &quot;confidenceThreshold&quot;: 3.14,
4594 &quot;expirationSec&quot;: 42,
4595 &quot;impactedBaselineThreshold&quot;: 3.14,
4596 &quot;loadThreshold&quot;: 3.14,
4597 },
4598 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
4599 # This field is only supported in Global Security Policies of type
4600 # CLOUD_ARMOR.
4601 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
4602 # This field is only supported in Global Security Policies of type
4603 # CLOUD_ARMOR.
4604 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
4605 # STANDARD - opaque rules. (default)
4606 # PREMIUM - transparent rules.
4607 # This field is only supported in Global Security Policies of type
4608 # CLOUD_ARMOR.
4609 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
4610 # customizable thresholds.
4611 {
4612 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
4613 &quot;autoDeployExpirationSec&quot;: 42,
4614 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
4615 &quot;autoDeployLoadThreshold&quot;: 3.14,
4616 &quot;detectionAbsoluteQps&quot;: 3.14,
4617 &quot;detectionLoadThreshold&quot;: 3.14,
4618 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
4619 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
4620 # The name must be unique within the security policy.
4621 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
4622 # on specified granular traffic units.
4623 { # Configurations to specifc granular traffic units processed by
4624 # Adaptive Protection.
4625 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
4626 # type constitutes a separate traffic unit.
4627 # It can only be set to true if `value` is empty.
4628 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
4629 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
4630 },
4631 ],
4632 },
4633 ],
4634 },
4635 },
4636 &quot;advancedOptionsConfig&quot;: {
4637 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
4638 # json_parsing is set to STANDARD.
4639 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
4640 #
4641 # As per RFC 1341, a Content-Type header value has the following format:
4642 #
4643 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
4644 #
4645 # When configuring a custom Content-Type header value, only the
4646 # type/subtype needs to be specified, and the parameters should be
4647 # excluded.
4648 &quot;A String&quot;,
4649 ],
4650 },
4651 &quot;jsonParsing&quot;: &quot;A String&quot;,
4652 &quot;logLevel&quot;: &quot;A String&quot;,
4653 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
4654 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
4655 # Values are case insensitive.
4656 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
4657 # resolving the callers client IP address.
4658 &quot;A String&quot;,
4659 ],
4660 },
4661 &quot;associations&quot;: [ # A list of associations that belong to this policy.
4662 {
4663 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
4664 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
4665 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
4666 &quot;A String&quot;,
4667 ],
4668 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
4669 &quot;A String&quot;,
4670 ],
4671 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
4672 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
4673 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
4674 },
4675 ],
4676 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
4677 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
4678 },
4679 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
4680 # text format.
4681 &quot;ddosProtectionConfig&quot;: {
4682 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
4683 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
4684 # builds DDoS mitigations that minimize collateral damage. It quantifies
4685 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
4686 # blocked.
4687 #
4688 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
4689 # not be deployed. Using a lower value will prioritize keeping collateral
4690 # damage low, possibly at the cost of its effectiveness in rate limiting
4691 # some or all of the attack. It should typically be unset, so Advanced DDoS
4692 # (and Adaptive Protection) uses the best mitigation it can find. Setting
4693 # the threshold is advised if there are logs for false positive detections
4694 # with high collateral damage, and will cause Advanced DDoS to attempt to
4695 # find a less aggressive rule that satisfies the constraint. If a suitable
4696 # rule cannot be found, the system falls back to either no mitigation for
4697 # smaller attacks or broader network throttles for larger ones.
4698 &quot;ddosProtection&quot;: &quot;A String&quot;,
4699 },
4700 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4701 # create the resource.
4702 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
4703 # unique in the organization in which the security policy is created. This
4704 # should only be used when SecurityPolicyType is FIREWALL.
4705 # The name must be 1-63 characters long, and comply with
4706 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
4707 # characters long and match the regular expression
4708 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
4709 # lowercase letter, and all following characters must be a dash, lowercase
4710 # letter, or digit, except the last character, which cannot be a dash.
4711 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
4712 # the metadata&#x27;s contents and used for optimistic locking. The
4713 # fingerprint is initially generated by Compute Engine and changes after
4714 # every request to modify or update metadata. You must always provide an
4715 # up-to-date fingerprint hash in order to update or change metadata,
4716 # otherwise the request will fail with error412 conditionNotMet.
4717 #
4718 # To see the latest fingerprint, make get() request to the
4719 # security policy.
4720 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
4721 # defined by the server.
4722 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
4723 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
4724 # is essentially a hash of the labels set used for optimistic locking. The
4725 # fingerprint is initially generated by Compute Engine and changes after
4726 # every request to modify or update labels. You must always provide an
4727 # up-to-date fingerprint hash in order to update or change labels.
4728 #
4729 # To see the latest fingerprint, make get() request to the
4730 # security policy.
4731 &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.
4732 # Label values may be empty.
4733 &quot;a_key&quot;: &quot;A String&quot;,
4734 },
4735 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
4736 # The name must be 1-63 characters long, and comply withRFC1035.
4737 # Specifically, the name must be 1-63 characters long and match the regular
4738 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
4739 # character must be a lowercase letter, and all following characters must
4740 # be a dash, lowercase letter, or digit, except the last character, which
4741 # cannot be a dash.
4742 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
4743 &quot;recaptchaOptionsConfig&quot;: {
4744 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
4745 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
4746 # the security policy. The specified site key needs to be created from the
4747 # reCAPTCHA API. The user is responsible for the validity of the specified
4748 # site key. If not specified, a Google-managed site key is used.
4749 # This field is only supported in Global Security Policies of type
4750 # CLOUD_ARMOR.
4751 },
4752 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
4753 # resides. This field is not applicable to global security policies.
4754 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
4755 # policy can not exceed a set number of tuples.
4756 &quot;rules&quot;: [ # A list of rules that belong to this policy.
4757 # There must always be a default rule which is a rule with priority
4758 # 2147483647 and match all condition (for the match condition this means
4759 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
4760 # must be either match &quot;*&quot; or not set). If no rules are provided when
4761 # creating a security policy, a default rule with action &quot;allow&quot; will be
4762 # added.
4763 { # Represents a rule that describes one or more match conditions along with
4764 # the action to be taken when traffic matches this condition (allow or deny).
4765 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
4766 # The following are the valid actions:
4767 #
4768 # - allow: allow access to target.
4769 # - deny(STATUS): deny access to target, returns the
4770 # HTTP response code specified. Valid values for `STATUS`
4771 # are 403, 404, and 502.
4772 # - rate_based_ban: limit client traffic to the configured
4773 # threshold and ban the client if the traffic exceeds the threshold.
4774 # Configure parameters for this action in RateLimitOptions. Requires
4775 # rate_limit_options to be set.
4776 # - redirect: redirect to a different target. This can
4777 # either be an internal reCAPTCHA redirect, or an external URL-based
4778 # redirect via a 302 response. Parameters for this action can be configured
4779 # via redirectOptions. This action is only supported in Global Security
4780 # Policies of type CLOUD_ARMOR.
4781 # - throttle: limit
4782 # client traffic to the configured threshold. Configure parameters for this
4783 # action in rateLimitOptions. Requires rate_limit_options to be set for
4784 # this.
4785 # - fairshare (preview only): when traffic reaches the
4786 # threshold limit, requests from the clients matching this rule begin to be
4787 # rate-limited using the Fair Share algorithm. This action is only allowed
4788 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
4789 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
4790 # create the resource.
4791 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
4792 # specified when versioned_expr is set to FIREWALL.
4793 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
4794 # enabled, logs will be exported to the configured export destination in
4795 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
4796 # cannot enable logging on &quot;goto_next&quot; rules.
4797 #
4798 # This field may only be specified when the versioned_expr is set to
4799 # FIREWALL.
4800 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
4801 # This field is only supported in Global Security Policies of type
4802 # CLOUD_ARMOR.
4803 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
4804 # present.
4805 {
4806 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
4807 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
4808 },
4809 ],
4810 },
4811 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
4812 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
4813 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
4814 # Exactly one field must be specified.
4815 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
4816 # This field must be specified if versioned_expr is specified and cannot
4817 # be specified if versioned_expr is not specified.
4818 &quot;destIpRanges&quot;: [ # CIDR IP address range.
4819 #
4820 # This field may only be specified when versioned_expr is set to
4821 # FIREWALL.
4822 &quot;A String&quot;,
4823 ],
4824 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
4825 #
4826 # This field may only be specified when versioned_expr is set to
4827 # FIREWALL.
4828 {
4829 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
4830 # required when creating a firewall rule. This value can either be
4831 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
4832 # protocol number.
4833 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
4834 # only applicable for UDP or TCP protocol. Each entry must be either
4835 # an integer or a range. If not specified, this rule applies to
4836 # connections through any port.
4837 #
4838 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
4839 #
4840 # This field may only be specified when versioned_expr is set to
4841 # FIREWALL.
4842 &quot;A String&quot;,
4843 ],
4844 },
4845 ],
4846 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
4847 #
4848 # This field may only be specified when versioned_expr is set to
4849 # FIREWALL.
4850 {
4851 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
4852 # required when creating a firewall rule. This value can either be
4853 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
4854 # protocol number.
4855 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
4856 # only applicable for UDP or TCP protocol. Each entry must be either
4857 # an integer or a range. If not specified, this rule applies to
4858 # connections through any port.
4859 #
4860 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
4861 #
4862 # This field may only be specified when versioned_expr is set to
4863 # FIREWALL.
4864 &quot;A String&quot;,
4865 ],
4866 },
4867 ],
4868 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
4869 # Maximum number of src_ip_ranges allowed is 10.
4870 &quot;A String&quot;,
4871 ],
4872 },
4873 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
4874 # A CEVAL expression is used to specify match criteria such as origin.ip,
4875 # source.region_code and contents in the request header.
4876 # Expressions containing `evaluateThreatIntelligence` require a Cloud
4877 # Armor Enterprise subscription and are not supported in Edge Policies
4878 # nor in Regional Policies. Expressions containing
4879 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
4880 # Enterprise subscription and are only supported in Global Security
4881 # Policies.
4882 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4883 # are documented at https://github.com/google/cel-spec.
4884 #
4885 # Example (Comparison):
4886 #
4887 # title: &quot;Summary size limit&quot;
4888 # description: &quot;Determines if a summary is less than 100 chars&quot;
4889 # expression: &quot;document.summary.size() &lt; 100&quot;
4890 #
4891 # Example (Equality):
4892 #
4893 # title: &quot;Requestor is owner&quot;
4894 # description: &quot;Determines if requestor is the document owner&quot;
4895 # expression: &quot;document.owner == request.auth.claims.email&quot;
4896 #
4897 # Example (Logic):
4898 #
4899 # title: &quot;Public documents&quot;
4900 # description: &quot;Determine whether the document should be publicly visible&quot;
4901 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4902 #
4903 # Example (Data Manipulation):
4904 #
4905 # title: &quot;Notification string&quot;
4906 # description: &quot;Create a notification string with a timestamp.&quot;
4907 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4908 #
4909 # The exact variables and functions that may be referenced within an expression
4910 # are determined by the service that evaluates it. See the service
4911 # documentation for additional information.
4912 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4913 # describes the expression, e.g. when hovered over it in a UI.
4914 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4915 # syntax.
4916 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4917 # reporting, e.g. a file name and a position in the file.
4918 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4919 # its purpose. This can be used e.g. in UIs which allow to enter the
4920 # expression.
4921 },
4922 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
4923 # CEVAL expression (i.e., &#x27;expr&#x27;).
4924 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
4925 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
4926 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4927 # action-tokens. The provided site keys need to be created from
4928 # reCAPTCHA API under the same project where the security policy is
4929 # created.
4930 &quot;A String&quot;,
4931 ],
4932 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
4933 # session-tokens. The provided site keys need to be created from
4934 # reCAPTCHA API under the same project where the security policy is
4935 # created.
4936 &quot;A String&quot;,
4937 ],
4938 },
4939 },
4940 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
4941 # If this field is specified, config must also be specified.
4942 # Available preconfigured expressions along with their requirements are:
4943 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
4944 # config.
4945 },
4946 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
4947 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
4948 # &#x27;action&#x27; is enforced.
4949 #
4950 # The match criteria for a rule consists of built-in match fields (like
4951 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
4952 # (&#x27;userDefinedFields&#x27;).
4953 #
4954 # Field values may be extracted directly from the packet or derived from it
4955 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
4956 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
4957 # header is found in the packet and the entire field is in bounds.
4958 #
4959 # Each match field may specify which values can match it, listing one or
4960 # more ranges, prefixes, or exact values that are considered a match for
4961 # the field. A field value must be present in order to match a specified
4962 # match field. If no match values are specified for a match field, then any
4963 # field value is considered to match it, and it&#x27;s not required to be
4964 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
4965 #
4966 # For a packet to match a rule, all specified match fields must match the
4967 # corresponding field values derived from the packet.
4968 #
4969 # Example:
4970 #
4971 # networkMatch:
4972 # srcIpRanges:
4973 # - &quot;192.0.2.0/24&quot;
4974 # - &quot;198.51.100.0/24&quot;
4975 # userDefinedFields:
4976 # - name: &quot;ipv4_fragment_offset&quot;
4977 # values:
4978 # - &quot;1-0x1fff&quot;
4979 #
4980 # The above match condition matches packets with a source IP in
4981 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
4982 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
4983 # against.
4984 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
4985 # format.
4986 &quot;A String&quot;,
4987 ],
4988 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
4989 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
4990 &quot;A String&quot;,
4991 ],
4992 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
4993 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
4994 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
4995 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
4996 &quot;A String&quot;,
4997 ],
4998 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
4999 42,
5000 ],
5001 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
5002 &quot;A String&quot;,
5003 ],
5004 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5005 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5006 &quot;A String&quot;,
5007 ],
5008 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
5009 # IP address.
5010 &quot;A String&quot;,
5011 ],
5012 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
5013 # matching values for that field.
5014 {
5015 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
5016 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
5017 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
5018 # range (e.g. &quot;0x400-0x7ff&quot;).
5019 &quot;A String&quot;,
5020 ],
5021 },
5022 ],
5023 },
5024 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
5025 # does not evaluate preconfigured WAF rules, i.e., if
5026 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
5027 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
5028 {
5029 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
5030 # preconfigured WAF evaluation.
5031 {
5032 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5033 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5034 },
5035 ],
5036 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
5037 # inspection during preconfigured WAF evaluation.
5038 {
5039 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5040 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5041 },
5042 ],
5043 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
5044 # inspection during preconfigured WAF evaluation.
5045 {
5046 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5047 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5048 },
5049 ],
5050 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
5051 # from inspection during preconfigured WAF evaluation. Note that the
5052 # parameter can be in the query string or in the POST body.
5053 {
5054 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5055 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5056 },
5057 ],
5058 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
5059 # inspection during preconfigured WAF evaluation. When specifying this
5060 # field, the query or fragment part should be excluded.
5061 {
5062 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5063 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5064 },
5065 ],
5066 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
5067 # preconfigured WAF exclusion. If omitted, it refers to all the rule
5068 # IDs under the WAF rule set.
5069 &quot;A String&quot;,
5070 ],
5071 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
5072 },
5073 ],
5074 },
5075 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
5076 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
5077 # must be a positive value between 0 and 2147483647.
5078 # Rules are evaluated from highest to lowest priority where 0 is the
5079 # highest priority and 2147483647 is the lowest priority.
5080 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
5081 # &quot;fairshare&quot;. Cannot be specified for any other actions.
5082 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
5083 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
5084 # the traffic will continue to be banned by the rate limit after the
5085 # rate falls below the threshold.
5086 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
5087 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
5088 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
5089 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
5090 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
5091 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
5092 },
5093 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
5094 # threshold. Valid option is &quot;allow&quot; only.
5095 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
5096 # values are:
5097 #
5098 # - ALL: A single rate limit threshold is applied to all
5099 # the requests matching this rule. This is the default value if
5100 # &quot;enforceOnKey&quot; is not configured.
5101 # - IP: The source IP address of
5102 # the request is the key. Each IP has this limit enforced
5103 # separately.
5104 # - HTTP_HEADER: The value of the HTTP
5105 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
5106 # value is truncated to the first 128 bytes of the header value. If no
5107 # such header is present in the request, the key type defaults toALL.
5108 # - XFF_IP: The first IP address (i.e. the
5109 # originating client IP address) specified in the list of IPs under
5110 # X-Forwarded-For HTTP header. If no such header is present or the value
5111 # is not a valid IP, the key defaults to the source IP address of
5112 # the request i.e. key type IP.
5113 # - HTTP_COOKIE: The value of the HTTP
5114 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
5115 # value is truncated to the first 128 bytes of the cookie value. If no
5116 # such cookie is present in the request, the key type defaults toALL.
5117 # - HTTP_PATH: The URL path of the HTTP request. The key
5118 # value is truncated to the first 128 bytes.
5119 # - SNI: Server name indication in the TLS session of the
5120 # HTTPS request. The key value is truncated to the first 128 bytes. The
5121 # key type defaults to ALL on a HTTP session.
5122 # - REGION_CODE: The country/region from which the request
5123 # originates.
5124 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
5125 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5126 # key type defaults to ALL.
5127 # - USER_IP: The IP address of the originating client,
5128 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
5129 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
5130 # an IP address cannot be resolved from it, the key type defaults toIP.
5131 #
5132 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
5133 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5134 # key type defaults to ALL.
5135 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
5136 # limit threshold is enforced for all the requests matching the rule.
5137 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
5138 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
5139 # ratelimit threshold/action is enforced. You can specify up to 3
5140 # enforce_on_key_configs. If enforce_on_key_configs is specified,
5141 # enforce_on_key must not be specified.
5142 {
5143 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
5144 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
5145 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
5146 # taken as the key value.
5147 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
5148 # values are:
5149 #
5150 # - ALL: A single rate limit threshold is applied to all
5151 # the requests matching this rule. This is the default value if
5152 # &quot;enforceOnKeyConfigs&quot; is not configured.
5153 # - IP: The source IP address of
5154 # the request is the key. Each IP has this limit enforced
5155 # separately.
5156 # - HTTP_HEADER: The value of the HTTP
5157 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
5158 # value is truncated to the first 128 bytes of the header value. If no
5159 # such header is present in the request, the key type defaults toALL.
5160 # - XFF_IP: The first IP address (i.e. the
5161 # originating client IP address) specified in the list of IPs under
5162 # X-Forwarded-For HTTP header. If no such header is present or the
5163 # value is not a valid IP, the key defaults to the source IP address of
5164 # the request i.e. key type IP.
5165 # - HTTP_COOKIE: The value of the HTTP
5166 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
5167 # value is truncated to the first 128 bytes of the cookie value. If no
5168 # such cookie is present in the request, the key type defaults toALL.
5169 # - HTTP_PATH: The URL path of the HTTP request. The key
5170 # value is truncated to the first 128 bytes.
5171 # - SNI: Server name indication in the TLS session of
5172 # the HTTPS request. The key value is truncated to the first 128 bytes.
5173 # The key type defaults to ALL on a HTTP session.
5174 # - REGION_CODE: The country/region from which the
5175 # request originates.
5176 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
5177 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5178 # key type defaults to ALL.
5179 # - USER_IP: The IP address of the originating client,
5180 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
5181 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
5182 # or an IP address cannot be resolved from it, the key type defaults toIP.
5183 #
5184 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
5185 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
5186 # key type defaults to ALL.
5187 },
5188 ],
5189 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
5190 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
5191 # value.
5192 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
5193 # value.
5194 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
5195 # threshold, to either deny with a specified HTTP response code, or
5196 # redirect to a different endpoint.
5197 # Valid options are `deny(STATUS)`, where valid values for
5198 # `STATUS` are 403, 404, 429, and 502, and
5199 # `redirect`, where the redirect parameters come from
5200 # `exceedRedirectOptions` below.
5201 # The `redirect` action is only supported in Global Security Policies of
5202 # type CLOUD_ARMOR.
5203 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
5204 # above the configured rate limit threshold
5205 &quot;code&quot;: 42, # The status code, which should be an enum value of
5206 # google.rpc.Code.
5207 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
5208 },
5209 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
5210 # action. Cannot be specified if the exceed action is not redirect.
5211 # This field is only supported in Global Security Policies of type
5212 # CLOUD_ARMOR.
5213 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
5214 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
5215 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
5216 #
5217 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
5218 # challenge assessment.
5219 # - EXTERNAL_302: redirect to a different URL via a 302
5220 # response.
5221 },
5222 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
5223 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
5224 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
5225 },
5226 },
5227 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
5228 # other actions.
5229 # This field is only supported in Global Security Policies of type
5230 # CLOUD_ARMOR.
5231 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
5232 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
5233 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
5234 #
5235 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
5236 # challenge assessment.
5237 # - EXTERNAL_302: redirect to a different URL via a 302
5238 # response.
5239 },
5240 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
5241 # other actions.
5242 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
5243 # rule.
5244 # [Deprecated] Use requiredManagedProtectionTiers instead.
5245 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
5246 # policy. This can only be set during rule creation, if rule number is not
5247 # specified it will be generated by the server.
5248 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
5249 # policy rule.
5250 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
5251 # allows you to control which network&#x27;s VMs get this rule. If this field
5252 # is left blank, all VMs within the organization will receive the rule.
5253 #
5254 # This field may only be specified when versioned_expr is set to FIREWALL.
5255 &quot;A String&quot;,
5256 ],
5257 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
5258 # applied with this rule.
5259 &quot;A String&quot;,
5260 ],
5261 },
5262 ],
5263 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
5264 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
5265 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5266 # unique in the organization in which the security policy is created. This
5267 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
5268 # The name must be 1-63 characters long, and comply with
5269 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5270 # characters long and match the regular expression
5271 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5272 # lowercase letter, and all following characters must be a dash, lowercase
5273 # letter, or digit, except the last character, which cannot be a dash.
5274 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
5275 #
5276 # - CLOUD_ARMOR: Cloud Armor backend security policies can
5277 # be configured to filter incoming HTTP requests targeting backend services.
5278 # They filter requests before they hit the origin servers.
5279 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
5280 # be configured to filter incoming HTTP requests targeting backend services
5281 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
5282 # They filter requests before the request is served from Google&#x27;s cache.
5283 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
5284 # internal service policies can be configured to filter HTTP requests
5285 # targeting services managed by Traffic Director in a service mesh. They
5286 # filter requests before the request is served from the application.
5287 #
5288 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
5289 # can be configured to filter packets targeting network load balancing
5290 # resources such as backend services, target pools, target instances, and
5291 # instances with external IPs. They filter requests before the request is
5292 # served from the application.
5293 #
5294 #
5295 # This field can be set only at resource creation time.
5296 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
5297 # user-defined field consists of up to 4 bytes extracted from a fixed offset
5298 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
5299 # optional mask to select certain bits. Rules may then specify matching
5300 # values for these fields.
5301 #
5302 # Example:
5303 #
5304 # userDefinedFields:
5305 # - name: &quot;ipv4_fragment_offset&quot;
5306 # base: IPV4
5307 # offset: 6
5308 # size: 2
5309 # mask: &quot;0x1fff&quot;
5310 {
5311 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
5312 #
5313 # - IPV4: Points to the beginning of the IPv4 header.
5314 # - IPV6: Points to the beginning of the IPv6 header.
5315 # - TCP: Points to the beginning of the TCP header, skipping
5316 # over any IPv4 options or IPv6 extension headers. Not present for
5317 # non-first fragments.
5318 # - UDP: Points to the beginning of the UDP header, skipping
5319 # over any IPv4 options or IPv6 extension headers. Not present for
5320 # non-first fragments.
5321 #
5322 #
5323 # required
5324 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
5325 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
5326 # The last byte of the field (in network byte order) corresponds to the
5327 # least significant byte of the mask.
5328 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
5329 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
5330 # &#x27;base&#x27;.
5331 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
5332 },
5333 ],
5334 },
5335 ],
5336 &quot;kind&quot;: &quot;compute#securityPolicyList&quot;, # Output only. [Output Only] Type of resource. Alwayscompute#securityPolicyList for listsof securityPolicies
5337 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
5338 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
5339 # the query parameter pageToken in the next list request.
5340 # Subsequent list requests will have their own nextPageToken to
5341 # continue paging through the results.
5342 &quot;unreachables&quot;: [ # Output only. [Output Only] Unreachable resources.
5343 &quot;A String&quot;,
5344 ],
5345 &quot;warning&quot;: { # [Output Only] Informational warning message.
5346 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
5347 # Engine returns NO_RESULTS_ON_PAGE if there
5348 # are no results in the response.
5349 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
5350 # value format. For example:
5351 #
5352 # &quot;data&quot;: [
5353 # {
5354 # &quot;key&quot;: &quot;scope&quot;,
5355 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
5356 # }
5357 {
5358 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
5359 # returned. For example, for warnings where there are no results in a list
5360 # request for a particular zone, this key might be scope and
5361 # the key value might be the zone name. Other examples might be a key
5362 # indicating a deprecated resource and a suggested replacement, or a
5363 # warning about invalid network settings (for example, if an instance
5364 # attempts to perform IP forwarding but is not enabled for IP forwarding).
5365 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5366 },
5367 ],
5368 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5369 },
5370 }</pre>
5371 </div>
5372
5373 <div class="method">
5374 <code class="details" id="listPreconfiguredExpressionSets">listPreconfiguredExpressionSets(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code>
5375 <pre>Gets the current list of preconfigured Web Application Firewall (WAF)
5376 expressions.
5377
5378 Args:
5379 project: string, Project ID for this request. (required)
5380 filter: string, A filter expression that filters resources listed in the response. Most
5381 Compute resources support two types of filter expressions:
5382 expressions that support regular expressions and expressions that follow
5383 API improvement proposal AIP-160.
5384 These two types of filter expressions cannot be mixed in one request.
5385
5386 If you want to use AIP-160, your expression must specify the field name, an
5387 operator, and the value that you want to use for filtering. The value
5388 must be a string, a number, or a boolean. The operator
5389 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
5390
5391 For example, if you are filtering Compute Engine instances, you can
5392 exclude instances named `example-instance` by specifying
5393 `name != example-instance`.
5394
5395 The `:*` comparison can be used to test whether a key has been defined.
5396 For example, to find all objects with `owner` label use:
5397 ```
5398 labels.owner:*
5399 ```
5400
5401 You can also filter nested fields. For example, you could specify
5402 `scheduling.automaticRestart = false` to include instances only
5403 if they are not scheduled for automatic restarts. You can use filtering
5404 on nested fields to filter based onresource labels.
5405
5406 To filter on multiple expressions, provide each separate expression within
5407 parentheses. For example:
5408 ```
5409 (scheduling.automaticRestart = true)
5410 (cpuPlatform = &quot;Intel Skylake&quot;)
5411 ```
5412 By default, each expression is an `AND` expression. However, you
5413 can include `AND` and `OR` expressions explicitly.
5414 For example:
5415 ```
5416 (cpuPlatform = &quot;Intel Skylake&quot;) OR
5417 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
5418 (scheduling.automaticRestart = true)
5419 ```
5420
5421 If you want to use a regular expression, use the `eq` (equal) or `ne`
5422 (not equal) operator against a single un-parenthesized expression with or
5423 without quotes or against multiple parenthesized expressions. Examples:
5424
5425 `fieldname eq unquoted literal`
5426 `fieldname eq &#x27;single quoted literal&#x27;`
5427 `fieldname eq &quot;double quoted literal&quot;`
5428 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
5429
5430 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
5431 The literal value must match the entire field.
5432
5433 For example, to filter for instances that do not end with name &quot;instance&quot;,
5434 you would use `name ne .*instance`.
5435
5436 You cannot combine constraints on multiple fields using regular
5437 expressions.
5438 maxResults: integer, The maximum number of results per page that should be returned.
5439 If the number of available results is larger than `maxResults`,
5440 Compute Engine returns a `nextPageToken` that can be used to get
5441 the next page of results in subsequent list requests. Acceptable values are
5442 `0` to `500`, inclusive. (Default: `500`)
5443 orderBy: string, Sorts list results by a certain order. By default, results
5444 are returned in alphanumerical order based on the resource name.
5445
5446 You can also sort results in descending order based on the creation
5447 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
5448 results based on the `creationTimestamp` field in
5449 reverse chronological order (newest result first). Use this to sort
5450 resources like operations so that the newest operation is returned first.
5451
5452 Currently, only sorting by `name` or
5453 `creationTimestamp desc` is supported.
5454 pageToken: string, Specifies a page token to use. Set `pageToken` to the
5455 `nextPageToken` returned by a previous list request to get
5456 the next page of results.
5457 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
5458 of failure. The default value is false.
5459
5460 For example, when partial success behavior is enabled, aggregatedList for a
5461 single zone scope either returns all resources in the zone or no resources,
5462 with an error code.
5463 x__xgafv: string, V1 error format.
5464 Allowed values
5465 1 - v1 error format
5466 2 - v2 error format
5467
5468 Returns:
5469 An object of the form:
5470
5471 {
5472 &quot;preconfiguredExpressionSets&quot;: {
5473 &quot;wafRules&quot;: {
5474 &quot;expressionSets&quot;: [ # List of entities that are currently supported for WAF rules.
5475 {
5476 &quot;aliases&quot;: [ # A list of alternate IDs. The format should be:
5477 # - E.g. XSS-stable
5478 # Generic suffix like &quot;stable&quot; is particularly useful if a policy
5479 # likes to avail newer set of expressions without having to change
5480 # the policy.
5481 # A given alias name can&#x27;t be used for more than one entity set.
5482 &quot;A String&quot;,
5483 ],
5484 &quot;expressions&quot;: [ # List of available expressions.
5485 {
5486 &quot;id&quot;: &quot;A String&quot;, # Expression ID should uniquely identify the origin of the expression.
5487 # E.g. owasp-crs-v020901-id973337 identifies Owasp core rule set
5488 # version 2.9.1 rule id 973337.
5489 # The ID could be used to determine the individual attack definition
5490 # that has been detected. It could also be used to exclude it from
5491 # the policy in case of false positive.
5492 # required
5493 &quot;sensitivity&quot;: 42, # The sensitivity value associated with the WAF rule ID. This corresponds
5494 # to the ModSecurity paranoia level, ranging from 1 to 4. 0 is reserved for
5495 # opt-in only rules.
5496 },
5497 ],
5498 &quot;id&quot;: &quot;A String&quot;, # Google specified expression set ID. The format should be:
5499 # - E.g. XSS-20170329
5500 # required
5501 },
5502 ],
5503 },
5504 },
5505 }</pre>
5506 </div>
5507
5508 <div class="method">
5509 <code class="details" id="list_next">list_next()</code>
5510 <pre>Retrieves the next page of results.
5511
5512 Args:
5513 previous_request: The request for the previous page. (required)
5514 previous_response: The response from the request for the previous page. (required)
5515
5516 Returns:
5517 A request object that you can call &#x27;execute()&#x27; on to request the next
5518 page. Returns None if there are no more items in the collection.
5519 </pre>
5520 </div>
5521
5522 <div class="method">
5523 <code class="details" id="patch">patch(project, securityPolicy, body=None, paths=None, requestId=None, updateMask=None, x__xgafv=None)</code>
5524 <pre>Patches the specified policy with the data included in the request. To
5525 clear fields in the policy, leave the fields empty and specify them in the
5526 updateMask. This cannot be used to be update the rules in the policy.
5527 Please use the per rule methods like addRule, patchRule, and removeRule
5528 instead.
5529
5530 Args:
5531 project: string, Project ID for this request. (required)
5532 securityPolicy: string, Name of the security policy to update. (required)
5533 body: object, The request body.
5534 The object takes the form of:
5535
5536 { # Represents a Google Cloud Armor security policy resource.
5537 #
5538 # Only external backend services that use load balancers can
5539 # reference a security policy. For more information, see
5540 # Google Cloud Armor security policy overview.
5541 &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
5542 &quot;autoDeployConfig&quot;: { # Configuration options for Adaptive Protection auto-deploy feature.
5543 &quot;confidenceThreshold&quot;: 3.14,
5544 &quot;expirationSec&quot;: 42,
5545 &quot;impactedBaselineThreshold&quot;: 3.14,
5546 &quot;loadThreshold&quot;: 3.14,
5547 },
5548 &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
5549 # This field is only supported in Global Security Policies of type
5550 # CLOUD_ARMOR.
5551 &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
5552 # This field is only supported in Global Security Policies of type
5553 # CLOUD_ARMOR.
5554 &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following:
5555 # STANDARD - opaque rules. (default)
5556 # PREMIUM - transparent rules.
5557 # This field is only supported in Global Security Policies of type
5558 # CLOUD_ARMOR.
5559 &quot;thresholdConfigs&quot;: [ # Configuration options for layer7 adaptive protection for various
5560 # customizable thresholds.
5561 {
5562 &quot;autoDeployConfidenceThreshold&quot;: 3.14,
5563 &quot;autoDeployExpirationSec&quot;: 42,
5564 &quot;autoDeployImpactedBaselineThreshold&quot;: 3.14,
5565 &quot;autoDeployLoadThreshold&quot;: 3.14,
5566 &quot;detectionAbsoluteQps&quot;: 3.14,
5567 &quot;detectionLoadThreshold&quot;: 3.14,
5568 &quot;detectionRelativeToBaselineQps&quot;: 3.14,
5569 &quot;name&quot;: &quot;A String&quot;, # The name must be 1-63 characters long, and comply withRFC1035.
5570 # The name must be unique within the security policy.
5571 &quot;trafficGranularityConfigs&quot;: [ # Configuration options for enabling Adaptive Protection to operate
5572 # on specified granular traffic units.
5573 { # Configurations to specifc granular traffic units processed by
5574 # Adaptive Protection.
5575 &quot;enableEachUniqueValue&quot;: True or False, # If enabled, traffic matching each unique value for the specified
5576 # type constitutes a separate traffic unit.
5577 # It can only be set to true if `value` is empty.
5578 &quot;type&quot;: &quot;A String&quot;, # Type of this configuration.
5579 &quot;value&quot;: &quot;A String&quot;, # Requests that match this value constitute a granular traffic unit.
5580 },
5581 ],
5582 },
5583 ],
5584 },
5585 },
5586 &quot;advancedOptionsConfig&quot;: {
5587 &quot;jsonCustomConfig&quot;: { # Custom configuration to apply the JSON parsing. Only applicable when
5588 # json_parsing is set to STANDARD.
5589 &quot;contentTypes&quot;: [ # A list of custom Content-Type header values to apply the JSON parsing.
5590 #
5591 # As per RFC 1341, a Content-Type header value has the following format:
5592 #
5593 # Content-Type := type &quot;/&quot; subtype *[&quot;;&quot; parameter]
5594 #
5595 # When configuring a custom Content-Type header value, only the
5596 # type/subtype needs to be specified, and the parameters should be
5597 # excluded.
5598 &quot;A String&quot;,
5599 ],
5600 },
5601 &quot;jsonParsing&quot;: &quot;A String&quot;,
5602 &quot;logLevel&quot;: &quot;A String&quot;,
5603 &quot;requestBodyInspectionSize&quot;: &quot;A String&quot;, # The maximum request size chosen by the customer with Waf enabled.
5604 # Values supported are &quot;8KB&quot;, &quot;16KB, &quot;32KB&quot;, &quot;48KB&quot; and &quot;64KB&quot;.
5605 # Values are case insensitive.
5606 &quot;userIpRequestHeaders&quot;: [ # An optional list of case-insensitive request header names to use for
5607 # resolving the callers client IP address.
5608 &quot;A String&quot;,
5609 ],
5610 },
5611 &quot;associations&quot;: [ # A list of associations that belong to this policy.
5612 {
5613 &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
5614 &quot;displayName&quot;: &quot;A String&quot;, # Output only. [Output Only] The display name of the security policy of the association.
5615 &quot;excludedFolders&quot;: [ # A list of folders to exclude from the security policy.
5616 &quot;A String&quot;,
5617 ],
5618 &quot;excludedProjects&quot;: [ # A list of projects to exclude from the security policy.
5619 &quot;A String&quot;,
5620 ],
5621 &quot;name&quot;: &quot;A String&quot;, # The name for an association.
5622 &quot;securityPolicyId&quot;: &quot;A String&quot;, # Output only. [Output Only] The security policy ID of the association.
5623 &quot;shortName&quot;: &quot;A String&quot;, # Output only. [Output Only] The short name of the security policy of the association.
5624 },
5625 ],
5626 &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
5627 &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
5628 },
5629 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
5630 # text format.
5631 &quot;ddosProtectionConfig&quot;: {
5632 &quot;ddosAdaptiveProtection&quot;: &quot;A String&quot;,
5633 &quot;ddosImpactedBaselineThreshold&quot;: 3.14, # DDoS Protection for Network Load Balancers (and VMs with public IPs)
5634 # builds DDoS mitigations that minimize collateral damage. It quantifies
5635 # this as the fraction of a non-abuse baseline that&#x27;s inadvertently
5636 # blocked.
5637 #
5638 # Rules whose collateral damage exceeds ddosImpactedBaselineThreshold will
5639 # not be deployed. Using a lower value will prioritize keeping collateral
5640 # damage low, possibly at the cost of its effectiveness in rate limiting
5641 # some or all of the attack. It should typically be unset, so Advanced DDoS
5642 # (and Adaptive Protection) uses the best mitigation it can find. Setting
5643 # the threshold is advised if there are logs for false positive detections
5644 # with high collateral damage, and will cause Advanced DDoS to attempt to
5645 # find a less aggressive rule that satisfies the constraint. If a suitable
5646 # rule cannot be found, the system falls back to either no mitigation for
5647 # smaller attacks or broader network throttles for larger ones.
5648 &quot;ddosProtection&quot;: &quot;A String&quot;,
5649 },
5650 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5651 # create the resource.
5652 &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
5653 # unique in the organization in which the security policy is created. This
5654 # should only be used when SecurityPolicyType is FIREWALL.
5655 # The name must be 1-63 characters long, and comply with
5656 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
5657 # characters long and match the regular expression
5658 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
5659 # lowercase letter, and all following characters must be a dash, lowercase
5660 # letter, or digit, except the last character, which cannot be a dash.
5661 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of
5662 # the metadata&#x27;s contents and used for optimistic locking. The
5663 # fingerprint is initially generated by Compute Engine and changes after
5664 # every request to modify or update metadata. You must always provide an
5665 # up-to-date fingerprint hash in order to update or change metadata,
5666 # otherwise the request will fail with error412 conditionNotMet.
5667 #
5668 # To see the latest fingerprint, make get() request to the
5669 # security policy.
5670 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
5671 # defined by the server.
5672 &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyfor security policies
5673 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which
5674 # is essentially a hash of the labels set used for optimistic locking. The
5675 # fingerprint is initially generated by Compute Engine and changes after
5676 # every request to modify or update labels. You must always provide an
5677 # up-to-date fingerprint hash in order to update or change labels.
5678 #
5679 # To see the latest fingerprint, make get() request to the
5680 # security policy.
5681 &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.
5682 # Label values may be empty.
5683 &quot;a_key&quot;: &quot;A String&quot;,
5684 },
5685 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
5686 # The name must be 1-63 characters long, and comply withRFC1035.
5687 # Specifically, the name must be 1-63 characters long and match the regular
5688 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
5689 # character must be a lowercase letter, and all following characters must
5690 # be a dash, lowercase letter, or digit, except the last character, which
5691 # cannot be a dash.
5692 &quot;parent&quot;: &quot;A String&quot;, # Output only. [Output Only] The parent of the security policy.
5693 &quot;recaptchaOptionsConfig&quot;: {
5694 &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the
5695 # rules using the redirect action with the type of GOOGLE_RECAPTCHA under
5696 # the security policy. The specified site key needs to be created from the
5697 # reCAPTCHA API. The user is responsible for the validity of the specified
5698 # site key. If not specified, a Google-managed site key is used.
5699 # This field is only supported in Global Security Policies of type
5700 # CLOUD_ARMOR.
5701 },
5702 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of the region where the regional security policy
5703 # resides. This field is not applicable to global security policies.
5704 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Total count of all security policy rule tuples. A security
5705 # policy can not exceed a set number of tuples.
5706 &quot;rules&quot;: [ # A list of rules that belong to this policy.
5707 # There must always be a default rule which is a rule with priority
5708 # 2147483647 and match all condition (for the match condition this means
5709 # match &quot;*&quot; for srcIpRanges and for the networkMatch condition every field
5710 # must be either match &quot;*&quot; or not set). If no rules are provided when
5711 # creating a security policy, a default rule with action &quot;allow&quot; will be
5712 # added.
5713 { # Represents a rule that describes one or more match conditions along with
5714 # the action to be taken when traffic matches this condition (allow or deny).
5715 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
5716 # The following are the valid actions:
5717 #
5718 # - allow: allow access to target.
5719 # - deny(STATUS): deny access to target, returns the
5720 # HTTP response code specified. Valid values for `STATUS`
5721 # are 403, 404, and 502.
5722 # - rate_based_ban: limit client traffic to the configured
5723 # threshold and ban the client if the traffic exceeds the threshold.
5724 # Configure parameters for this action in RateLimitOptions. Requires
5725 # rate_limit_options to be set.
5726 # - redirect: redirect to a different target. This can
5727 # either be an internal reCAPTCHA redirect, or an external URL-based
5728 # redirect via a 302 response. Parameters for this action can be configured
5729 # via redirectOptions. This action is only supported in Global Security
5730 # Policies of type CLOUD_ARMOR.
5731 # - throttle: limit
5732 # client traffic to the configured threshold. Configure parameters for this
5733 # action in rateLimitOptions. Requires rate_limit_options to be set for
5734 # this.
5735 # - fairshare (preview only): when traffic reaches the
5736 # threshold limit, requests from the clients matching this rule begin to be
5737 # rate-limited using the Fair Share algorithm. This action is only allowed
5738 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
5739 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
5740 # create the resource.
5741 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
5742 # specified when versioned_expr is set to FIREWALL.
5743 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
5744 # enabled, logs will be exported to the configured export destination in
5745 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
5746 # cannot enable logging on &quot;goto_next&quot; rules.
5747 #
5748 # This field may only be specified when the versioned_expr is set to
5749 # FIREWALL.
5750 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
5751 # This field is only supported in Global Security Policies of type
5752 # CLOUD_ARMOR.
5753 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
5754 # present.
5755 {
5756 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
5757 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
5758 },
5759 ],
5760 },
5761 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
5762 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
5763 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
5764 # Exactly one field must be specified.
5765 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
5766 # This field must be specified if versioned_expr is specified and cannot
5767 # be specified if versioned_expr is not specified.
5768 &quot;destIpRanges&quot;: [ # CIDR IP address range.
5769 #
5770 # This field may only be specified when versioned_expr is set to
5771 # FIREWALL.
5772 &quot;A String&quot;,
5773 ],
5774 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
5775 #
5776 # This field may only be specified when versioned_expr is set to
5777 # FIREWALL.
5778 {
5779 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
5780 # required when creating a firewall rule. This value can either be
5781 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
5782 # protocol number.
5783 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
5784 # only applicable for UDP or TCP protocol. Each entry must be either
5785 # an integer or a range. If not specified, this rule applies to
5786 # connections through any port.
5787 #
5788 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
5789 #
5790 # This field may only be specified when versioned_expr is set to
5791 # FIREWALL.
5792 &quot;A String&quot;,
5793 ],
5794 },
5795 ],
5796 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
5797 #
5798 # This field may only be specified when versioned_expr is set to
5799 # FIREWALL.
5800 {
5801 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
5802 # required when creating a firewall rule. This value can either be
5803 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
5804 # protocol number.
5805 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
5806 # only applicable for UDP or TCP protocol. Each entry must be either
5807 # an integer or a range. If not specified, this rule applies to
5808 # connections through any port.
5809 #
5810 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
5811 #
5812 # This field may only be specified when versioned_expr is set to
5813 # FIREWALL.
5814 &quot;A String&quot;,
5815 ],
5816 },
5817 ],
5818 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
5819 # Maximum number of src_ip_ranges allowed is 10.
5820 &quot;A String&quot;,
5821 ],
5822 },
5823 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
5824 # A CEVAL expression is used to specify match criteria such as origin.ip,
5825 # source.region_code and contents in the request header.
5826 # Expressions containing `evaluateThreatIntelligence` require a Cloud
5827 # Armor Enterprise subscription and are not supported in Edge Policies
5828 # nor in Regional Policies. Expressions containing
5829 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
5830 # Enterprise subscription and are only supported in Global Security
5831 # Policies.
5832 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
5833 # are documented at https://github.com/google/cel-spec.
5834 #
5835 # Example (Comparison):
5836 #
5837 # title: &quot;Summary size limit&quot;
5838 # description: &quot;Determines if a summary is less than 100 chars&quot;
5839 # expression: &quot;document.summary.size() &lt; 100&quot;
5840 #
5841 # Example (Equality):
5842 #
5843 # title: &quot;Requestor is owner&quot;
5844 # description: &quot;Determines if requestor is the document owner&quot;
5845 # expression: &quot;document.owner == request.auth.claims.email&quot;
5846 #
5847 # Example (Logic):
5848 #
5849 # title: &quot;Public documents&quot;
5850 # description: &quot;Determine whether the document should be publicly visible&quot;
5851 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
5852 #
5853 # Example (Data Manipulation):
5854 #
5855 # title: &quot;Notification string&quot;
5856 # description: &quot;Create a notification string with a timestamp.&quot;
5857 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
5858 #
5859 # The exact variables and functions that may be referenced within an expression
5860 # are determined by the service that evaluates it. See the service
5861 # documentation for additional information.
5862 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
5863 # describes the expression, e.g. when hovered over it in a UI.
5864 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
5865 # syntax.
5866 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
5867 # reporting, e.g. a file name and a position in the file.
5868 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
5869 # its purpose. This can be used e.g. in UIs which allow to enter the
5870 # expression.
5871 },
5872 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
5873 # CEVAL expression (i.e., &#x27;expr&#x27;).
5874 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
5875 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
5876 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5877 # action-tokens. The provided site keys need to be created from
5878 # reCAPTCHA API under the same project where the security policy is
5879 # created.
5880 &quot;A String&quot;,
5881 ],
5882 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
5883 # session-tokens. The provided site keys need to be created from
5884 # reCAPTCHA API under the same project where the security policy is
5885 # created.
5886 &quot;A String&quot;,
5887 ],
5888 },
5889 },
5890 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
5891 # If this field is specified, config must also be specified.
5892 # Available preconfigured expressions along with their requirements are:
5893 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
5894 # config.
5895 },
5896 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
5897 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
5898 # &#x27;action&#x27; is enforced.
5899 #
5900 # The match criteria for a rule consists of built-in match fields (like
5901 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
5902 # (&#x27;userDefinedFields&#x27;).
5903 #
5904 # Field values may be extracted directly from the packet or derived from it
5905 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
5906 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
5907 # header is found in the packet and the entire field is in bounds.
5908 #
5909 # Each match field may specify which values can match it, listing one or
5910 # more ranges, prefixes, or exact values that are considered a match for
5911 # the field. A field value must be present in order to match a specified
5912 # match field. If no match values are specified for a match field, then any
5913 # field value is considered to match it, and it&#x27;s not required to be
5914 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
5915 #
5916 # For a packet to match a rule, all specified match fields must match the
5917 # corresponding field values derived from the packet.
5918 #
5919 # Example:
5920 #
5921 # networkMatch:
5922 # srcIpRanges:
5923 # - &quot;192.0.2.0/24&quot;
5924 # - &quot;198.51.100.0/24&quot;
5925 # userDefinedFields:
5926 # - name: &quot;ipv4_fragment_offset&quot;
5927 # values:
5928 # - &quot;1-0x1fff&quot;
5929 #
5930 # The above match condition matches packets with a source IP in
5931 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
5932 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
5933 # against.
5934 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
5935 # format.
5936 &quot;A String&quot;,
5937 ],
5938 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5939 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5940 &quot;A String&quot;,
5941 ],
5942 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
5943 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
5944 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
5945 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
5946 &quot;A String&quot;,
5947 ],
5948 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
5949 42,
5950 ],
5951 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
5952 &quot;A String&quot;,
5953 ],
5954 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
5955 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
5956 &quot;A String&quot;,
5957 ],
5958 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
5959 # IP address.
5960 &quot;A String&quot;,
5961 ],
5962 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
5963 # matching values for that field.
5964 {
5965 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
5966 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
5967 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
5968 # range (e.g. &quot;0x400-0x7ff&quot;).
5969 &quot;A String&quot;,
5970 ],
5971 },
5972 ],
5973 },
5974 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
5975 # does not evaluate preconfigured WAF rules, i.e., if
5976 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
5977 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
5978 {
5979 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
5980 # preconfigured WAF evaluation.
5981 {
5982 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5983 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5984 },
5985 ],
5986 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
5987 # inspection during preconfigured WAF evaluation.
5988 {
5989 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5990 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5991 },
5992 ],
5993 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
5994 # inspection during preconfigured WAF evaluation.
5995 {
5996 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
5997 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
5998 },
5999 ],
6000 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
6001 # from inspection during preconfigured WAF evaluation. Note that the
6002 # parameter can be in the query string or in the POST body.
6003 {
6004 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6005 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6006 },
6007 ],
6008 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
6009 # inspection during preconfigured WAF evaluation. When specifying this
6010 # field, the query or fragment part should be excluded.
6011 {
6012 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6013 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6014 },
6015 ],
6016 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
6017 # preconfigured WAF exclusion. If omitted, it refers to all the rule
6018 # IDs under the WAF rule set.
6019 &quot;A String&quot;,
6020 ],
6021 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
6022 },
6023 ],
6024 },
6025 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
6026 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
6027 # must be a positive value between 0 and 2147483647.
6028 # Rules are evaluated from highest to lowest priority where 0 is the
6029 # highest priority and 2147483647 is the lowest priority.
6030 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
6031 # &quot;fairshare&quot;. Cannot be specified for any other actions.
6032 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
6033 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
6034 # the traffic will continue to be banned by the rate limit after the
6035 # rate falls below the threshold.
6036 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
6037 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
6038 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
6039 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
6040 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6041 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6042 },
6043 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
6044 # threshold. Valid option is &quot;allow&quot; only.
6045 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6046 # values are:
6047 #
6048 # - ALL: A single rate limit threshold is applied to all
6049 # the requests matching this rule. This is the default value if
6050 # &quot;enforceOnKey&quot; is not configured.
6051 # - IP: The source IP address of
6052 # the request is the key. Each IP has this limit enforced
6053 # separately.
6054 # - HTTP_HEADER: The value of the HTTP
6055 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6056 # value is truncated to the first 128 bytes of the header value. If no
6057 # such header is present in the request, the key type defaults toALL.
6058 # - XFF_IP: The first IP address (i.e. the
6059 # originating client IP address) specified in the list of IPs under
6060 # X-Forwarded-For HTTP header. If no such header is present or the value
6061 # is not a valid IP, the key defaults to the source IP address of
6062 # the request i.e. key type IP.
6063 # - HTTP_COOKIE: The value of the HTTP
6064 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6065 # value is truncated to the first 128 bytes of the cookie value. If no
6066 # such cookie is present in the request, the key type defaults toALL.
6067 # - HTTP_PATH: The URL path of the HTTP request. The key
6068 # value is truncated to the first 128 bytes.
6069 # - SNI: Server name indication in the TLS session of the
6070 # HTTPS request. The key value is truncated to the first 128 bytes. The
6071 # key type defaults to ALL on a HTTP session.
6072 # - REGION_CODE: The country/region from which the request
6073 # originates.
6074 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6075 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6076 # key type defaults to ALL.
6077 # - USER_IP: The IP address of the originating client,
6078 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6079 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
6080 # an IP address cannot be resolved from it, the key type defaults toIP.
6081 #
6082 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6083 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6084 # key type defaults to ALL.
6085 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
6086 # limit threshold is enforced for all the requests matching the rule.
6087 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
6088 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
6089 # ratelimit threshold/action is enforced. You can specify up to 3
6090 # enforce_on_key_configs. If enforce_on_key_configs is specified,
6091 # enforce_on_key must not be specified.
6092 {
6093 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6094 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
6095 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
6096 # taken as the key value.
6097 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6098 # values are:
6099 #
6100 # - ALL: A single rate limit threshold is applied to all
6101 # the requests matching this rule. This is the default value if
6102 # &quot;enforceOnKeyConfigs&quot; is not configured.
6103 # - IP: The source IP address of
6104 # the request is the key. Each IP has this limit enforced
6105 # separately.
6106 # - HTTP_HEADER: The value of the HTTP
6107 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6108 # value is truncated to the first 128 bytes of the header value. If no
6109 # such header is present in the request, the key type defaults toALL.
6110 # - XFF_IP: The first IP address (i.e. the
6111 # originating client IP address) specified in the list of IPs under
6112 # X-Forwarded-For HTTP header. If no such header is present or the
6113 # value is not a valid IP, the key defaults to the source IP address of
6114 # the request i.e. key type IP.
6115 # - HTTP_COOKIE: The value of the HTTP
6116 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6117 # value is truncated to the first 128 bytes of the cookie value. If no
6118 # such cookie is present in the request, the key type defaults toALL.
6119 # - HTTP_PATH: The URL path of the HTTP request. The key
6120 # value is truncated to the first 128 bytes.
6121 # - SNI: Server name indication in the TLS session of
6122 # the HTTPS request. The key value is truncated to the first 128 bytes.
6123 # The key type defaults to ALL on a HTTP session.
6124 # - REGION_CODE: The country/region from which the
6125 # request originates.
6126 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6127 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6128 # key type defaults to ALL.
6129 # - USER_IP: The IP address of the originating client,
6130 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6131 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
6132 # or an IP address cannot be resolved from it, the key type defaults toIP.
6133 #
6134 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6135 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6136 # key type defaults to ALL.
6137 },
6138 ],
6139 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6140 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
6141 # value.
6142 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
6143 # value.
6144 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
6145 # threshold, to either deny with a specified HTTP response code, or
6146 # redirect to a different endpoint.
6147 # Valid options are `deny(STATUS)`, where valid values for
6148 # `STATUS` are 403, 404, 429, and 502, and
6149 # `redirect`, where the redirect parameters come from
6150 # `exceedRedirectOptions` below.
6151 # The `redirect` action is only supported in Global Security Policies of
6152 # type CLOUD_ARMOR.
6153 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
6154 # above the configured rate limit threshold
6155 &quot;code&quot;: 42, # The status code, which should be an enum value of
6156 # google.rpc.Code.
6157 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
6158 },
6159 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
6160 # action. Cannot be specified if the exceed action is not redirect.
6161 # This field is only supported in Global Security Policies of type
6162 # CLOUD_ARMOR.
6163 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6164 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6165 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6166 #
6167 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6168 # challenge assessment.
6169 # - EXTERNAL_302: redirect to a different URL via a 302
6170 # response.
6171 },
6172 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
6173 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6174 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6175 },
6176 },
6177 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
6178 # other actions.
6179 # This field is only supported in Global Security Policies of type
6180 # CLOUD_ARMOR.
6181 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
6182 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
6183 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
6184 #
6185 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
6186 # challenge assessment.
6187 # - EXTERNAL_302: redirect to a different URL via a 302
6188 # response.
6189 },
6190 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
6191 # other actions.
6192 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
6193 # rule.
6194 # [Deprecated] Use requiredManagedProtectionTiers instead.
6195 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
6196 # policy. This can only be set during rule creation, if rule number is not
6197 # specified it will be generated by the server.
6198 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
6199 # policy rule.
6200 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
6201 # allows you to control which network&#x27;s VMs get this rule. If this field
6202 # is left blank, all VMs within the organization will receive the rule.
6203 #
6204 # This field may only be specified when versioned_expr is set to FIREWALL.
6205 &quot;A String&quot;,
6206 ],
6207 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
6208 # applied with this rule.
6209 &quot;A String&quot;,
6210 ],
6211 },
6212 ],
6213 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
6214 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
6215 &quot;shortName&quot;: &quot;A String&quot;, # User-provided name of the organization security policy. The name should be
6216 # unique in the organization in which the security policy is created. This
6217 # should only be used when SecurityPolicyType is CLOUD_ARMOR.
6218 # The name must be 1-63 characters long, and comply with
6219 # https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63
6220 # characters long and match the regular expression
6221 # `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a
6222 # lowercase letter, and all following characters must be a dash, lowercase
6223 # letter, or digit, except the last character, which cannot be a dash.
6224 &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy.
6225 #
6226 # - CLOUD_ARMOR: Cloud Armor backend security policies can
6227 # be configured to filter incoming HTTP requests targeting backend services.
6228 # They filter requests before they hit the origin servers.
6229 # - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can
6230 # be configured to filter incoming HTTP requests targeting backend services
6231 # (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage).
6232 # They filter requests before the request is served from Google&#x27;s cache.
6233 # - CLOUD_ARMOR_INTERNAL_SERVICE (preview only): Cloud Armor
6234 # internal service policies can be configured to filter HTTP requests
6235 # targeting services managed by Traffic Director in a service mesh. They
6236 # filter requests before the request is served from the application.
6237 #
6238 # - CLOUD_ARMOR_NETWORK: Cloud Armor network policies
6239 # can be configured to filter packets targeting network load balancing
6240 # resources such as backend services, target pools, target instances, and
6241 # instances with external IPs. They filter requests before the request is
6242 # served from the application.
6243 #
6244 #
6245 # This field can be set only at resource creation time.
6246 &quot;userDefinedFields&quot;: [ # Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A
6247 # user-defined field consists of up to 4 bytes extracted from a fixed offset
6248 # in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an
6249 # optional mask to select certain bits. Rules may then specify matching
6250 # values for these fields.
6251 #
6252 # Example:
6253 #
6254 # userDefinedFields:
6255 # - name: &quot;ipv4_fragment_offset&quot;
6256 # base: IPV4
6257 # offset: 6
6258 # size: 2
6259 # mask: &quot;0x1fff&quot;
6260 {
6261 &quot;base&quot;: &quot;A String&quot;, # The base relative to which &#x27;offset&#x27; is measured. Possible values are:
6262 #
6263 # - IPV4: Points to the beginning of the IPv4 header.
6264 # - IPV6: Points to the beginning of the IPv6 header.
6265 # - TCP: Points to the beginning of the TCP header, skipping
6266 # over any IPv4 options or IPv6 extension headers. Not present for
6267 # non-first fragments.
6268 # - UDP: Points to the beginning of the UDP header, skipping
6269 # over any IPv4 options or IPv6 extension headers. Not present for
6270 # non-first fragments.
6271 #
6272 #
6273 # required
6274 &quot;mask&quot;: &quot;A String&quot;, # If specified, apply this mask (bitwise AND) to the field to ignore bits
6275 # before matching. Encoded as a hexadecimal number (starting with &quot;0x&quot;).
6276 # The last byte of the field (in network byte order) corresponds to the
6277 # least significant byte of the mask.
6278 &quot;name&quot;: &quot;A String&quot;, # The name of this field. Must be unique within the policy.
6279 &quot;offset&quot;: 42, # Offset of the first byte of the field (in network byte order) relative to
6280 # &#x27;base&#x27;.
6281 &quot;size&quot;: 42, # Size of the field in bytes. Valid values: 1-4.
6282 },
6283 ],
6284 }
6285
6286 paths: string, A parameter (repeated)
6287 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
6288 that if you must retry your request, the server will know to ignore the
6289 request if it has already been completed.
6290
6291 For example, consider a situation where you make an initial request and
6292 the request times out. If you make the request again with the same
6293 request ID, the server can check if original operation with the same
6294 request ID was received, and if so, will ignore the second request. This
6295 prevents clients from accidentally creating duplicate commitments.
6296
6297 The request ID must be
6298 a valid UUID with the exception that zero UUID is not supported
6299 (00000000-0000-0000-0000-000000000000).
6300 updateMask: string, Indicates fields to be cleared as part of this request.
6301 x__xgafv: string, V1 error format.
6302 Allowed values
6303 1 - v1 error format
6304 2 - v2 error format
6305
6306 Returns:
6307 An object of the form:
6308
6309 { # Represents an Operation resource.
6310 #
6311 # Google Compute Engine has three Operation resources:
6312 #
6313 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
6314 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
6315 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
6316 #
6317 # You can use an operation resource to manage asynchronous API requests.
6318 # For more information, readHandling
6319 # API responses.
6320 #
6321 # Operations can be global, regional or zonal.
6322 #
6323 # - For global operations, use the `globalOperations`
6324 # resource.
6325 # - For regional operations, use the
6326 # `regionOperations` resource.
6327 # - For zonal operations, use
6328 # the `zoneOperations` resource.
6329 #
6330 #
6331 #
6332 # For more information, read
6333 # Global, Regional, and Zonal Resources.
6334 #
6335 # Note that completed Operation resources have a limited
6336 # retention period.
6337 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
6338 # Not present otherwise.
6339 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6340 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
6341 # set when the operation is created.
6342 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
6343 # text format.
6344 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
6345 # this field will be populated.
6346 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
6347 # operation.
6348 {
6349 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6350 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
6351 # details. There is a set of defined message types to use for providing
6352 # details.The syntax depends on the error code. For example,
6353 # QuotaExceededInfo will have details when the error code is
6354 # QUOTA_EXCEEDED.
6355 {
6356 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
6357 #
6358 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
6359 # is not enabled:
6360 #
6361 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
6362 # &quot;domain&quot;: &quot;googleapis.com&quot;
6363 # &quot;metadata&quot;: {
6364 # &quot;resource&quot;: &quot;projects/123&quot;,
6365 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
6366 # }
6367 # }
6368 #
6369 # This response indicates that the pubsub.googleapis.com API is not enabled.
6370 #
6371 # Example of an error that is returned when attempting to create a Spanner
6372 # instance in a region that is out of stock:
6373 #
6374 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
6375 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
6376 # &quot;metadata&quot;: {
6377 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
6378 # }
6379 # }
6380 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
6381 # is typically the registered service name of the tool or product that
6382 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
6383 # generated by some common infrastructure, the error domain must be a
6384 # globally unique value that identifies the infrastructure. For Google API
6385 # infrastructure, the error domain is &quot;googleapis.com&quot;.
6386 &quot;metadatas&quot;: { # Additional structured details about this error.
6387 #
6388 # Keys must match a regular expression of `a-z+` but should
6389 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
6390 # length. When identifying the current value of an exceeded limit, the units
6391 # should be contained in the key, not the value. For example, rather than
6392 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
6393 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
6394 # instances that can be created in a single (batch) request.
6395 &quot;a_key&quot;: &quot;A String&quot;,
6396 },
6397 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
6398 # proximate cause of the error. Error reasons are unique within a particular
6399 # domain of errors. This should be at most 63 characters and match a
6400 # regular expression of `A-Z+[A-Z0-9]`, which represents
6401 # UPPER_SNAKE_CASE.
6402 },
6403 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
6404 #
6405 # For example, if a quota check failed with an error indicating the calling
6406 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
6407 # directly to the right place in the developer console to flip the bit.
6408 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
6409 { # Describes a URL link.
6410 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
6411 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
6412 },
6413 ],
6414 },
6415 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
6416 # which can be attached to an RPC error.
6417 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
6418 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
6419 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
6420 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
6421 },
6422 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
6423 &quot;dimensions&quot;: { # The map holding related quota dimensions.
6424 &quot;a_key&quot;: &quot;A String&quot;,
6425 },
6426 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
6427 # type or metric.
6428 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
6429 # or metric.
6430 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
6431 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
6432 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
6433 },
6434 },
6435 ],
6436 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
6437 # This property is optional.
6438 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
6439 },
6440 ],
6441 },
6442 &quot;getVersionOperationMetadata&quot;: {
6443 &quot;inlineSbomInfo&quot;: {
6444 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
6445 # appropriate identifiers.
6446 &quot;a_key&quot;: &quot;A String&quot;,
6447 },
6448 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
6449 # identifiers.
6450 &quot;a_key&quot;: &quot;A String&quot;,
6451 },
6452 },
6453 },
6454 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
6455 # message that was returned, such as `NOT FOUND`.
6456 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
6457 # status code that was returned. For example, a `404` means the
6458 # resource was not found.
6459 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
6460 # defined by the server.
6461 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
6462 # This value is inRFC3339
6463 # text format.
6464 &quot;instancesBulkInsertOperationMetadata&quot;: {
6465 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
6466 # Example key: zones/us-central1-a
6467 &quot;a_key&quot;: {
6468 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
6469 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
6470 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
6471 # error.
6472 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
6473 # if the flow is rolling forward or rolling back.
6474 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
6475 },
6476 },
6477 },
6478 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
6479 # Operation resources.
6480 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6481 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
6482 # group of operations results from a `bulkInsert` API request.
6483 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
6484 # `update`, or `delete`, and so on.
6485 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
6486 # There is no requirement that this be linear or support any granularity of
6487 # operations. This should not be used to guess when the operation will be
6488 # complete. This number should monotonically increase as the operation
6489 # progresses.
6490 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
6491 # applicable when performing regional operations.
6492 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6493 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
6494 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
6495 # this field will contain information on all underlying zonal actions and
6496 # their state.
6497 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
6498 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
6499 # Example key: zones/us-central1-a
6500 &quot;a_key&quot;: {
6501 &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
6502 # populated.
6503 # different programming environments, including REST APIs and RPC APIs. It is
6504 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
6505 # three pieces of data: error code, error message, and error details.
6506 #
6507 # You can find out more about this error model and how to work with it in the
6508 # [API Design Guide](https://cloud.google.com/apis/design/errors).
6509 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6510 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
6511 # message types for APIs to use.
6512 {
6513 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6514 },
6515 ],
6516 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
6517 # user-facing error message should be localized and sent in the
6518 # google.rpc.Status.details field, or localized by the client.
6519 },
6520 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
6521 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
6522 },
6523 },
6524 },
6525 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
6526 # This value is inRFC3339
6527 # text format.
6528 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
6529 # following:
6530 # `PENDING`, `RUNNING`, or `DONE`.
6531 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
6532 # operation.
6533 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
6534 # of the target resource.
6535 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
6536 # operations related to creating a snapshot, this points to the disk
6537 # that the snapshot was created from.
6538 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
6539 # `[email protected]` or
6540 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
6541 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
6542 # operation, this field will be populated.
6543 {
6544 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
6545 # Engine returns NO_RESULTS_ON_PAGE if there
6546 # are no results in the response.
6547 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
6548 # value format. For example:
6549 #
6550 # &quot;data&quot;: [
6551 # {
6552 # &quot;key&quot;: &quot;scope&quot;,
6553 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
6554 # }
6555 {
6556 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
6557 # returned. For example, for warnings where there are no results in a list
6558 # request for a particular zone, this key might be scope and
6559 # the key value might be the zone name. Other examples might be a key
6560 # indicating a deprecated resource and a suggested replacement, or a
6561 # warning about invalid network settings (for example, if an instance
6562 # attempts to perform IP forwarding but is not enabled for IP forwarding).
6563 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6564 },
6565 ],
6566 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6567 },
6568 ],
6569 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
6570 # applicable when performing per-zone operations.
6571 }</pre>
6572 </div>
6573
6574 <div class="method">
6575 <code class="details" id="patchRule">patchRule(project, securityPolicy, body=None, priority=None, updateMask=None, validateOnly=None, x__xgafv=None)</code>
6576 <pre>Patches a rule at the specified priority. To clear fields in the rule,
6577 leave the fields empty and specify them in the updateMask.
6578
6579 Args:
6580 project: string, Project ID for this request. (required)
6581 securityPolicy: string, Name of the security policy to update. (required)
6582 body: object, The request body.
6583 The object takes the form of:
6584
6585 { # Represents a rule that describes one or more match conditions along with
6586 # the action to be taken when traffic matches this condition (allow or deny).
6587 &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched.
6588 # The following are the valid actions:
6589 #
6590 # - allow: allow access to target.
6591 # - deny(STATUS): deny access to target, returns the
6592 # HTTP response code specified. Valid values for `STATUS`
6593 # are 403, 404, and 502.
6594 # - rate_based_ban: limit client traffic to the configured
6595 # threshold and ban the client if the traffic exceeds the threshold.
6596 # Configure parameters for this action in RateLimitOptions. Requires
6597 # rate_limit_options to be set.
6598 # - redirect: redirect to a different target. This can
6599 # either be an internal reCAPTCHA redirect, or an external URL-based
6600 # redirect via a 302 response. Parameters for this action can be configured
6601 # via redirectOptions. This action is only supported in Global Security
6602 # Policies of type CLOUD_ARMOR.
6603 # - throttle: limit
6604 # client traffic to the configured threshold. Configure parameters for this
6605 # action in rateLimitOptions. Requires rate_limit_options to be set for
6606 # this.
6607 # - fairshare (preview only): when traffic reaches the
6608 # threshold limit, requests from the clients matching this rule begin to be
6609 # rate-limited using the Fair Share algorithm. This action is only allowed
6610 # in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
6611 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
6612 # create the resource.
6613 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be
6614 # specified when versioned_expr is set to FIREWALL.
6615 &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is
6616 # enabled, logs will be exported to the configured export destination in
6617 # Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you
6618 # cannot enable logging on &quot;goto_next&quot; rules.
6619 #
6620 # This field may only be specified when the versioned_expr is set to
6621 # FIREWALL.
6622 &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
6623 # This field is only supported in Global Security Policies of type
6624 # CLOUD_ARMOR.
6625 &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already
6626 # present.
6627 {
6628 &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
6629 &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
6630 },
6631 ],
6632 },
6633 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
6634 &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. # A match condition that incoming traffic is evaluated against.
6635 # If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
6636 # Exactly one field must be specified.
6637 &quot;config&quot;: { # The configuration options available when specifying versioned_expr.
6638 # This field must be specified if versioned_expr is specified and cannot
6639 # be specified if versioned_expr is not specified.
6640 &quot;destIpRanges&quot;: [ # CIDR IP address range.
6641 #
6642 # This field may only be specified when versioned_expr is set to
6643 # FIREWALL.
6644 &quot;A String&quot;,
6645 ],
6646 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
6647 #
6648 # This field may only be specified when versioned_expr is set to
6649 # FIREWALL.
6650 {
6651 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
6652 # required when creating a firewall rule. This value can either be
6653 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
6654 # protocol number.
6655 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
6656 # only applicable for UDP or TCP protocol. Each entry must be either
6657 # an integer or a range. If not specified, this rule applies to
6658 # connections through any port.
6659 #
6660 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
6661 #
6662 # This field may only be specified when versioned_expr is set to
6663 # FIREWALL.
6664 &quot;A String&quot;,
6665 ],
6666 },
6667 ],
6668 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
6669 #
6670 # This field may only be specified when versioned_expr is set to
6671 # FIREWALL.
6672 {
6673 &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is
6674 # required when creating a firewall rule. This value can either be
6675 # one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP
6676 # protocol number.
6677 &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is
6678 # only applicable for UDP or TCP protocol. Each entry must be either
6679 # an integer or a range. If not specified, this rule applies to
6680 # connections through any port.
6681 #
6682 # Example inputs include: [&quot;22&quot;],[&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
6683 #
6684 # This field may only be specified when versioned_expr is set to
6685 # FIREWALL.
6686 &quot;A String&quot;,
6687 ],
6688 },
6689 ],
6690 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
6691 # Maximum number of src_ip_ranges allowed is 10.
6692 &quot;A String&quot;,
6693 ],
6694 },
6695 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # User defined CEVAL expression.
6696 # A CEVAL expression is used to specify match criteria such as origin.ip,
6697 # source.region_code and contents in the request header.
6698 # Expressions containing `evaluateThreatIntelligence` require a Cloud
6699 # Armor Enterprise subscription and are not supported in Edge Policies
6700 # nor in Regional Policies. Expressions containing
6701 # `evaluatePreconfiguredExpr(&#x27;sourceiplist-*&#x27;)` require a Cloud Armor
6702 # Enterprise subscription and are only supported in Global Security
6703 # Policies.
6704 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
6705 # are documented at https://github.com/google/cel-spec.
6706 #
6707 # Example (Comparison):
6708 #
6709 # title: &quot;Summary size limit&quot;
6710 # description: &quot;Determines if a summary is less than 100 chars&quot;
6711 # expression: &quot;document.summary.size() &lt; 100&quot;
6712 #
6713 # Example (Equality):
6714 #
6715 # title: &quot;Requestor is owner&quot;
6716 # description: &quot;Determines if requestor is the document owner&quot;
6717 # expression: &quot;document.owner == request.auth.claims.email&quot;
6718 #
6719 # Example (Logic):
6720 #
6721 # title: &quot;Public documents&quot;
6722 # description: &quot;Determine whether the document should be publicly visible&quot;
6723 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
6724 #
6725 # Example (Data Manipulation):
6726 #
6727 # title: &quot;Notification string&quot;
6728 # description: &quot;Create a notification string with a timestamp.&quot;
6729 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
6730 #
6731 # The exact variables and functions that may be referenced within an expression
6732 # are determined by the service that evaluates it. See the service
6733 # documentation for additional information.
6734 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
6735 # describes the expression, e.g. when hovered over it in a UI.
6736 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
6737 # syntax.
6738 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
6739 # reporting, e.g. a file name and a position in the file.
6740 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
6741 # its purpose. This can be used e.g. in UIs which allow to enter the
6742 # expression.
6743 },
6744 &quot;exprOptions&quot;: { # The configuration options available when specifying a user defined
6745 # CEVAL expression (i.e., &#x27;expr&#x27;).
6746 &quot;recaptchaOptions&quot;: { # reCAPTCHA configuration options to be applied for the rule. If the
6747 # rule does not evaluate reCAPTCHA tokens, this field has no effect.
6748 &quot;actionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6749 # action-tokens. The provided site keys need to be created from
6750 # reCAPTCHA API under the same project where the security policy is
6751 # created.
6752 &quot;A String&quot;,
6753 ],
6754 &quot;sessionTokenSiteKeys&quot;: [ # A list of site keys to be used during the validation of reCAPTCHA
6755 # session-tokens. The provided site keys need to be created from
6756 # reCAPTCHA API under the same project where the security policy is
6757 # created.
6758 &quot;A String&quot;,
6759 ],
6760 },
6761 },
6762 &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression.
6763 # If this field is specified, config must also be specified.
6764 # Available preconfigured expressions along with their requirements are:
6765 # SRC_IPS_V1 - must specify the corresponding src_ip_range field in
6766 # config.
6767 },
6768 &quot;networkMatch&quot;: { # Represents a match condition that incoming network traffic is evaluated # A match condition that incoming packets are evaluated against for
6769 # CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
6770 # &#x27;action&#x27; is enforced.
6771 #
6772 # The match criteria for a rule consists of built-in match fields (like
6773 # &#x27;srcIpRanges&#x27;) and potentially multiple user-defined match fields
6774 # (&#x27;userDefinedFields&#x27;).
6775 #
6776 # Field values may be extracted directly from the packet or derived from it
6777 # (e.g. &#x27;srcRegionCodes&#x27;). Some fields may not be present in every packet
6778 # (e.g. &#x27;srcPorts&#x27;). A user-defined field is only present if the base
6779 # header is found in the packet and the entire field is in bounds.
6780 #
6781 # Each match field may specify which values can match it, listing one or
6782 # more ranges, prefixes, or exact values that are considered a match for
6783 # the field. A field value must be present in order to match a specified
6784 # match field. If no match values are specified for a match field, then any
6785 # field value is considered to match it, and it&#x27;s not required to be
6786 # present. For strings specifying &#x27;*&#x27; is also equivalent to match all.
6787 #
6788 # For a packet to match a rule, all specified match fields must match the
6789 # corresponding field values derived from the packet.
6790 #
6791 # Example:
6792 #
6793 # networkMatch:
6794 # srcIpRanges:
6795 # - &quot;192.0.2.0/24&quot;
6796 # - &quot;198.51.100.0/24&quot;
6797 # userDefinedFields:
6798 # - name: &quot;ipv4_fragment_offset&quot;
6799 # values:
6800 # - &quot;1-0x1fff&quot;
6801 #
6802 # The above match condition matches packets with a source IP in
6803 # 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
6804 # &quot;ipv4_fragment_offset&quot; with a value between 1 and 0x1fff inclusive.
6805 # against.
6806 &quot;destIpRanges&quot;: [ # Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text
6807 # format.
6808 &quot;A String&quot;,
6809 ],
6810 &quot;destPorts&quot;: [ # Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6811 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6812 &quot;A String&quot;,
6813 ],
6814 &quot;ipProtocols&quot;: [ # IPv4 protocol / IPv6 next header (after extension headers). Each
6815 # element can be an 8-bit unsigned decimal number (e.g. &quot;6&quot;), range (e.g.
6816 # &quot;253-254&quot;), or one of the following protocol names: &quot;tcp&quot;, &quot;udp&quot;,
6817 # &quot;icmp&quot;, &quot;esp&quot;, &quot;ah&quot;, &quot;ipip&quot;, or &quot;sctp&quot;.
6818 &quot;A String&quot;,
6819 ],
6820 &quot;srcAsns&quot;: [ # BGP Autonomous System Number associated with the source IP address.
6821 42,
6822 ],
6823 &quot;srcIpRanges&quot;: [ # Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
6824 &quot;A String&quot;,
6825 ],
6826 &quot;srcPorts&quot;: [ # Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit
6827 # unsigned decimal number (e.g. &quot;80&quot;) or range (e.g. &quot;0-1023&quot;).
6828 &quot;A String&quot;,
6829 ],
6830 &quot;srcRegionCodes&quot;: [ # Two-letter ISO 3166-1 alpha-2 country code associated with the source
6831 # IP address.
6832 &quot;A String&quot;,
6833 ],
6834 &quot;userDefinedFields&quot;: [ # User-defined fields. Each element names a defined field and lists the
6835 # matching values for that field.
6836 {
6837 &quot;name&quot;: &quot;A String&quot;, # Name of the user-defined field, as given in the definition.
6838 &quot;values&quot;: [ # Matching values of the field. Each element can be a 32-bit unsigned
6839 # decimal or hexadecimal (starting with &quot;0x&quot;) number (e.g. &quot;64&quot;) or
6840 # range (e.g. &quot;0x400-0x7ff&quot;).
6841 &quot;A String&quot;,
6842 ],
6843 },
6844 ],
6845 },
6846 &quot;preconfiguredWafConfig&quot;: { # Preconfigured WAF configuration to be applied for the rule. If the rule
6847 # does not evaluate preconfigured WAF rules, i.e., if
6848 # evaluatePreconfiguredWaf() is not used, this field will have no effect.
6849 &quot;exclusions&quot;: [ # A list of exclusions to apply during preconfigured WAF evaluation.
6850 {
6851 &quot;requestBodiesToExclude&quot;: [ # A list of request body fields to be excluded from inspection during
6852 # preconfigured WAF evaluation.
6853 {
6854 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6855 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6856 },
6857 ],
6858 &quot;requestCookiesToExclude&quot;: [ # A list of request cookie names whose value will be excluded from
6859 # inspection during preconfigured WAF evaluation.
6860 {
6861 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6862 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6863 },
6864 ],
6865 &quot;requestHeadersToExclude&quot;: [ # A list of request header names whose value will be excluded from
6866 # inspection during preconfigured WAF evaluation.
6867 {
6868 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6869 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6870 },
6871 ],
6872 &quot;requestQueryParamsToExclude&quot;: [ # A list of request query parameter names whose value will be excluded
6873 # from inspection during preconfigured WAF evaluation. Note that the
6874 # parameter can be in the query string or in the POST body.
6875 {
6876 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6877 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6878 },
6879 ],
6880 &quot;requestUrisToExclude&quot;: [ # A list of request URIs from the request line to be excluded from
6881 # inspection during preconfigured WAF evaluation. When specifying this
6882 # field, the query or fragment part should be excluded.
6883 {
6884 &quot;op&quot;: &quot;A String&quot;, # The match operator for the field.
6885 &quot;val&quot;: &quot;A String&quot;, # The value of the field.
6886 },
6887 ],
6888 &quot;targetRuleIds&quot;: [ # A list of target rule IDs under the WAF rule set to apply the
6889 # preconfigured WAF exclusion. If omitted, it refers to all the rule
6890 # IDs under the WAF rule set.
6891 &quot;A String&quot;,
6892 ],
6893 &quot;targetRuleSet&quot;: &quot;A String&quot;, # Target WAF rule set to apply the preconfigured WAF exclusion.
6894 },
6895 ],
6896 },
6897 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
6898 &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority
6899 # must be a positive value between 0 and 2147483647.
6900 # Rules are evaluated from highest to lowest priority where 0 is the
6901 # highest priority and 2147483647 is the lowest priority.
6902 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot; or
6903 # &quot;fairshare&quot;. Cannot be specified for any other actions.
6904 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is
6905 # &quot;rate_based_ban&quot;. If specified, determines the time (in seconds)
6906 # the traffic will continue to be banned by the rate limit after the
6907 # rate falls below the threshold.
6908 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is
6909 # &quot;rate_based_ban&quot;. If specified, the key will be banned for the
6910 # configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed
6911 # the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
6912 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
6913 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
6914 },
6915 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit
6916 # threshold. Valid option is &quot;allow&quot; only.
6917 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6918 # values are:
6919 #
6920 # - ALL: A single rate limit threshold is applied to all
6921 # the requests matching this rule. This is the default value if
6922 # &quot;enforceOnKey&quot; is not configured.
6923 # - IP: The source IP address of
6924 # the request is the key. Each IP has this limit enforced
6925 # separately.
6926 # - HTTP_HEADER: The value of the HTTP
6927 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6928 # value is truncated to the first 128 bytes of the header value. If no
6929 # such header is present in the request, the key type defaults toALL.
6930 # - XFF_IP: The first IP address (i.e. the
6931 # originating client IP address) specified in the list of IPs under
6932 # X-Forwarded-For HTTP header. If no such header is present or the value
6933 # is not a valid IP, the key defaults to the source IP address of
6934 # the request i.e. key type IP.
6935 # - HTTP_COOKIE: The value of the HTTP
6936 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6937 # value is truncated to the first 128 bytes of the cookie value. If no
6938 # such cookie is present in the request, the key type defaults toALL.
6939 # - HTTP_PATH: The URL path of the HTTP request. The key
6940 # value is truncated to the first 128 bytes.
6941 # - SNI: Server name indication in the TLS session of the
6942 # HTTPS request. The key value is truncated to the first 128 bytes. The
6943 # key type defaults to ALL on a HTTP session.
6944 # - REGION_CODE: The country/region from which the request
6945 # originates.
6946 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6947 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6948 # key type defaults to ALL.
6949 # - USER_IP: The IP address of the originating client,
6950 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
6951 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration or
6952 # an IP address cannot be resolved from it, the key type defaults toIP.
6953 #
6954 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
6955 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
6956 # key type defaults to ALL.
6957 # For &quot;fairshare&quot; action, this value is limited to ALL i.e. a single rate
6958 # limit threshold is enforced for all the requests matching the rule.
6959 &quot;enforceOnKeyConfigs&quot;: [ # If specified, any combination of values of
6960 # enforce_on_key_type/enforce_on_key_name is treated as the key on which
6961 # ratelimit threshold/action is enforced. You can specify up to 3
6962 # enforce_on_key_configs. If enforce_on_key_configs is specified,
6963 # enforce_on_key must not be specified.
6964 {
6965 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
6966 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the
6967 # key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is
6968 # taken as the key value.
6969 &quot;enforceOnKeyType&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible
6970 # values are:
6971 #
6972 # - ALL: A single rate limit threshold is applied to all
6973 # the requests matching this rule. This is the default value if
6974 # &quot;enforceOnKeyConfigs&quot; is not configured.
6975 # - IP: The source IP address of
6976 # the request is the key. Each IP has this limit enforced
6977 # separately.
6978 # - HTTP_HEADER: The value of the HTTP
6979 # header whose name is configured under &quot;enforceOnKeyName&quot;. The key
6980 # value is truncated to the first 128 bytes of the header value. If no
6981 # such header is present in the request, the key type defaults toALL.
6982 # - XFF_IP: The first IP address (i.e. the
6983 # originating client IP address) specified in the list of IPs under
6984 # X-Forwarded-For HTTP header. If no such header is present or the
6985 # value is not a valid IP, the key defaults to the source IP address of
6986 # the request i.e. key type IP.
6987 # - HTTP_COOKIE: The value of the HTTP
6988 # cookie whose name is configured under &quot;enforceOnKeyName&quot;. The key
6989 # value is truncated to the first 128 bytes of the cookie value. If no
6990 # such cookie is present in the request, the key type defaults toALL.
6991 # - HTTP_PATH: The URL path of the HTTP request. The key
6992 # value is truncated to the first 128 bytes.
6993 # - SNI: Server name indication in the TLS session of
6994 # the HTTPS request. The key value is truncated to the first 128 bytes.
6995 # The key type defaults to ALL on a HTTP session.
6996 # - REGION_CODE: The country/region from which the
6997 # request originates.
6998 # - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the
6999 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
7000 # key type defaults to ALL.
7001 # - USER_IP: The IP address of the originating client,
7002 # which is resolved based on &quot;userIpRequestHeaders&quot; configured with the
7003 # security policy. If there is no &quot;userIpRequestHeaders&quot; configuration
7004 # or an IP address cannot be resolved from it, the key type defaults toIP.
7005 #
7006 # - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the
7007 # client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the
7008 # key type defaults to ALL.
7009 },
7010 ],
7011 &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types:
7012 # HTTP_HEADER -- Name of the HTTP header whose value is taken as the key
7013 # value.
7014 # HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key
7015 # value.
7016 &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit
7017 # threshold, to either deny with a specified HTTP response code, or
7018 # redirect to a different endpoint.
7019 # Valid options are `deny(STATUS)`, where valid values for
7020 # `STATUS` are 403, 404, 429, and 502, and
7021 # `redirect`, where the redirect parameters come from
7022 # `exceedRedirectOptions` below.
7023 # The `redirect` action is only supported in Global Security Policies of
7024 # type CLOUD_ARMOR.
7025 &quot;exceedActionRpcStatus&quot;: { # Simplified google.rpc.Status type (omitting details). # Specified gRPC response status for proxyless gRPC requests that are
7026 # above the configured rate limit threshold
7027 &quot;code&quot;: 42, # The status code, which should be an enum value of
7028 # google.rpc.Code.
7029 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English.
7030 },
7031 &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed
7032 # action. Cannot be specified if the exceed action is not redirect.
7033 # This field is only supported in Global Security Policies of type
7034 # CLOUD_ARMOR.
7035 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
7036 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
7037 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
7038 #
7039 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
7040 # challenge assessment.
7041 # - EXTERNAL_302: redirect to a different URL via a 302
7042 # response.
7043 },
7044 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
7045 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
7046 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
7047 },
7048 },
7049 &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any
7050 # other actions.
7051 # This field is only supported in Global Security Policies of type
7052 # CLOUD_ARMOR.
7053 &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is
7054 # EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
7055 &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action. Possible values are:
7056 #
7057 # - GOOGLE_RECAPTCHA: redirect to reCAPTCHA for manual
7058 # challenge assessment.
7059 # - EXTERNAL_302: redirect to a different URL via a 302
7060 # response.
7061 },
7062 &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any
7063 # other actions.
7064 &quot;ruleManagedProtectionTier&quot;: &quot;A String&quot;, # Output only. [Output Only] The minimum Cloud Armor subscription required for this
7065 # rule.
7066 # [Deprecated] Use requiredManagedProtectionTiers instead.
7067 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security
7068 # policy. This can only be set during rule creation, if rule number is not
7069 # specified it will be generated by the server.
7070 &quot;ruleTupleCount&quot;: 42, # Output only. [Output Only] Calculation of the complexity of a single firewall security
7071 # policy rule.
7072 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field
7073 # allows you to control which network&#x27;s VMs get this rule. If this field
7074 # is left blank, all VMs within the organization will receive the rule.
7075 #
7076 # This field may only be specified when versioned_expr is set to FIREWALL.
7077 &quot;A String&quot;,
7078 ],
7079 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are
7080 # applied with this rule.
7081 &quot;A String&quot;,
7082 ],
7083 }
7084
7085 priority: integer, The priority of the rule to patch.
7086 updateMask: string, Indicates fields to be cleared as part of this request.
7087 validateOnly: boolean, If true, the request will not be committed.
7088 x__xgafv: string, V1 error format.
7089 Allowed values
7090 1 - v1 error format
7091 2 - v2 error format
7092
7093 Returns:
7094 An object of the form:
7095
7096 { # Represents an Operation resource.
7097 #
7098 # Google Compute Engine has three Operation resources:
7099 #
7100 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
7101 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
7102 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
7103 #
7104 # You can use an operation resource to manage asynchronous API requests.
7105 # For more information, readHandling
7106 # API responses.
7107 #
7108 # Operations can be global, regional or zonal.
7109 #
7110 # - For global operations, use the `globalOperations`
7111 # resource.
7112 # - For regional operations, use the
7113 # `regionOperations` resource.
7114 # - For zonal operations, use
7115 # the `zoneOperations` resource.
7116 #
7117 #
7118 #
7119 # For more information, read
7120 # Global, Regional, and Zonal Resources.
7121 #
7122 # Note that completed Operation resources have a limited
7123 # retention period.
7124 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7125 # Not present otherwise.
7126 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7127 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7128 # set when the operation is created.
7129 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7130 # text format.
7131 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7132 # this field will be populated.
7133 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7134 # operation.
7135 {
7136 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7137 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7138 # details. There is a set of defined message types to use for providing
7139 # details.The syntax depends on the error code. For example,
7140 # QuotaExceededInfo will have details when the error code is
7141 # QUOTA_EXCEEDED.
7142 {
7143 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7144 #
7145 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7146 # is not enabled:
7147 #
7148 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7149 # &quot;domain&quot;: &quot;googleapis.com&quot;
7150 # &quot;metadata&quot;: {
7151 # &quot;resource&quot;: &quot;projects/123&quot;,
7152 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7153 # }
7154 # }
7155 #
7156 # This response indicates that the pubsub.googleapis.com API is not enabled.
7157 #
7158 # Example of an error that is returned when attempting to create a Spanner
7159 # instance in a region that is out of stock:
7160 #
7161 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7162 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7163 # &quot;metadata&quot;: {
7164 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7165 # }
7166 # }
7167 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7168 # is typically the registered service name of the tool or product that
7169 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7170 # generated by some common infrastructure, the error domain must be a
7171 # globally unique value that identifies the infrastructure. For Google API
7172 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7173 &quot;metadatas&quot;: { # Additional structured details about this error.
7174 #
7175 # Keys must match a regular expression of `a-z+` but should
7176 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7177 # length. When identifying the current value of an exceeded limit, the units
7178 # should be contained in the key, not the value. For example, rather than
7179 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7180 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7181 # instances that can be created in a single (batch) request.
7182 &quot;a_key&quot;: &quot;A String&quot;,
7183 },
7184 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7185 # proximate cause of the error. Error reasons are unique within a particular
7186 # domain of errors. This should be at most 63 characters and match a
7187 # regular expression of `A-Z+[A-Z0-9]`, which represents
7188 # UPPER_SNAKE_CASE.
7189 },
7190 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7191 #
7192 # For example, if a quota check failed with an error indicating the calling
7193 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7194 # directly to the right place in the developer console to flip the bit.
7195 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7196 { # Describes a URL link.
7197 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7198 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7199 },
7200 ],
7201 },
7202 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7203 # which can be attached to an RPC error.
7204 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7205 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7206 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7207 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7208 },
7209 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7210 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7211 &quot;a_key&quot;: &quot;A String&quot;,
7212 },
7213 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7214 # type or metric.
7215 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7216 # or metric.
7217 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7218 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7219 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7220 },
7221 },
7222 ],
7223 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7224 # This property is optional.
7225 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7226 },
7227 ],
7228 },
7229 &quot;getVersionOperationMetadata&quot;: {
7230 &quot;inlineSbomInfo&quot;: {
7231 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7232 # appropriate identifiers.
7233 &quot;a_key&quot;: &quot;A String&quot;,
7234 },
7235 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7236 # identifiers.
7237 &quot;a_key&quot;: &quot;A String&quot;,
7238 },
7239 },
7240 },
7241 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7242 # message that was returned, such as `NOT FOUND`.
7243 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7244 # status code that was returned. For example, a `404` means the
7245 # resource was not found.
7246 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7247 # defined by the server.
7248 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7249 # This value is inRFC3339
7250 # text format.
7251 &quot;instancesBulkInsertOperationMetadata&quot;: {
7252 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7253 # Example key: zones/us-central1-a
7254 &quot;a_key&quot;: {
7255 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7256 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7257 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7258 # error.
7259 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7260 # if the flow is rolling forward or rolling back.
7261 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7262 },
7263 },
7264 },
7265 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7266 # Operation resources.
7267 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7268 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7269 # group of operations results from a `bulkInsert` API request.
7270 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7271 # `update`, or `delete`, and so on.
7272 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7273 # There is no requirement that this be linear or support any granularity of
7274 # operations. This should not be used to guess when the operation will be
7275 # complete. This number should monotonically increase as the operation
7276 # progresses.
7277 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7278 # applicable when performing regional operations.
7279 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7280 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
7281 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7282 # this field will contain information on all underlying zonal actions and
7283 # their state.
7284 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7285 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7286 # Example key: zones/us-central1-a
7287 &quot;a_key&quot;: {
7288 &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
7289 # populated.
7290 # different programming environments, including REST APIs and RPC APIs. It is
7291 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7292 # three pieces of data: error code, error message, and error details.
7293 #
7294 # You can find out more about this error model and how to work with it in the
7295 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7296 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7297 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7298 # message types for APIs to use.
7299 {
7300 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7301 },
7302 ],
7303 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7304 # user-facing error message should be localized and sent in the
7305 # google.rpc.Status.details field, or localized by the client.
7306 },
7307 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7308 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7309 },
7310 },
7311 },
7312 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7313 # This value is inRFC3339
7314 # text format.
7315 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7316 # following:
7317 # `PENDING`, `RUNNING`, or `DONE`.
7318 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7319 # operation.
7320 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7321 # of the target resource.
7322 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7323 # operations related to creating a snapshot, this points to the disk
7324 # that the snapshot was created from.
7325 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7326 # `[email protected]` or
7327 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7328 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7329 # operation, this field will be populated.
7330 {
7331 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7332 # Engine returns NO_RESULTS_ON_PAGE if there
7333 # are no results in the response.
7334 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7335 # value format. For example:
7336 #
7337 # &quot;data&quot;: [
7338 # {
7339 # &quot;key&quot;: &quot;scope&quot;,
7340 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7341 # }
7342 {
7343 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7344 # returned. For example, for warnings where there are no results in a list
7345 # request for a particular zone, this key might be scope and
7346 # the key value might be the zone name. Other examples might be a key
7347 # indicating a deprecated resource and a suggested replacement, or a
7348 # warning about invalid network settings (for example, if an instance
7349 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7350 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7351 },
7352 ],
7353 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7354 },
7355 ],
7356 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7357 # applicable when performing per-zone operations.
7358 }</pre>
7359 </div>
7360
7361 <div class="method">
7362 <code class="details" id="removeRule">removeRule(project, securityPolicy, priority=None, x__xgafv=None)</code>
7363 <pre>Deletes a rule at the specified priority.
7364
7365 Args:
7366 project: string, Project ID for this request. (required)
7367 securityPolicy: string, Name of the security policy to update. (required)
7368 priority: integer, The priority of the rule to remove from the security policy.
7369 x__xgafv: string, V1 error format.
7370 Allowed values
7371 1 - v1 error format
7372 2 - v2 error format
7373
7374 Returns:
7375 An object of the form:
7376
7377 { # Represents an Operation resource.
7378 #
7379 # Google Compute Engine has three Operation resources:
7380 #
7381 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
7382 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
7383 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
7384 #
7385 # You can use an operation resource to manage asynchronous API requests.
7386 # For more information, readHandling
7387 # API responses.
7388 #
7389 # Operations can be global, regional or zonal.
7390 #
7391 # - For global operations, use the `globalOperations`
7392 # resource.
7393 # - For regional operations, use the
7394 # `regionOperations` resource.
7395 # - For zonal operations, use
7396 # the `zoneOperations` resource.
7397 #
7398 #
7399 #
7400 # For more information, read
7401 # Global, Regional, and Zonal Resources.
7402 #
7403 # Note that completed Operation resources have a limited
7404 # retention period.
7405 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7406 # Not present otherwise.
7407 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7408 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7409 # set when the operation is created.
7410 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7411 # text format.
7412 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7413 # this field will be populated.
7414 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7415 # operation.
7416 {
7417 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7418 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7419 # details. There is a set of defined message types to use for providing
7420 # details.The syntax depends on the error code. For example,
7421 # QuotaExceededInfo will have details when the error code is
7422 # QUOTA_EXCEEDED.
7423 {
7424 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7425 #
7426 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7427 # is not enabled:
7428 #
7429 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7430 # &quot;domain&quot;: &quot;googleapis.com&quot;
7431 # &quot;metadata&quot;: {
7432 # &quot;resource&quot;: &quot;projects/123&quot;,
7433 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7434 # }
7435 # }
7436 #
7437 # This response indicates that the pubsub.googleapis.com API is not enabled.
7438 #
7439 # Example of an error that is returned when attempting to create a Spanner
7440 # instance in a region that is out of stock:
7441 #
7442 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7443 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7444 # &quot;metadata&quot;: {
7445 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7446 # }
7447 # }
7448 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7449 # is typically the registered service name of the tool or product that
7450 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7451 # generated by some common infrastructure, the error domain must be a
7452 # globally unique value that identifies the infrastructure. For Google API
7453 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7454 &quot;metadatas&quot;: { # Additional structured details about this error.
7455 #
7456 # Keys must match a regular expression of `a-z+` but should
7457 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7458 # length. When identifying the current value of an exceeded limit, the units
7459 # should be contained in the key, not the value. For example, rather than
7460 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7461 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7462 # instances that can be created in a single (batch) request.
7463 &quot;a_key&quot;: &quot;A String&quot;,
7464 },
7465 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7466 # proximate cause of the error. Error reasons are unique within a particular
7467 # domain of errors. This should be at most 63 characters and match a
7468 # regular expression of `A-Z+[A-Z0-9]`, which represents
7469 # UPPER_SNAKE_CASE.
7470 },
7471 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7472 #
7473 # For example, if a quota check failed with an error indicating the calling
7474 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7475 # directly to the right place in the developer console to flip the bit.
7476 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7477 { # Describes a URL link.
7478 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7479 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7480 },
7481 ],
7482 },
7483 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7484 # which can be attached to an RPC error.
7485 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7486 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7487 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7488 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7489 },
7490 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7491 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7492 &quot;a_key&quot;: &quot;A String&quot;,
7493 },
7494 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7495 # type or metric.
7496 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7497 # or metric.
7498 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7499 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7500 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7501 },
7502 },
7503 ],
7504 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7505 # This property is optional.
7506 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7507 },
7508 ],
7509 },
7510 &quot;getVersionOperationMetadata&quot;: {
7511 &quot;inlineSbomInfo&quot;: {
7512 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7513 # appropriate identifiers.
7514 &quot;a_key&quot;: &quot;A String&quot;,
7515 },
7516 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7517 # identifiers.
7518 &quot;a_key&quot;: &quot;A String&quot;,
7519 },
7520 },
7521 },
7522 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7523 # message that was returned, such as `NOT FOUND`.
7524 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7525 # status code that was returned. For example, a `404` means the
7526 # resource was not found.
7527 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7528 # defined by the server.
7529 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7530 # This value is inRFC3339
7531 # text format.
7532 &quot;instancesBulkInsertOperationMetadata&quot;: {
7533 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7534 # Example key: zones/us-central1-a
7535 &quot;a_key&quot;: {
7536 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7537 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7538 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7539 # error.
7540 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7541 # if the flow is rolling forward or rolling back.
7542 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7543 },
7544 },
7545 },
7546 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7547 # Operation resources.
7548 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7549 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7550 # group of operations results from a `bulkInsert` API request.
7551 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7552 # `update`, or `delete`, and so on.
7553 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7554 # There is no requirement that this be linear or support any granularity of
7555 # operations. This should not be used to guess when the operation will be
7556 # complete. This number should monotonically increase as the operation
7557 # progresses.
7558 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7559 # applicable when performing regional operations.
7560 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7561 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
7562 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7563 # this field will contain information on all underlying zonal actions and
7564 # their state.
7565 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7566 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7567 # Example key: zones/us-central1-a
7568 &quot;a_key&quot;: {
7569 &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
7570 # populated.
7571 # different programming environments, including REST APIs and RPC APIs. It is
7572 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7573 # three pieces of data: error code, error message, and error details.
7574 #
7575 # You can find out more about this error model and how to work with it in the
7576 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7577 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7578 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7579 # message types for APIs to use.
7580 {
7581 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7582 },
7583 ],
7584 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7585 # user-facing error message should be localized and sent in the
7586 # google.rpc.Status.details field, or localized by the client.
7587 },
7588 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7589 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7590 },
7591 },
7592 },
7593 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7594 # This value is inRFC3339
7595 # text format.
7596 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7597 # following:
7598 # `PENDING`, `RUNNING`, or `DONE`.
7599 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7600 # operation.
7601 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7602 # of the target resource.
7603 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7604 # operations related to creating a snapshot, this points to the disk
7605 # that the snapshot was created from.
7606 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7607 # `[email protected]` or
7608 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7609 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7610 # operation, this field will be populated.
7611 {
7612 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7613 # Engine returns NO_RESULTS_ON_PAGE if there
7614 # are no results in the response.
7615 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7616 # value format. For example:
7617 #
7618 # &quot;data&quot;: [
7619 # {
7620 # &quot;key&quot;: &quot;scope&quot;,
7621 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7622 # }
7623 {
7624 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7625 # returned. For example, for warnings where there are no results in a list
7626 # request for a particular zone, this key might be scope and
7627 # the key value might be the zone name. Other examples might be a key
7628 # indicating a deprecated resource and a suggested replacement, or a
7629 # warning about invalid network settings (for example, if an instance
7630 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7631 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7632 },
7633 ],
7634 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7635 },
7636 ],
7637 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7638 # applicable when performing per-zone operations.
7639 }</pre>
7640 </div>
7641
7642 <div class="method">
7643 <code class="details" id="setLabels">setLabels(project, resource, body=None, x__xgafv=None)</code>
7644 <pre>Sets the labels on a security policy. To learn more about labels,
7645 read the Labeling Resources
7646 documentation.
7647
7648 Args:
7649 project: string, Project ID for this request. (required)
7650 resource: string, Name or id of the resource for this request. (required)
7651 body: object, The request body.
7652 The object takes the form of:
7653
7654 {
7655 &quot;labelFingerprint&quot;: &quot;A String&quot;, # The fingerprint of the previous set of labels for this resource,
7656 # used to detect conflicts. The fingerprint is initially generated by Compute
7657 # Engine and changes after every request to modify or update labels. You must
7658 # always provide an up-to-date fingerprint hash when updating or changing
7659 # labels, otherwise the request will fail with error412 conditionNotMet. Make a get() request to the
7660 # resource to get the latest fingerprint.
7661 &quot;labels&quot;: { # A list of labels to apply for this resource. Each label must comply with
7662 # the
7663 # requirements for labels. For example,&quot;webserver-frontend&quot;: &quot;images&quot;. A label value can also be
7664 # empty (e.g. &quot;my-label&quot;: &quot;&quot;).
7665 &quot;a_key&quot;: &quot;A String&quot;,
7666 },
7667 }
7668
7669 x__xgafv: string, V1 error format.
7670 Allowed values
7671 1 - v1 error format
7672 2 - v2 error format
7673
7674 Returns:
7675 An object of the form:
7676
7677 { # Represents an Operation resource.
7678 #
7679 # Google Compute Engine has three Operation resources:
7680 #
7681 # * [Global](/compute/docs/reference/rest/alpha/globalOperations)
7682 # * [Regional](/compute/docs/reference/rest/alpha/regionOperations)
7683 # * [Zonal](/compute/docs/reference/rest/alpha/zoneOperations)
7684 #
7685 # You can use an operation resource to manage asynchronous API requests.
7686 # For more information, readHandling
7687 # API responses.
7688 #
7689 # Operations can be global, regional or zonal.
7690 #
7691 # - For global operations, use the `globalOperations`
7692 # resource.
7693 # - For regional operations, use the
7694 # `regionOperations` resource.
7695 # - For zonal operations, use
7696 # the `zoneOperations` resource.
7697 #
7698 #
7699 #
7700 # For more information, read
7701 # Global, Regional, and Zonal Resources.
7702 #
7703 # Note that completed Operation resources have a limited
7704 # retention period.
7705 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
7706 # Not present otherwise.
7707 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7708 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
7709 # set when the operation is created.
7710 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
7711 # text format.
7712 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
7713 # this field will be populated.
7714 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
7715 # operation.
7716 {
7717 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7718 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
7719 # details. There is a set of defined message types to use for providing
7720 # details.The syntax depends on the error code. For example,
7721 # QuotaExceededInfo will have details when the error code is
7722 # QUOTA_EXCEEDED.
7723 {
7724 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
7725 #
7726 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
7727 # is not enabled:
7728 #
7729 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
7730 # &quot;domain&quot;: &quot;googleapis.com&quot;
7731 # &quot;metadata&quot;: {
7732 # &quot;resource&quot;: &quot;projects/123&quot;,
7733 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
7734 # }
7735 # }
7736 #
7737 # This response indicates that the pubsub.googleapis.com API is not enabled.
7738 #
7739 # Example of an error that is returned when attempting to create a Spanner
7740 # instance in a region that is out of stock:
7741 #
7742 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
7743 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
7744 # &quot;metadata&quot;: {
7745 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
7746 # }
7747 # }
7748 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
7749 # is typically the registered service name of the tool or product that
7750 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
7751 # generated by some common infrastructure, the error domain must be a
7752 # globally unique value that identifies the infrastructure. For Google API
7753 # infrastructure, the error domain is &quot;googleapis.com&quot;.
7754 &quot;metadatas&quot;: { # Additional structured details about this error.
7755 #
7756 # Keys must match a regular expression of `a-z+` but should
7757 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
7758 # length. When identifying the current value of an exceeded limit, the units
7759 # should be contained in the key, not the value. For example, rather than
7760 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
7761 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
7762 # instances that can be created in a single (batch) request.
7763 &quot;a_key&quot;: &quot;A String&quot;,
7764 },
7765 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
7766 # proximate cause of the error. Error reasons are unique within a particular
7767 # domain of errors. This should be at most 63 characters and match a
7768 # regular expression of `A-Z+[A-Z0-9]`, which represents
7769 # UPPER_SNAKE_CASE.
7770 },
7771 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
7772 #
7773 # For example, if a quota check failed with an error indicating the calling
7774 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
7775 # directly to the right place in the developer console to flip the bit.
7776 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
7777 { # Describes a URL link.
7778 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
7779 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
7780 },
7781 ],
7782 },
7783 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
7784 # which can be attached to an RPC error.
7785 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
7786 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
7787 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
7788 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
7789 },
7790 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
7791 &quot;dimensions&quot;: { # The map holding related quota dimensions.
7792 &quot;a_key&quot;: &quot;A String&quot;,
7793 },
7794 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
7795 # type or metric.
7796 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
7797 # or metric.
7798 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
7799 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
7800 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
7801 },
7802 },
7803 ],
7804 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
7805 # This property is optional.
7806 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
7807 },
7808 ],
7809 },
7810 &quot;getVersionOperationMetadata&quot;: {
7811 &quot;inlineSbomInfo&quot;: {
7812 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
7813 # appropriate identifiers.
7814 &quot;a_key&quot;: &quot;A String&quot;,
7815 },
7816 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
7817 # identifiers.
7818 &quot;a_key&quot;: &quot;A String&quot;,
7819 },
7820 },
7821 },
7822 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
7823 # message that was returned, such as `NOT FOUND`.
7824 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
7825 # status code that was returned. For example, a `404` means the
7826 # resource was not found.
7827 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
7828 # defined by the server.
7829 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
7830 # This value is inRFC3339
7831 # text format.
7832 &quot;instancesBulkInsertOperationMetadata&quot;: {
7833 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
7834 # Example key: zones/us-central1-a
7835 &quot;a_key&quot;: {
7836 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
7837 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
7838 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
7839 # error.
7840 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
7841 # if the flow is rolling forward or rolling back.
7842 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
7843 },
7844 },
7845 },
7846 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
7847 # Operation resources.
7848 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7849 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
7850 # group of operations results from a `bulkInsert` API request.
7851 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
7852 # `update`, or `delete`, and so on.
7853 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
7854 # There is no requirement that this be linear or support any granularity of
7855 # operations. This should not be used to guess when the operation will be
7856 # complete. This number should monotonically increase as the operation
7857 # progresses.
7858 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
7859 # applicable when performing regional operations.
7860 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7861 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource with the resource id.
7862 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
7863 # this field will contain information on all underlying zonal actions and
7864 # their state.
7865 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
7866 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
7867 # Example key: zones/us-central1-a
7868 &quot;a_key&quot;: {
7869 &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
7870 # populated.
7871 # different programming environments, including REST APIs and RPC APIs. It is
7872 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
7873 # three pieces of data: error code, error message, and error details.
7874 #
7875 # You can find out more about this error model and how to work with it in the
7876 # [API Design Guide](https://cloud.google.com/apis/design/errors).
7877 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7878 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
7879 # message types for APIs to use.
7880 {
7881 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7882 },
7883 ],
7884 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
7885 # user-facing error message should be localized and sent in the
7886 # google.rpc.Status.details field, or localized by the client.
7887 },
7888 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
7889 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
7890 },
7891 },
7892 },
7893 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
7894 # This value is inRFC3339
7895 # text format.
7896 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
7897 # following:
7898 # `PENDING`, `RUNNING`, or `DONE`.
7899 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
7900 # operation.
7901 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
7902 # of the target resource.
7903 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
7904 # operations related to creating a snapshot, this points to the disk
7905 # that the snapshot was created from.
7906 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
7907 # `[email protected]` or
7908 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
7909 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
7910 # operation, this field will be populated.
7911 {
7912 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
7913 # Engine returns NO_RESULTS_ON_PAGE if there
7914 # are no results in the response.
7915 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
7916 # value format. For example:
7917 #
7918 # &quot;data&quot;: [
7919 # {
7920 # &quot;key&quot;: &quot;scope&quot;,
7921 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
7922 # }
7923 {
7924 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
7925 # returned. For example, for warnings where there are no results in a list
7926 # request for a particular zone, this key might be scope and
7927 # the key value might be the zone name. Other examples might be a key
7928 # indicating a deprecated resource and a suggested replacement, or a
7929 # warning about invalid network settings (for example, if an instance
7930 # attempts to perform IP forwarding but is not enabled for IP forwarding).
7931 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7932 },
7933 ],
7934 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7935 },
7936 ],
7937 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
7938 # applicable when performing per-zone operations.
7939 }</pre>
7940 </div>
7941
7942 <div class="method">
7943 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</code>
7944 <pre>Returns permissions that a caller has on the specified resource.
7945
7946 Args:
7947 project: string, Project ID for this request. (required)
7948 resource: string, Name or id of the resource for this request. (required)
7949 body: object, The request body.
7950 The object takes the form of:
7951
7952 {
7953 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with
7954 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
7955 &quot;A String&quot;,
7956 ],
7957 }
7958
7959 x__xgafv: string, V1 error format.
7960 Allowed values
7961 1 - v1 error format
7962 2 - v2 error format
7963
7964 Returns:
7965 An object of the form:
7966
7967 {
7968 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
7969 # allowed.
7970 &quot;A String&quot;,
7971 ],
7972 }</pre>
7973 </div>
7974
7975 </body></html>