• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, 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
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.organizationSecurityPolicies.html">organizationSecurityPolicies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#addAssociation">addAssociation(securityPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Inserts an association for the specified security policy.</p>
80<p class="toc_element">
81  <code><a href="#addRule">addRule(securityPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Inserts a rule into a security policy.</p>
83<p class="toc_element">
84  <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
87  <code><a href="#copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Copies rules to the specified security policy.</p>
89<p class="toc_element">
90  <code><a href="#delete">delete(securityPolicy, requestId=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Deletes the specified policy.</p>
92<p class="toc_element">
93  <code><a href="#get">get(securityPolicy, x__xgafv=None)</a></code></p>
94<p class="firstline">List all of the ordered rules present in a single specified policy.</p>
95<p class="toc_element">
96  <code><a href="#getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Gets an association with the specified name.</p>
98<p class="toc_element">
99  <code><a href="#getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</a></code></p>
100<p class="firstline">Gets a rule at the specified priority.</p>
101<p class="toc_element">
102  <code><a href="#insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Creates a new policy in the specified project using the data included in the request.</p>
104<p class="toc_element">
105  <code><a href="#list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
106<p class="firstline">List all the policies that have been configured for the specified project.</p>
107<p class="toc_element">
108  <code><a href="#listAssociations">listAssociations(targetResource=None, x__xgafv=None)</a></code></p>
109<p class="firstline">Lists associations of a specified target, i.e., organization or folder.</p>
110<p class="toc_element">
111  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114  <code><a href="#move">move(securityPolicy, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
115<p class="firstline">Moves the specified security policy.</p>
116<p class="toc_element">
117  <code><a href="#patch">patch(securityPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p>
118<p class="firstline">Patches the specified policy with the data included in the request.</p>
119<p class="toc_element">
120  <code><a href="#patchRule">patchRule(securityPolicy, body=None, priority=None, requestId=None, x__xgafv=None)</a></code></p>
121<p class="firstline">Patches a rule at the specified priority.</p>
122<p class="toc_element">
123  <code><a href="#removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None, x__xgafv=None)</a></code></p>
124<p class="firstline">Removes an association for the specified security policy.</p>
125<p class="toc_element">
126  <code><a href="#removeRule">removeRule(securityPolicy, priority=None, requestId=None, x__xgafv=None)</a></code></p>
127<p class="firstline">Deletes a rule at the specified priority.</p>
128<h3>Method Details</h3>
129<div class="method">
130    <code class="details" id="addAssociation">addAssociation(securityPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</code>
131  <pre>Inserts an association for the specified security policy.
132
133Args:
134  securityPolicy: string, Name of the security policy to update. (required)
135  body: object, The request body.
136    The object takes the form of:
137
138{
139  &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
140  &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
141  &quot;name&quot;: &quot;A String&quot;, # The name for an association.
142  &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
143}
144
145  replaceExistingAssociation: boolean, Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists.
146  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
147  x__xgafv: string, V1 error format.
148    Allowed values
149      1 - v1 error format
150      2 - v2 error format
151
152Returns:
153  An object of the form:
154
155    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
156  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
157  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
158  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
159  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
160  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
161    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
162      {
163        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
164        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
165        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
166      },
167    ],
168  },
169  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
170  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
171  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
172  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
173  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
174  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
175  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
176  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
177  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
178  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
179  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
180  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
181  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
182  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
183  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
184  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
185  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
186  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
187    {
188      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
189      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
190        {
191          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
192          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
193        },
194      ],
195      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
196    },
197  ],
198  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
199}</pre>
200</div>
201
202<div class="method">
203    <code class="details" id="addRule">addRule(securityPolicy, body=None, requestId=None, x__xgafv=None)</code>
204  <pre>Inserts a rule into a security policy.
205
206Args:
207  securityPolicy: string, Name of the security policy to update. (required)
208  body: object, The request body.
209    The object takes the form of:
210
211{ # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
212  &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this.
213  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
214  &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
215  &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules. This field may only be specified when the versioned_expr is set to FIREWALL.
216  &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
217    &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
218      {
219        &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
220        &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
221      },
222    ],
223  },
224  &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
225  &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
226    &quot;config&quot;: { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
227      &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
228        &quot;A String&quot;,
229      ],
230      &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.
231        {
232          &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
233          &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;]. This field may only be specified when versioned_expr is set to FIREWALL.
234            &quot;A String&quot;,
235          ],
236        },
237      ],
238      &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
239        &quot;A String&quot;,
240      ],
241    },
242    &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
243      &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
244      &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
245      &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
246      &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
247    },
248    &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
249  },
250  &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
251  &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
252  &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot;. Cannot be specified for any other actions.
253    &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
254    &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
255      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
256      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
257    },
258    &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit threshold. Valid option is &quot;allow&quot; only.
259    &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field &#x27;enforce_on_key&#x27; is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key type defaults to ALL. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
260    &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
261    &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are &quot;deny()&quot; where valid values for status are 403, 404, 429, and 502, and &quot;redirect&quot; where the redirect parameters come from exceed_redirect_options below.
262    &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
263      &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
264      &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
265    },
266    &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
267      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
268      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
269    },
270  },
271  &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
272    &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
273    &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
274  },
275  &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
276  &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
277  &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.
278    &quot;A String&quot;,
279  ],
280  &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
281    &quot;A String&quot;,
282  ],
283}
284
285  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
286  x__xgafv: string, V1 error format.
287    Allowed values
288      1 - v1 error format
289      2 - v2 error format
290
291Returns:
292  An object of the form:
293
294    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
295  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
296  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
297  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
298  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
299  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
300    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
301      {
302        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
303        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
304        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
305      },
306    ],
307  },
308  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
309  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
310  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
311  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
312  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
313  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
314  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
315  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
316  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
317  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
318  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
319  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
320  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
321  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
322  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
323  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
324  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
325  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
326    {
327      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
328      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
329        {
330          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
331          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
332        },
333      ],
334      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
335    },
336  ],
337  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
338}</pre>
339</div>
340
341<div class="method">
342    <code class="details" id="close">close()</code>
343  <pre>Close httplib2 connections.</pre>
344</div>
345
346<div class="method">
347    <code class="details" id="copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</code>
348  <pre>Copies rules to the specified security policy.
349
350Args:
351  securityPolicy: string, Name of the security policy to update. (required)
352  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
353  sourceSecurityPolicy: string, The security policy from which to copy rules.
354  x__xgafv: string, V1 error format.
355    Allowed values
356      1 - v1 error format
357      2 - v2 error format
358
359Returns:
360  An object of the form:
361
362    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
363  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
364  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
365  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
366  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
367  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
368    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
369      {
370        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
371        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
372        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
373      },
374    ],
375  },
376  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
377  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
378  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
379  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
380  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
381  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
382  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
383  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
384  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
385  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
386  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
387  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
388  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
389  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
390  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
391  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
392  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
393  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
394    {
395      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
396      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
397        {
398          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
399          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
400        },
401      ],
402      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
403    },
404  ],
405  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
406}</pre>
407</div>
408
409<div class="method">
410    <code class="details" id="delete">delete(securityPolicy, requestId=None, x__xgafv=None)</code>
411  <pre>Deletes the specified policy.
412
413Args:
414  securityPolicy: string, Name of the security policy to delete. (required)
415  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
416  x__xgafv: string, V1 error format.
417    Allowed values
418      1 - v1 error format
419      2 - v2 error format
420
421Returns:
422  An object of the form:
423
424    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
425  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
426  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
427  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
428  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
429  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
430    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
431      {
432        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
433        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
434        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
435      },
436    ],
437  },
438  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
439  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
440  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
441  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
442  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
443  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
444  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
445  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
446  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
447  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
448  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
449  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
450  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
451  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
452  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
453  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
454  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
455  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
456    {
457      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
458      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
459        {
460          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
461          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
462        },
463      ],
464      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
465    },
466  ],
467  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
468}</pre>
469</div>
470
471<div class="method">
472    <code class="details" id="get">get(securityPolicy, x__xgafv=None)</code>
473  <pre>List all of the ordered rules present in a single specified policy.
474
475Args:
476  securityPolicy: string, Name of the security policy to get. (required)
477  x__xgafv: string, V1 error format.
478    Allowed values
479      1 - v1 error format
480      2 - v2 error format
481
482Returns:
483  An object of the form:
484
485    { # Represents a Google Cloud Armor security policy resource. Only external backend services that use load balancers can reference a security policy. For more information, see Google Cloud Armor security policy overview.
486  &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
487    &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
488      &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
489      &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
490    },
491  },
492  &quot;advancedOptionsConfig&quot;: {
493    &quot;jsonParsing&quot;: &quot;A String&quot;,
494    &quot;logLevel&quot;: &quot;A String&quot;,
495  },
496  &quot;associations&quot;: [ # A list of associations that belong to this policy.
497    {
498      &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
499      &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
500      &quot;name&quot;: &quot;A String&quot;, # The name for an association.
501      &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
502    },
503  ],
504  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
505  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
506  &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the Organization security plicy. The name should be unique in the organization in which the security policy is created. This should only be used when SecurityPolicyType is FIREWALL. The name must be 1-63 characters long, and comply with https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
507  &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
508  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
509  &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
510  &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the security policy.
511  &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
512    &quot;a_key&quot;: &quot;A String&quot;,
513  },
514  &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
515  &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the security policy.
516  &quot;recaptchaOptionsConfig&quot;: {
517    &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
518  },
519  &quot;ruleTupleCount&quot;: 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples.
520  &quot;rules&quot;: [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match &quot;*&quot;). If no rules are provided when creating a security policy, a default rule with action &quot;allow&quot; will be added.
521    { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
522      &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this.
523      &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
524      &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
525      &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules. This field may only be specified when the versioned_expr is set to FIREWALL.
526      &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
527        &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
528          {
529            &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
530            &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
531          },
532        ],
533      },
534      &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
535      &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
536        &quot;config&quot;: { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
537          &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
538            &quot;A String&quot;,
539          ],
540          &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.
541            {
542              &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
543              &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;]. This field may only be specified when versioned_expr is set to FIREWALL.
544                &quot;A String&quot;,
545              ],
546            },
547          ],
548          &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
549            &quot;A String&quot;,
550          ],
551        },
552        &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
553          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
554          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
555          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
556          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
557        },
558        &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
559      },
560      &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
561      &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
562      &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot;. Cannot be specified for any other actions.
563        &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
564        &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
565          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
566          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
567        },
568        &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit threshold. Valid option is &quot;allow&quot; only.
569        &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field &#x27;enforce_on_key&#x27; is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key type defaults to ALL. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
570        &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
571        &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are &quot;deny()&quot; where valid values for status are 403, 404, 429, and 502, and &quot;redirect&quot; where the redirect parameters come from exceed_redirect_options below.
572        &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
573          &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
574          &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
575        },
576        &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
577          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
578          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
579        },
580      },
581      &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
582        &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
583        &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
584      },
585      &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
586      &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
587      &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.
588        &quot;A String&quot;,
589      ],
590      &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
591        &quot;A String&quot;,
592      ],
593    },
594  ],
595  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
596  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
597  &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy. CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google&#x27;s cache.
598}</pre>
599</div>
600
601<div class="method">
602    <code class="details" id="getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</code>
603  <pre>Gets an association with the specified name.
604
605Args:
606  securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
607  name: string, The name of the association to get from the security policy.
608  x__xgafv: string, V1 error format.
609    Allowed values
610      1 - v1 error format
611      2 - v2 error format
612
613Returns:
614  An object of the form:
615
616    {
617  &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
618  &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
619  &quot;name&quot;: &quot;A String&quot;, # The name for an association.
620  &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
621}</pre>
622</div>
623
624<div class="method">
625    <code class="details" id="getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</code>
626  <pre>Gets a rule at the specified priority.
627
628Args:
629  securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
630  priority: integer, The priority of the rule to get from the security policy.
631  x__xgafv: string, V1 error format.
632    Allowed values
633      1 - v1 error format
634      2 - v2 error format
635
636Returns:
637  An object of the form:
638
639    { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
640  &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this.
641  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
642  &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
643  &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules. This field may only be specified when the versioned_expr is set to FIREWALL.
644  &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
645    &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
646      {
647        &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
648        &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
649      },
650    ],
651  },
652  &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
653  &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
654    &quot;config&quot;: { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
655      &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
656        &quot;A String&quot;,
657      ],
658      &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.
659        {
660          &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
661          &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;]. This field may only be specified when versioned_expr is set to FIREWALL.
662            &quot;A String&quot;,
663          ],
664        },
665      ],
666      &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
667        &quot;A String&quot;,
668      ],
669    },
670    &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
671      &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
672      &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
673      &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
674      &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
675    },
676    &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
677  },
678  &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
679  &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
680  &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot;. Cannot be specified for any other actions.
681    &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
682    &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
683      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
684      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
685    },
686    &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit threshold. Valid option is &quot;allow&quot; only.
687    &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field &#x27;enforce_on_key&#x27; is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key type defaults to ALL. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
688    &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
689    &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are &quot;deny()&quot; where valid values for status are 403, 404, 429, and 502, and &quot;redirect&quot; where the redirect parameters come from exceed_redirect_options below.
690    &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
691      &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
692      &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
693    },
694    &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
695      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
696      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
697    },
698  },
699  &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
700    &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
701    &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
702  },
703  &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
704  &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
705  &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.
706    &quot;A String&quot;,
707  ],
708  &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
709    &quot;A String&quot;,
710  ],
711}</pre>
712</div>
713
714<div class="method">
715    <code class="details" id="insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</code>
716  <pre>Creates a new policy in the specified project using the data included in the request.
717
718Args:
719  body: object, The request body.
720    The object takes the form of:
721
722{ # Represents a Google Cloud Armor security policy resource. Only external backend services that use load balancers can reference a security policy. For more information, see Google Cloud Armor security policy overview.
723  &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
724    &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
725      &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
726      &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
727    },
728  },
729  &quot;advancedOptionsConfig&quot;: {
730    &quot;jsonParsing&quot;: &quot;A String&quot;,
731    &quot;logLevel&quot;: &quot;A String&quot;,
732  },
733  &quot;associations&quot;: [ # A list of associations that belong to this policy.
734    {
735      &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
736      &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
737      &quot;name&quot;: &quot;A String&quot;, # The name for an association.
738      &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
739    },
740  ],
741  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
742  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
743  &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the Organization security plicy. The name should be unique in the organization in which the security policy is created. This should only be used when SecurityPolicyType is FIREWALL. The name must be 1-63 characters long, and comply with https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
744  &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
745  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
746  &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
747  &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the security policy.
748  &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
749    &quot;a_key&quot;: &quot;A String&quot;,
750  },
751  &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
752  &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the security policy.
753  &quot;recaptchaOptionsConfig&quot;: {
754    &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
755  },
756  &quot;ruleTupleCount&quot;: 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples.
757  &quot;rules&quot;: [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match &quot;*&quot;). If no rules are provided when creating a security policy, a default rule with action &quot;allow&quot; will be added.
758    { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
759      &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this.
760      &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
761      &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
762      &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules. This field may only be specified when the versioned_expr is set to FIREWALL.
763      &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
764        &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
765          {
766            &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
767            &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
768          },
769        ],
770      },
771      &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
772      &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
773        &quot;config&quot;: { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
774          &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
775            &quot;A String&quot;,
776          ],
777          &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.
778            {
779              &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
780              &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;]. This field may only be specified when versioned_expr is set to FIREWALL.
781                &quot;A String&quot;,
782              ],
783            },
784          ],
785          &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
786            &quot;A String&quot;,
787          ],
788        },
789        &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
790          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
791          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
792          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
793          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
794        },
795        &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
796      },
797      &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
798      &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
799      &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot;. Cannot be specified for any other actions.
800        &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
801        &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
802          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
803          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
804        },
805        &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit threshold. Valid option is &quot;allow&quot; only.
806        &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field &#x27;enforce_on_key&#x27; is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key type defaults to ALL. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
807        &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
808        &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are &quot;deny()&quot; where valid values for status are 403, 404, 429, and 502, and &quot;redirect&quot; where the redirect parameters come from exceed_redirect_options below.
809        &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
810          &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
811          &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
812        },
813        &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
814          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
815          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
816        },
817      },
818      &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
819        &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
820        &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
821      },
822      &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
823      &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
824      &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.
825        &quot;A String&quot;,
826      ],
827      &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
828        &quot;A String&quot;,
829      ],
830    },
831  ],
832  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
833  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
834  &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy. CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google&#x27;s cache.
835}
836
837  parentId: string, Parent ID for this request. The ID can be either be &quot;folders/[FOLDER_ID]&quot; if the parent is a folder or &quot;organizations/[ORGANIZATION_ID]&quot; if the parent is an organization.
838  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
839  x__xgafv: string, V1 error format.
840    Allowed values
841      1 - v1 error format
842      2 - v2 error format
843
844Returns:
845  An object of the form:
846
847    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
848  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
849  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
850  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
851  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
852  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
853    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
854      {
855        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
856        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
857        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
858      },
859    ],
860  },
861  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
862  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
863  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
864  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
865  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
866  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
867  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
868  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
869  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
870  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
871  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
872  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
873  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
874  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
875  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
876  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
877  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
878  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the 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 Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
881      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
882        {
883          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
884          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
885        },
886      ],
887      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
888    },
889  ],
890  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
891}</pre>
892</div>
893
894<div class="method">
895    <code class="details" id="list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
896  <pre>List all the policies that have been configured for the specified project.
897
898Args:
899  filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
900  maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
901  orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
902  pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
903  parentId: string, Parent ID for this request.
904  returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
905  x__xgafv: string, V1 error format.
906    Allowed values
907      1 - v1 error format
908      2 - v2 error format
909
910Returns:
911  An object of the form:
912
913    {
914  &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
915  &quot;items&quot;: [ # A list of SecurityPolicy resources.
916    { # Represents a Google Cloud Armor security policy resource. Only external backend services that use load balancers can reference a security policy. For more information, see Google Cloud Armor security policy overview.
917      &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
918        &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
919          &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
920          &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
921        },
922      },
923      &quot;advancedOptionsConfig&quot;: {
924        &quot;jsonParsing&quot;: &quot;A String&quot;,
925        &quot;logLevel&quot;: &quot;A String&quot;,
926      },
927      &quot;associations&quot;: [ # A list of associations that belong to this policy.
928        {
929          &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
930          &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
931          &quot;name&quot;: &quot;A String&quot;, # The name for an association.
932          &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
933        },
934      ],
935      &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
936      &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
937      &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the Organization security plicy. The name should be unique in the organization in which the security policy is created. This should only be used when SecurityPolicyType is FIREWALL. The name must be 1-63 characters long, and comply with https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
938      &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
939      &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
940      &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
941      &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the security policy.
942      &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
943        &quot;a_key&quot;: &quot;A String&quot;,
944      },
945      &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
946      &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the security policy.
947      &quot;recaptchaOptionsConfig&quot;: {
948        &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
949      },
950      &quot;ruleTupleCount&quot;: 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples.
951      &quot;rules&quot;: [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match &quot;*&quot;). If no rules are provided when creating a security policy, a default rule with action &quot;allow&quot; will be added.
952        { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
953          &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this.
954          &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
955          &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
956          &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules. This field may only be specified when the versioned_expr is set to FIREWALL.
957          &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
958            &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
959              {
960                &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
961                &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
962              },
963            ],
964          },
965          &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
966          &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
967            &quot;config&quot;: { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
968              &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
969                &quot;A String&quot;,
970              ],
971              &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.
972                {
973                  &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
974                  &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;]. This field may only be specified when versioned_expr is set to FIREWALL.
975                    &quot;A String&quot;,
976                  ],
977                },
978              ],
979              &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
980                &quot;A String&quot;,
981              ],
982            },
983            &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
984              &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
985              &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
986              &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
987              &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
988            },
989            &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
990          },
991          &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
992          &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
993          &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot;. Cannot be specified for any other actions.
994            &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
995            &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
996              &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
997              &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
998            },
999            &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit threshold. Valid option is &quot;allow&quot; only.
1000            &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field &#x27;enforce_on_key&#x27; is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key type defaults to ALL. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
1001            &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
1002            &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are &quot;deny()&quot; where valid values for status are 403, 404, 429, and 502, and &quot;redirect&quot; where the redirect parameters come from exceed_redirect_options below.
1003            &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
1004              &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1005              &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1006            },
1007            &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
1008              &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1009              &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1010            },
1011          },
1012          &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
1013            &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1014            &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1015          },
1016          &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
1017          &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1018          &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.
1019            &quot;A String&quot;,
1020          ],
1021          &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1022            &quot;A String&quot;,
1023          ],
1024        },
1025      ],
1026      &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1027      &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1028      &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy. CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google&#x27;s cache.
1029    },
1030  ],
1031  &quot;kind&quot;: &quot;compute#securityPolicyList&quot;, # [Output Only] Type of resource. Always compute#securityPolicyList for listsof securityPolicies
1032  &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1033  &quot;warning&quot;: { # [Output Only] Informational warning message.
1034    &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1035    &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1036      {
1037        &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1038        &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1039      },
1040    ],
1041    &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1042  },
1043}</pre>
1044</div>
1045
1046<div class="method">
1047    <code class="details" id="listAssociations">listAssociations(targetResource=None, x__xgafv=None)</code>
1048  <pre>Lists associations of a specified target, i.e., organization or folder.
1049
1050Args:
1051  targetResource: string, The target resource to list associations. It is an organization, or a folder.
1052  x__xgafv: string, V1 error format.
1053    Allowed values
1054      1 - v1 error format
1055      2 - v2 error format
1056
1057Returns:
1058  An object of the form:
1059
1060    {
1061  &quot;associations&quot;: [ # A list of associations.
1062    {
1063      &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1064      &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
1065      &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1066      &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
1067    },
1068  ],
1069  &quot;kind&quot;: &quot;compute#organizationSecurityPoliciesListAssociationsResponse&quot;, # [Output Only] Type of securityPolicy associations. Always compute#organizationSecurityPoliciesListAssociations for lists of securityPolicy associations.
1070}</pre>
1071</div>
1072
1073<div class="method">
1074    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1075  <pre>Retrieves the next page of results.
1076
1077Args:
1078  previous_request: The request for the previous page. (required)
1079  previous_response: The response from the request for the previous page. (required)
1080
1081Returns:
1082  A request object that you can call &#x27;execute()&#x27; on to request the next
1083  page. Returns None if there are no more items in the collection.
1084    </pre>
1085</div>
1086
1087<div class="method">
1088    <code class="details" id="move">move(securityPolicy, parentId=None, requestId=None, x__xgafv=None)</code>
1089  <pre>Moves the specified security policy.
1090
1091Args:
1092  securityPolicy: string, Name of the security policy to update. (required)
1093  parentId: string, The new parent of the security policy.
1094  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1095  x__xgafv: string, V1 error format.
1096    Allowed values
1097      1 - v1 error format
1098      2 - v2 error format
1099
1100Returns:
1101  An object of the form:
1102
1103    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
1104  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1105  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1106  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1107  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1108  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1109    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1110      {
1111        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1112        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1113        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1114      },
1115    ],
1116  },
1117  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1118  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1119  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1120  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1121  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1122  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1123  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
1124  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1125  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1126  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1127  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1128  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1129  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1130  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1131  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1132  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1133  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1134  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1135    {
1136      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1137      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1138        {
1139          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1140          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1141        },
1142      ],
1143      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1144    },
1145  ],
1146  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1147}</pre>
1148</div>
1149
1150<div class="method">
1151    <code class="details" id="patch">patch(securityPolicy, body=None, requestId=None, x__xgafv=None)</code>
1152  <pre>Patches the specified policy with the data included in the request.
1153
1154Args:
1155  securityPolicy: string, Name of the security policy to update. (required)
1156  body: object, The request body.
1157    The object takes the form of:
1158
1159{ # Represents a Google Cloud Armor security policy resource. Only external backend services that use load balancers can reference a security policy. For more information, see Google Cloud Armor security policy overview.
1160  &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
1161    &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
1162      &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
1163      &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
1164    },
1165  },
1166  &quot;advancedOptionsConfig&quot;: {
1167    &quot;jsonParsing&quot;: &quot;A String&quot;,
1168    &quot;logLevel&quot;: &quot;A String&quot;,
1169  },
1170  &quot;associations&quot;: [ # A list of associations that belong to this policy.
1171    {
1172      &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1173      &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
1174      &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1175      &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
1176    },
1177  ],
1178  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1179  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1180  &quot;displayName&quot;: &quot;A String&quot;, # User-provided name of the Organization security plicy. The name should be unique in the organization in which the security policy is created. This should only be used when SecurityPolicyType is FIREWALL. The name must be 1-63 characters long, and comply with https://www.ietf.org/rfc/rfc1035.txt. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1181  &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
1182  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1183  &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
1184  &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this security policy, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make get() request to the security policy.
1185  &quot;labels&quot;: { # Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
1186    &quot;a_key&quot;: &quot;A String&quot;,
1187  },
1188  &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1189  &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the security policy.
1190  &quot;recaptchaOptionsConfig&quot;: {
1191    &quot;redirectSiteKey&quot;: &quot;A String&quot;, # An optional field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
1192  },
1193  &quot;ruleTupleCount&quot;: 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples.
1194  &quot;rules&quot;: [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match &quot;*&quot;). If no rules are provided when creating a security policy, a default rule with action &quot;allow&quot; will be added.
1195    { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1196      &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this.
1197      &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1198      &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
1199      &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules. This field may only be specified when the versioned_expr is set to FIREWALL.
1200      &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
1201        &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
1202          {
1203            &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
1204            &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
1205          },
1206        ],
1207      },
1208      &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
1209      &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1210        &quot;config&quot;: { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
1211          &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
1212            &quot;A String&quot;,
1213          ],
1214          &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.
1215            {
1216              &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1217              &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;]. This field may only be specified when versioned_expr is set to FIREWALL.
1218                &quot;A String&quot;,
1219              ],
1220            },
1221          ],
1222          &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
1223            &quot;A String&quot;,
1224          ],
1225        },
1226        &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
1227          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1228          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1229          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1230          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1231        },
1232        &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
1233      },
1234      &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
1235      &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
1236      &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot;. Cannot be specified for any other actions.
1237        &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
1238        &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
1239          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1240          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1241        },
1242        &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit threshold. Valid option is &quot;allow&quot; only.
1243        &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field &#x27;enforce_on_key&#x27; is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key type defaults to ALL. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
1244        &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
1245        &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are &quot;deny()&quot; where valid values for status are 403, 404, 429, and 502, and &quot;redirect&quot; where the redirect parameters come from exceed_redirect_options below.
1246        &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
1247          &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1248          &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1249        },
1250        &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
1251          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1252          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1253        },
1254      },
1255      &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
1256        &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1257        &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1258      },
1259      &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
1260      &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1261      &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.
1262        &quot;A String&quot;,
1263      ],
1264      &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1265        &quot;A String&quot;,
1266      ],
1267    },
1268  ],
1269  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1270  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1271  &quot;type&quot;: &quot;A String&quot;, # The type indicates the intended use of the security policy. CLOUD_ARMOR - Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. CLOUD_ARMOR_EDGE - Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google&#x27;s cache.
1272}
1273
1274  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1275  x__xgafv: string, V1 error format.
1276    Allowed values
1277      1 - v1 error format
1278      2 - v2 error format
1279
1280Returns:
1281  An object of the form:
1282
1283    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
1284  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1285  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1286  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1287  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1288  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1289    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1290      {
1291        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1292        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1293        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1294      },
1295    ],
1296  },
1297  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1298  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1299  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1300  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1301  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1302  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1303  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
1304  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1305  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1306  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1307  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1308  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1309  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1310  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1311  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1312  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1313  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1314  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1315    {
1316      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1317      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1318        {
1319          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1320          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1321        },
1322      ],
1323      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1324    },
1325  ],
1326  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1327}</pre>
1328</div>
1329
1330<div class="method">
1331    <code class="details" id="patchRule">patchRule(securityPolicy, body=None, priority=None, requestId=None, x__xgafv=None)</code>
1332  <pre>Patches a rule at the specified priority.
1333
1334Args:
1335  securityPolicy: string, Name of the security policy to update. (required)
1336  body: object, The request body.
1337    The object takes the form of:
1338
1339{ # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1340  &quot;action&quot;: &quot;A String&quot;, # The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(): deny access to target, returns the HTTP response code specified (valid values are 403, 404, and 502). - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this.
1341  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1342  &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
1343  &quot;enableLogging&quot;: True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on &quot;goto_next&quot; rules. This field may only be specified when the versioned_expr is set to FIREWALL.
1344  &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
1345    &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
1346      {
1347        &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
1348        &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
1349      },
1350    ],
1351  },
1352  &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
1353  &quot;match&quot;: { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding &#x27;action&#x27; is enforced.
1354    &quot;config&quot;: { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
1355      &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
1356        &quot;A String&quot;,
1357      ],
1358      &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match. This field may only be specified when versioned_expr is set to FIREWALL.
1359        {
1360          &quot;ipProtocol&quot;: &quot;A String&quot;, # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1361          &quot;ports&quot;: [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;]. This field may only be specified when versioned_expr is set to FIREWALL.
1362            &quot;A String&quot;,
1363          ],
1364        },
1365      ],
1366      &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
1367        &quot;A String&quot;,
1368      ],
1369    },
1370    &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
1371      &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1372      &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1373      &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1374      &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1375    },
1376    &quot;versionedExpr&quot;: &quot;A String&quot;, # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
1377  },
1378  &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
1379  &quot;priority&quot;: 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority.
1380  &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_ban&quot; or &quot;throttle&quot;. Cannot be specified for any other actions.
1381    &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
1382    &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration_sec&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
1383      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1384      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1385    },
1386    &quot;conformAction&quot;: &quot;A String&quot;, # Action to take for requests that are under the configured rate limit threshold. Valid option is &quot;allow&quot; only.
1387    &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field &#x27;enforce_on_key&#x27; is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key type defaults to ALL. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under &quot;enforce_on_key_name&quot;. The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
1388    &quot;enforceOnKeyName&quot;: &quot;A String&quot;, # Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
1389    &quot;exceedAction&quot;: &quot;A String&quot;, # Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are &quot;deny()&quot; where valid values for status are 403, 404, 429, and 502, and &quot;redirect&quot; where the redirect parameters come from exceed_redirect_options below.
1390    &quot;exceedRedirectOptions&quot;: { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
1391      &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1392      &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1393    },
1394    &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
1395      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1396      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1397    },
1398  },
1399  &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
1400    &quot;target&quot;: &quot;A String&quot;, # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
1401    &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1402  },
1403  &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
1404  &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1405  &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. This field may only be specified when versioned_expr is set to FIREWALL.
1406    &quot;A String&quot;,
1407  ],
1408  &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1409    &quot;A String&quot;,
1410  ],
1411}
1412
1413  priority: integer, The priority of the rule to patch.
1414  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1415  x__xgafv: string, V1 error format.
1416    Allowed values
1417      1 - v1 error format
1418      2 - v2 error format
1419
1420Returns:
1421  An object of the form:
1422
1423    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
1424  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1425  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1426  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1427  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1428  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1429    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1430      {
1431        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1432        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1433        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1434      },
1435    ],
1436  },
1437  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1438  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1439  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1440  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1441  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1442  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1443  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
1444  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1445  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1446  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1447  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1448  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1449  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1450  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1451  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1452  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1453  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1454  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1455    {
1456      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1457      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1458        {
1459          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1460          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1461        },
1462      ],
1463      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1464    },
1465  ],
1466  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1467}</pre>
1468</div>
1469
1470<div class="method">
1471    <code class="details" id="removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None, x__xgafv=None)</code>
1472  <pre>Removes an association for the specified security policy.
1473
1474Args:
1475  securityPolicy: string, Name of the security policy to update. (required)
1476  name: string, Name for the attachment that will be removed.
1477  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1478  x__xgafv: string, V1 error format.
1479    Allowed values
1480      1 - v1 error format
1481      2 - v2 error format
1482
1483Returns:
1484  An object of the form:
1485
1486    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
1487  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1488  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1489  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1490  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1491  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1492    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1493      {
1494        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1495        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1496        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1497      },
1498    ],
1499  },
1500  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1501  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1502  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1503  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1504  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1505  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1506  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
1507  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1508  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1509  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1510  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1511  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1512  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1513  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1514  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1515  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1516  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1517  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1518    {
1519      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1520      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1521        {
1522          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1523          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1524        },
1525      ],
1526      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1527    },
1528  ],
1529  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1530}</pre>
1531</div>
1532
1533<div class="method">
1534    <code class="details" id="removeRule">removeRule(securityPolicy, priority=None, requestId=None, x__xgafv=None)</code>
1535  <pre>Deletes a rule at the specified priority.
1536
1537Args:
1538  securityPolicy: string, Name of the security policy to update. (required)
1539  priority: integer, The priority of the rule to remove from the security policy.
1540  requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1541  x__xgafv: string, V1 error format.
1542    Allowed values
1543      1 - v1 error format
1544      2 - v2 error format
1545
1546Returns:
1547  An object of the form:
1548
1549    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.
1550  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1551  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1552  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1553  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1554  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1555    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1556      {
1557        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1558        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1559        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1560      },
1561    ],
1562  },
1563  &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1564  &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1565  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1566  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1567  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1568  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1569  &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
1570  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1571  &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1572  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1573  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1574  &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1575  &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1576  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1577  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1578  &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1579  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1580  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1581    {
1582      &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1583      &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example: &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1584        {
1585          &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1586          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1587        },
1588      ],
1589      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1590    },
1591  ],
1592  &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1593}</pre>
1594</div>
1595
1596</body></html>