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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.organizationSecurityPolicies.html">organizationSecurityPolicies</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#addAssociation">addAssociation(securityPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Inserts an association for the specified security policy.</p>
80<p class="toc_element">
81  <code><a href="#addRule">addRule(securityPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Inserts a rule into a security policy.</p>
83<p class="toc_element">
84  <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
87  <code><a href="#copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Copies rules to the specified security policy.</p>
89<p class="toc_element">
90  <code><a href="#delete">delete(securityPolicy, requestId=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Deletes the specified policy.</p>
92<p class="toc_element">
93  <code><a href="#get">get(securityPolicy, x__xgafv=None)</a></code></p>
94<p class="firstline">List all of the ordered rules present in a single specified policy.</p>
95<p class="toc_element">
96  <code><a href="#getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Gets an association with the specified name.</p>
98<p class="toc_element">
99  <code><a href="#getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</a></code></p>
100<p class="firstline">Gets a rule at the specified priority.</p>
101<p class="toc_element">
102  <code><a href="#insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Creates a new policy in the specified 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/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
175    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
176  },
177  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
178  &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.
179  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
180  &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.
181  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
182  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
183  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
184  &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.
185  &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`.
186  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
187  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
188  &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.
189  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
190  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
191    {
192      &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.
193      &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; }
194        {
195          &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).
196          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
197        },
198      ],
199      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
200    },
201  ],
202  &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.
203}</pre>
204</div>
205
206<div class="method">
207    <code class="details" id="addRule">addRule(securityPolicy, body=None, requestId=None, x__xgafv=None)</code>
208  <pre>Inserts a rule into a security policy.
209
210Args:
211  securityPolicy: string, Name of the security policy to update. (required)
212  body: object, The request body.
213    The object takes the form of:
214
215{ # 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).
216  &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.
217  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
218  &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.
219  &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.
220  &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
221    &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
222      {
223        &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
224        &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
225      },
226    ],
227  },
228  &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
229  &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.
230    &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.
231      &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
232        &quot;A String&quot;,
233      ],
234      &quot;destPorts&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.
235        {
236          &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.
237          &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.
238            &quot;A String&quot;,
239          ],
240        },
241      ],
242      &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.
243        {
244          &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.
245          &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.
246            &quot;A String&quot;,
247          ],
248        },
249      ],
250      &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
251        &quot;A String&quot;,
252      ],
253    },
254    &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.
255      &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.
256      &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
257      &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.
258      &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.
259    },
260    &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.
261  },
262  &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
263  &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.
264  &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.
265    &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.
266    &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;.
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    &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.
271    &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.
272    &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.
273    &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.
274    &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.
275      &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.
276      &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
277    },
278    &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
279      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
280      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
281    },
282  },
283  &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
284    &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.
285    &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
286  },
287  &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any other actions.
288  &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.
289  &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
290  &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.
291    &quot;A String&quot;,
292  ],
293  &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
294    &quot;A String&quot;,
295  ],
296}
297
298  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).
299  x__xgafv: string, V1 error format.
300    Allowed values
301      1 - v1 error format
302      2 - v2 error format
303
304Returns:
305  An object of the form:
306
307    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
308  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
309  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
310  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
311  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
312  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
313    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
314      {
315        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
316        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
317        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
318      },
319    ],
320  },
321  &quot;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`.
322  &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.
323  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
324  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
325  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
326  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
327    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
328  },
329  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
330  &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.
331  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
332  &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.
333  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
334  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
335  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
336  &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.
337  &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`.
338  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
339  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
340  &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.
341  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
342  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
343    {
344      &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.
345      &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; }
346        {
347          &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).
348          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
349        },
350      ],
351      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
352    },
353  ],
354  &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.
355}</pre>
356</div>
357
358<div class="method">
359    <code class="details" id="close">close()</code>
360  <pre>Close httplib2 connections.</pre>
361</div>
362
363<div class="method">
364    <code class="details" id="copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None, x__xgafv=None)</code>
365  <pre>Copies rules to the specified security policy.
366
367Args:
368  securityPolicy: string, Name of the security policy to update. (required)
369  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).
370  sourceSecurityPolicy: string, The security policy from which to copy rules.
371  x__xgafv: string, V1 error format.
372    Allowed values
373      1 - v1 error format
374      2 - v2 error format
375
376Returns:
377  An object of the form:
378
379    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
380  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
381  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
382  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
383  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
384  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
385    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
386      {
387        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
388        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
389        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
390      },
391    ],
392  },
393  &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`.
394  &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.
395  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
396  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
397  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
398  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
399    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
400  },
401  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
402  &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.
403  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
404  &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.
405  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
406  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
407  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
408  &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.
409  &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`.
410  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
411  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
412  &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.
413  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
414  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
415    {
416      &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.
417      &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; }
418        {
419          &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).
420          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
421        },
422      ],
423      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
424    },
425  ],
426  &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.
427}</pre>
428</div>
429
430<div class="method">
431    <code class="details" id="delete">delete(securityPolicy, requestId=None, x__xgafv=None)</code>
432  <pre>Deletes the specified policy.
433
434Args:
435  securityPolicy: string, Name of the security policy to delete. (required)
436  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).
437  x__xgafv: string, V1 error format.
438    Allowed values
439      1 - v1 error format
440      2 - v2 error format
441
442Returns:
443  An object of the form:
444
445    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
446  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
447  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
448  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
449  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
450  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
451    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
452      {
453        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
454        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
455        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
456      },
457    ],
458  },
459  &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`.
460  &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.
461  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
462  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
463  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
464  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
465    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
466  },
467  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
468  &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.
469  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
470  &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.
471  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
472  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
473  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
474  &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.
475  &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`.
476  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
477  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
478  &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.
479  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
480  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
481    {
482      &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.
483      &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; }
484        {
485          &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).
486          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
487        },
488      ],
489      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
490    },
491  ],
492  &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.
493}</pre>
494</div>
495
496<div class="method">
497    <code class="details" id="get">get(securityPolicy, x__xgafv=None)</code>
498  <pre>List all of the ordered rules present in a single specified policy.
499
500Args:
501  securityPolicy: string, Name of the security policy to get. (required)
502  x__xgafv: string, V1 error format.
503    Allowed values
504      1 - v1 error format
505      2 - v2 error format
506
507Returns:
508  An object of the form:
509
510    { # 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.
511  &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
512    &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
513      &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
514      &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
515    },
516  },
517  &quot;advancedOptionsConfig&quot;: {
518    &quot;jsonParsing&quot;: &quot;A String&quot;,
519    &quot;logLevel&quot;: &quot;A String&quot;,
520  },
521  &quot;associations&quot;: [ # A list of associations that belong to this policy.
522    {
523      &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
524      &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
525      &quot;name&quot;: &quot;A String&quot;, # The name for an association.
526      &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
527    },
528  ],
529  &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
530    &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
531  },
532  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
533  &quot;ddosProtectionConfig&quot;: {
534    &quot;ddosProtection&quot;: &quot;A String&quot;,
535  },
536  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
537  &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.
538  &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.
539  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
540  &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
541  &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.
542  &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.
543    &quot;a_key&quot;: &quot;A String&quot;,
544  },
545  &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.
546  &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the security policy.
547  &quot;recaptchaOptionsConfig&quot;: {
548    &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.
549  },
550  &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
551  &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.
552  &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.
553    { # 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).
554      &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.
555      &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
556      &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.
557      &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.
558      &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
559        &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
560          {
561            &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
562            &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
563          },
564        ],
565      },
566      &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
567      &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.
568        &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.
569          &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
570            &quot;A String&quot;,
571          ],
572          &quot;destPorts&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.
573            {
574              &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.
575              &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.
576                &quot;A String&quot;,
577              ],
578            },
579          ],
580          &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.
581            {
582              &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.
583              &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.
584                &quot;A String&quot;,
585              ],
586            },
587          ],
588          &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
589            &quot;A String&quot;,
590          ],
591        },
592        &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.
593          &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.
594          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
595          &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.
596          &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.
597        },
598        &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.
599      },
600      &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
601      &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.
602      &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.
603        &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.
604        &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;.
605          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
606          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
607        },
608        &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.
609        &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.
610        &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.
611        &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.
612        &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.
613          &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.
614          &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
615        },
616        &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
617          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
618          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
619        },
620      },
621      &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
622        &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.
623        &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
624      },
625      &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any other actions.
626      &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.
627      &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
628      &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.
629        &quot;A String&quot;,
630      ],
631      &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
632        &quot;A String&quot;,
633      ],
634    },
635  ],
636  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
637  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
638  &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.
639}</pre>
640</div>
641
642<div class="method">
643    <code class="details" id="getAssociation">getAssociation(securityPolicy, name=None, x__xgafv=None)</code>
644  <pre>Gets an association with the specified name.
645
646Args:
647  securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
648  name: string, The name of the association to get from the security policy.
649  x__xgafv: string, V1 error format.
650    Allowed values
651      1 - v1 error format
652      2 - v2 error format
653
654Returns:
655  An object of the form:
656
657    {
658  &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
659  &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
660  &quot;name&quot;: &quot;A String&quot;, # The name for an association.
661  &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
662}</pre>
663</div>
664
665<div class="method">
666    <code class="details" id="getRule">getRule(securityPolicy, priority=None, x__xgafv=None)</code>
667  <pre>Gets a rule at the specified priority.
668
669Args:
670  securityPolicy: string, Name of the security policy to which the queried rule belongs. (required)
671  priority: integer, The priority of the rule to get from the security policy.
672  x__xgafv: string, V1 error format.
673    Allowed values
674      1 - v1 error format
675      2 - v2 error format
676
677Returns:
678  An object of the form:
679
680    { # 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).
681  &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.
682  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
683  &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.
684  &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.
685  &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
686    &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
687      {
688        &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
689        &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
690      },
691    ],
692  },
693  &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
694  &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.
695    &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.
696      &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
697        &quot;A String&quot;,
698      ],
699      &quot;destPorts&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.
700        {
701          &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.
702          &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.
703            &quot;A String&quot;,
704          ],
705        },
706      ],
707      &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.
708        {
709          &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.
710          &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.
711            &quot;A String&quot;,
712          ],
713        },
714      ],
715      &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
716        &quot;A String&quot;,
717      ],
718    },
719    &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.
720      &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.
721      &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
722      &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.
723      &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.
724    },
725    &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.
726  },
727  &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
728  &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.
729  &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.
730    &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.
731    &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;.
732      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
733      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
734    },
735    &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.
736    &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.
737    &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.
738    &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.
739    &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.
740      &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.
741      &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
742    },
743    &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
744      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
745      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
746    },
747  },
748  &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
749    &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.
750    &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
751  },
752  &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any other actions.
753  &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.
754  &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
755  &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.
756    &quot;A String&quot;,
757  ],
758  &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
759    &quot;A String&quot;,
760  ],
761}</pre>
762</div>
763
764<div class="method">
765    <code class="details" id="insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</code>
766  <pre>Creates a new policy in the specified project using the data included in the request.
767
768Args:
769  body: object, The request body.
770    The object takes the form of:
771
772{ # 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.
773  &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
774    &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
775      &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
776      &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
777    },
778  },
779  &quot;advancedOptionsConfig&quot;: {
780    &quot;jsonParsing&quot;: &quot;A String&quot;,
781    &quot;logLevel&quot;: &quot;A String&quot;,
782  },
783  &quot;associations&quot;: [ # A list of associations that belong to this policy.
784    {
785      &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
786      &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
787      &quot;name&quot;: &quot;A String&quot;, # The name for an association.
788      &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
789    },
790  ],
791  &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
792    &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
793  },
794  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
795  &quot;ddosProtectionConfig&quot;: {
796    &quot;ddosProtection&quot;: &quot;A String&quot;,
797  },
798  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
799  &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.
800  &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.
801  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
802  &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
803  &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.
804  &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.
805    &quot;a_key&quot;: &quot;A String&quot;,
806  },
807  &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.
808  &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the security policy.
809  &quot;recaptchaOptionsConfig&quot;: {
810    &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.
811  },
812  &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
813  &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.
814  &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.
815    { # 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).
816      &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.
817      &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
818      &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.
819      &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.
820      &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
821        &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
822          {
823            &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
824            &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
825          },
826        ],
827      },
828      &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
829      &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.
830        &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.
831          &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
832            &quot;A String&quot;,
833          ],
834          &quot;destPorts&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.
835            {
836              &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.
837              &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.
838                &quot;A String&quot;,
839              ],
840            },
841          ],
842          &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.
843            {
844              &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.
845              &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.
846                &quot;A String&quot;,
847              ],
848            },
849          ],
850          &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
851            &quot;A String&quot;,
852          ],
853        },
854        &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.
855          &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.
856          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
857          &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.
858          &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.
859        },
860        &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.
861      },
862      &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
863      &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.
864      &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.
865        &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.
866        &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;.
867          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
868          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
869        },
870        &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.
871        &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.
872        &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.
873        &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.
874        &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.
875          &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.
876          &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
877        },
878        &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
879          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
880          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
881        },
882      },
883      &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
884        &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.
885        &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
886      },
887      &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any other actions.
888      &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.
889      &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
890      &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.
891        &quot;A String&quot;,
892      ],
893      &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
894        &quot;A String&quot;,
895      ],
896    },
897  ],
898  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
899  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
900  &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.
901}
902
903  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.
904  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).
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    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
914  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
915  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
916  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
917  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
918  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
919    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
920      {
921        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
922        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
923        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
924      },
925    ],
926  },
927  &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`.
928  &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.
929  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
930  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
931  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
932  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
933    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
934  },
935  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
936  &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.
937  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
938  &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.
939  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
940  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
941  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
942  &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.
943  &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`.
944  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
945  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
946  &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.
947  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
948  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
949    {
950      &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.
951      &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; }
952        {
953          &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).
954          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
955        },
956      ],
957      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
958    },
959  ],
960  &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.
961}</pre>
962</div>
963
964<div class="method">
965    <code class="details" id="list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code>
966  <pre>List all the policies that have been configured for the specified project.
967
968Args:
969  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) ```
970  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`)
971  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.
972  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.
973  parentId: string, Parent ID for this request.
974  returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
975  x__xgafv: string, V1 error format.
976    Allowed values
977      1 - v1 error format
978      2 - v2 error format
979
980Returns:
981  An object of the form:
982
983    {
984  &quot;etag&quot;: &quot;A String&quot;,
985  &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
986  &quot;items&quot;: [ # A list of SecurityPolicy resources.
987    { # 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.
988      &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
989        &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
990          &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
991          &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
992        },
993      },
994      &quot;advancedOptionsConfig&quot;: {
995        &quot;jsonParsing&quot;: &quot;A String&quot;,
996        &quot;logLevel&quot;: &quot;A String&quot;,
997      },
998      &quot;associations&quot;: [ # A list of associations that belong to this policy.
999        {
1000          &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1001          &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
1002          &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1003          &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
1004        },
1005      ],
1006      &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
1007        &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
1008      },
1009      &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1010      &quot;ddosProtectionConfig&quot;: {
1011        &quot;ddosProtection&quot;: &quot;A String&quot;,
1012      },
1013      &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1014      &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.
1015      &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.
1016      &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1017      &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
1018      &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.
1019      &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.
1020        &quot;a_key&quot;: &quot;A String&quot;,
1021      },
1022      &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.
1023      &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the security policy.
1024      &quot;recaptchaOptionsConfig&quot;: {
1025        &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.
1026      },
1027      &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
1028      &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.
1029      &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.
1030        { # 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).
1031          &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.
1032          &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1033          &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.
1034          &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.
1035          &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
1036            &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
1037              {
1038                &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
1039                &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
1040              },
1041            ],
1042          },
1043          &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
1044          &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.
1045            &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.
1046              &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
1047                &quot;A String&quot;,
1048              ],
1049              &quot;destPorts&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.
1050                {
1051                  &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.
1052                  &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.
1053                    &quot;A String&quot;,
1054                  ],
1055                },
1056              ],
1057              &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.
1058                {
1059                  &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.
1060                  &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.
1061                    &quot;A String&quot;,
1062                  ],
1063                },
1064              ],
1065              &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
1066                &quot;A String&quot;,
1067              ],
1068            },
1069            &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.
1070              &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.
1071              &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1072              &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.
1073              &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.
1074            },
1075            &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.
1076          },
1077          &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
1078          &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.
1079          &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.
1080            &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.
1081            &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;.
1082              &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1083              &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1084            },
1085            &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.
1086            &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.
1087            &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.
1088            &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.
1089            &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.
1090              &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.
1091              &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1092            },
1093            &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
1094              &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1095              &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1096            },
1097          },
1098          &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
1099            &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.
1100            &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1101          },
1102          &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any other actions.
1103          &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.
1104          &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1105          &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.
1106            &quot;A String&quot;,
1107          ],
1108          &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1109            &quot;A String&quot;,
1110          ],
1111        },
1112      ],
1113      &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1114      &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1115      &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.
1116    },
1117  ],
1118  &quot;kind&quot;: &quot;compute#securityPolicyList&quot;, # [Output Only] Type of resource. Always compute#securityPolicyList for listsof securityPolicies
1119  &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.
1120  &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
1121    &quot;A String&quot;,
1122  ],
1123  &quot;warning&quot;: { # [Output Only] Informational warning message.
1124    &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.
1125    &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; }
1126      {
1127        &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).
1128        &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1129      },
1130    ],
1131    &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1132  },
1133}</pre>
1134</div>
1135
1136<div class="method">
1137    <code class="details" id="listAssociations">listAssociations(targetResource=None, x__xgafv=None)</code>
1138  <pre>Lists associations of a specified target, i.e., organization or folder.
1139
1140Args:
1141  targetResource: string, The target resource to list associations. It is an organization, or a folder.
1142  x__xgafv: string, V1 error format.
1143    Allowed values
1144      1 - v1 error format
1145      2 - v2 error format
1146
1147Returns:
1148  An object of the form:
1149
1150    {
1151  &quot;associations&quot;: [ # A list of associations.
1152    {
1153      &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1154      &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
1155      &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1156      &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
1157    },
1158  ],
1159  &quot;kind&quot;: &quot;compute#organizationSecurityPoliciesListAssociationsResponse&quot;, # [Output Only] Type of securityPolicy associations. Always compute#organizationSecurityPoliciesListAssociations for lists of securityPolicy associations.
1160}</pre>
1161</div>
1162
1163<div class="method">
1164    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1165  <pre>Retrieves the next page of results.
1166
1167Args:
1168  previous_request: The request for the previous page. (required)
1169  previous_response: The response from the request for the previous page. (required)
1170
1171Returns:
1172  A request object that you can call &#x27;execute()&#x27; on to request the next
1173  page. Returns None if there are no more items in the collection.
1174    </pre>
1175</div>
1176
1177<div class="method">
1178    <code class="details" id="move">move(securityPolicy, parentId=None, requestId=None, x__xgafv=None)</code>
1179  <pre>Moves the specified security policy.
1180
1181Args:
1182  securityPolicy: string, Name of the security policy to update. (required)
1183  parentId: string, The new parent of the security policy.
1184  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).
1185  x__xgafv: string, V1 error format.
1186    Allowed values
1187      1 - v1 error format
1188      2 - v2 error format
1189
1190Returns:
1191  An object of the form:
1192
1193    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
1194  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1195  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1196  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1197  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1198  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1199    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1200      {
1201        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1202        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1203        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1204      },
1205    ],
1206  },
1207  &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`.
1208  &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.
1209  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1210  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1211  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1212  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
1213    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1214  },
1215  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1216  &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.
1217  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1218  &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.
1219  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1220  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1221  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1222  &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.
1223  &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`.
1224  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1225  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1226  &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.
1227  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
1228  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1229    {
1230      &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.
1231      &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; }
1232        {
1233          &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).
1234          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1235        },
1236      ],
1237      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1238    },
1239  ],
1240  &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.
1241}</pre>
1242</div>
1243
1244<div class="method">
1245    <code class="details" id="patch">patch(securityPolicy, body=None, requestId=None, x__xgafv=None)</code>
1246  <pre>Patches the specified policy with the data included in the request.
1247
1248Args:
1249  securityPolicy: string, Name of the security policy to update. (required)
1250  body: object, The request body.
1251    The object takes the form of:
1252
1253{ # 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.
1254  &quot;adaptiveProtectionConfig&quot;: { # Configuration options for Cloud Armor Adaptive Protection (CAAP).
1255    &quot;layer7DdosDefenseConfig&quot;: { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning.
1256      &quot;enable&quot;: True or False, # If set to true, enables CAAP for L7 DDoS detection.
1257      &quot;ruleVisibility&quot;: &quot;A String&quot;, # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules.
1258    },
1259  },
1260  &quot;advancedOptionsConfig&quot;: {
1261    &quot;jsonParsing&quot;: &quot;A String&quot;,
1262    &quot;logLevel&quot;: &quot;A String&quot;,
1263  },
1264  &quot;associations&quot;: [ # A list of associations that belong to this policy.
1265    {
1266      &quot;attachmentId&quot;: &quot;A String&quot;, # The resource that the security policy is attached to.
1267      &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] The display name of the security policy of the association.
1268      &quot;name&quot;: &quot;A String&quot;, # The name for an association.
1269      &quot;securityPolicyId&quot;: &quot;A String&quot;, # [Output Only] The security policy ID of the association.
1270    },
1271  ],
1272  &quot;cloudArmorConfig&quot;: { # Configuration options for Cloud Armor.
1273    &quot;enableMl&quot;: True or False, # If set to true, enables Cloud Armor Machine Learning.
1274  },
1275  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1276  &quot;ddosProtectionConfig&quot;: {
1277    &quot;ddosProtection&quot;: &quot;A String&quot;,
1278  },
1279  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1280  &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.
1281  &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.
1282  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1283  &quot;kind&quot;: &quot;compute#securityPolicy&quot;, # [Output only] Type of the resource. Always compute#securityPolicyfor security policies
1284  &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.
1285  &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.
1286    &quot;a_key&quot;: &quot;A String&quot;,
1287  },
1288  &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.
1289  &quot;parent&quot;: &quot;A String&quot;, # [Output Only] The parent of the security policy.
1290  &quot;recaptchaOptionsConfig&quot;: {
1291    &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.
1292  },
1293  &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
1294  &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.
1295  &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.
1296    { # 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).
1297      &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.
1298      &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1299      &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.
1300      &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.
1301      &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
1302        &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
1303          {
1304            &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
1305            &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
1306          },
1307        ],
1308      },
1309      &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
1310      &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.
1311        &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.
1312          &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
1313            &quot;A String&quot;,
1314          ],
1315          &quot;destPorts&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.
1316            {
1317              &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.
1318              &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.
1319                &quot;A String&quot;,
1320              ],
1321            },
1322          ],
1323          &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.
1324            {
1325              &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.
1326              &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.
1327                &quot;A String&quot;,
1328              ],
1329            },
1330          ],
1331          &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
1332            &quot;A String&quot;,
1333          ],
1334        },
1335        &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.
1336          &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.
1337          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1338          &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.
1339          &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.
1340        },
1341        &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.
1342      },
1343      &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
1344      &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.
1345      &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.
1346        &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.
1347        &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;.
1348          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1349          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1350        },
1351        &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.
1352        &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.
1353        &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.
1354        &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.
1355        &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.
1356          &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.
1357          &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1358        },
1359        &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
1360          &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1361          &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1362        },
1363      },
1364      &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
1365        &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.
1366        &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1367      },
1368      &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any other actions.
1369      &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.
1370      &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1371      &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.
1372        &quot;A String&quot;,
1373      ],
1374      &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1375        &quot;A String&quot;,
1376      ],
1377    },
1378  ],
1379  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1380  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1381  &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.
1382}
1383
1384  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).
1385  x__xgafv: string, V1 error format.
1386    Allowed values
1387      1 - v1 error format
1388      2 - v2 error format
1389
1390Returns:
1391  An object of the form:
1392
1393    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
1394  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1395  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1396  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1397  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1398  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1399    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1400      {
1401        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1402        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1403        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1404      },
1405    ],
1406  },
1407  &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`.
1408  &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.
1409  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1410  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1411  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1412  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
1413    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1414  },
1415  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1416  &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.
1417  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1418  &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.
1419  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1420  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1421  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1422  &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.
1423  &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`.
1424  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1425  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1426  &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.
1427  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
1428  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1429    {
1430      &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.
1431      &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; }
1432        {
1433          &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).
1434          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1435        },
1436      ],
1437      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1438    },
1439  ],
1440  &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.
1441}</pre>
1442</div>
1443
1444<div class="method">
1445    <code class="details" id="patchRule">patchRule(securityPolicy, body=None, priority=None, requestId=None, x__xgafv=None)</code>
1446  <pre>Patches a rule at the specified priority.
1447
1448Args:
1449  securityPolicy: string, Name of the security policy to update. (required)
1450  body: object, The request body.
1451    The object takes the form of:
1452
1453{ # 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).
1454  &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.
1455  &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1456  &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.
1457  &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.
1458  &quot;headerAction&quot;: { # Optional, additional actions that are performed on headers.
1459    &quot;requestHeadersToAdds&quot;: [ # The list of request headers to add or overwrite if they&#x27;re already present.
1460      {
1461        &quot;headerName&quot;: &quot;A String&quot;, # The name of the header to set.
1462        &quot;headerValue&quot;: &quot;A String&quot;, # The value to set the named header to.
1463      },
1464    ],
1465  },
1466  &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
1467  &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.
1468    &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.
1469      &quot;destIpRanges&quot;: [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL.
1470        &quot;A String&quot;,
1471      ],
1472      &quot;destPorts&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.
1473        {
1474          &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.
1475          &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.
1476            &quot;A String&quot;,
1477          ],
1478        },
1479      ],
1480      &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.
1481        {
1482          &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.
1483          &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.
1484            &quot;A String&quot;,
1485          ],
1486        },
1487      ],
1488      &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
1489        &quot;A String&quot;,
1490      ],
1491    },
1492    &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.
1493      &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.
1494      &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1495      &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.
1496      &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.
1497    },
1498    &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.
1499  },
1500  &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
1501  &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.
1502  &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.
1503    &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.
1504    &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;.
1505      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1506      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1507    },
1508    &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.
1509    &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.
1510    &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.
1511    &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.
1512    &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.
1513      &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.
1514      &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1515    },
1516    &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
1517      &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
1518      &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
1519    },
1520  },
1521  &quot;redirectOptions&quot;: { # Parameters defining the redirect action. Cannot be specified for any other actions.
1522    &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.
1523    &quot;type&quot;: &quot;A String&quot;, # Type of the redirect action.
1524  },
1525  &quot;redirectTarget&quot;: &quot;A String&quot;, # This must be specified for redirect actions. Cannot be specified for any other actions.
1526  &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.
1527  &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1528  &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.
1529    &quot;A String&quot;,
1530  ],
1531  &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1532    &quot;A String&quot;,
1533  ],
1534}
1535
1536  priority: integer, The priority of the rule to patch.
1537  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).
1538  x__xgafv: string, V1 error format.
1539    Allowed values
1540      1 - v1 error format
1541      2 - v2 error format
1542
1543Returns:
1544  An object of the form:
1545
1546    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
1547  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1548  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1549  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1550  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1551  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1552    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1553      {
1554        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1555        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1556        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1557      },
1558    ],
1559  },
1560  &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`.
1561  &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.
1562  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1563  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1564  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1565  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
1566    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1567  },
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;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1575  &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.
1576  &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`.
1577  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1578  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1579  &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.
1580  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
1581  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1582    {
1583      &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.
1584      &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; }
1585        {
1586          &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).
1587          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1588        },
1589      ],
1590      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1591    },
1592  ],
1593  &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.
1594}</pre>
1595</div>
1596
1597<div class="method">
1598    <code class="details" id="removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None, x__xgafv=None)</code>
1599  <pre>Removes an association for the specified security policy.
1600
1601Args:
1602  securityPolicy: string, Name of the security policy to update. (required)
1603  name: string, Name for the attachment that will be removed.
1604  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).
1605  x__xgafv: string, V1 error format.
1606    Allowed values
1607      1 - v1 error format
1608      2 - v2 error format
1609
1610Returns:
1611  An object of the form:
1612
1613    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
1614  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1615  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1616  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1617  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1618  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1619    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1620      {
1621        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1622        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1623        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1624      },
1625    ],
1626  },
1627  &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`.
1628  &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.
1629  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1630  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1631  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1632  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
1633    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1634  },
1635  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1636  &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.
1637  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1638  &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.
1639  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1640  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1641  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1642  &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.
1643  &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`.
1644  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1645  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1646  &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.
1647  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
1648  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1649    {
1650      &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.
1651      &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; }
1652        {
1653          &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).
1654          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1655        },
1656      ],
1657      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1658    },
1659  ],
1660  &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.
1661}</pre>
1662</div>
1663
1664<div class="method">
1665    <code class="details" id="removeRule">removeRule(securityPolicy, priority=None, requestId=None, x__xgafv=None)</code>
1666  <pre>Deletes a rule at the specified priority.
1667
1668Args:
1669  securityPolicy: string, Name of the security policy to update. (required)
1670  priority: integer, The priority of the rule to remove from the security policy.
1671  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).
1672  x__xgafv: string, V1 error format.
1673    Allowed values
1674      1 - v1 error format
1675      2 - v2 error format
1676
1677Returns:
1678  An object of the form:
1679
1680    { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/alpha/globalOperations) * [Regional](/compute/docs/reference/rest/alpha/regionOperations) * [Zonal](/compute/docs/reference/rest/alpha/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.
1681  &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1682  &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1683  &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1684  &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1685  &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1686    &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1687      {
1688        &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1689        &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1690        &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1691      },
1692    ],
1693  },
1694  &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`.
1695  &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.
1696  &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1697  &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1698  &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1699  &quot;metadata&quot;: { # [Output Only] Service-specific metadata attached to this operation.
1700    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1701  },
1702  &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1703  &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.
1704  &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1705  &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.
1706  &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1707  &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1708  &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1709  &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.
1710  &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`.
1711  &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1712  &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1713  &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.
1714  &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `[email protected]`.
1715  &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1716    {
1717      &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.
1718      &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; }
1719        {
1720          &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).
1721          &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1722        },
1723      ],
1724      &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1725    },
1726  ],
1727  &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.
1728}</pre>
1729</div>
1730
1731</body></html>