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 "attachmentId": "A String", # The resource that the security policy is attached to. 140 "displayName": "A String", # [Output Only] The display name of the security policy of the association. 141 "name": "A String", # The name for an association. 142 "securityPolicyId": "A String", # [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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 157 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 158 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 159 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 160 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 161 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 162 { 163 "code": "A String", # [Output Only] The error type identifier for this error. 164 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 165 "message": "A String", # [Output Only] An optional, human-readable error message. 166 }, 167 ], 168 }, 169 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 170 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 172 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 173 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 174 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 175 "a_key": "", # Properties of the object. Contains field @type with type URL. 176 }, 177 "name": "A String", # [Output Only] Name of the operation. 178 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 179 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 180 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 182 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 183 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 185 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 186 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 187 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 188 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 190 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 191 { 192 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 194 { 195 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 197 }, 198 ], 199 "message": "A String", # [Output Only] A human-readable description of the warning code. 200 }, 201 ], 202 "zone": "A String", # [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 "action": "A String", # 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 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 218 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 219 "enableLogging": 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 "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. 220 "headerAction": { # Optional, additional actions that are performed on headers. 221 "requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already present. 222 { 223 "headerName": "A String", # The name of the header to set. 224 "headerValue": "A String", # The value to set the named header to. 225 }, 226 ], 227 }, 228 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 229 "match": { # 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 'action' is enforced. 230 "config": { # 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 "destIpRanges": [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. 232 "A String", 233 ], 234 "destPorts": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 238 "A String", 239 ], 240 }, 241 ], 242 "layer4Configs": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 246 "A String", 247 ], 248 }, 249 ], 250 "srcIpRanges": [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. 251 "A String", 252 ], 253 }, 254 "expr": { # 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: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" 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 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 256 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 257 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 258 "title": "A String", # 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 "versionedExpr": "A String", # 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 "preview": True or False, # If set to true, the specified action is not enforced. 263 "priority": 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 "rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 265 "banDurationSec": 42, # Can only be specified if the action for the rule is "rate_based_ban". 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 "banThreshold": { # Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. 267 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 268 "intervalSec": 42, # Interval over which the threshold is computed. 269 }, 270 "conformAction": "A String", # Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. 271 "enforceOnKey": "A String", # 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 'enforce_on_key' 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 "enforce_on_key_name". 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 "enforce_on_key_name". 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 "enforceOnKeyName": "A String", # 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 "exceedAction": "A String", # 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 "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceed_redirect_options below. 274 "exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. 275 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 276 "type": "A String", # Type of the redirect action. 277 }, 278 "rateLimitThreshold": { # Threshold at which to begin ratelimiting. 279 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 280 "intervalSec": 42, # Interval over which the threshold is computed. 281 }, 282 }, 283 "redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any other actions. 284 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 285 "type": "A String", # Type of the redirect action. 286 }, 287 "redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any other actions. 288 "ruleNumber": "A String", # 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 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 290 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network'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 "A String", 292 ], 293 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 294 "A String", 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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 309 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 310 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 311 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 312 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 313 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 314 { 315 "code": "A String", # [Output Only] The error type identifier for this error. 316 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 317 "message": "A String", # [Output Only] An optional, human-readable error message. 318 }, 319 ], 320 }, 321 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 322 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 324 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 325 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 326 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 327 "a_key": "", # Properties of the object. Contains field @type with type URL. 328 }, 329 "name": "A String", # [Output Only] Name of the operation. 330 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 331 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 332 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 334 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 335 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 336 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 337 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 338 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 339 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 340 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 342 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 343 { 344 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 346 { 347 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 349 }, 350 ], 351 "message": "A String", # [Output Only] A human-readable description of the warning code. 352 }, 353 ], 354 "zone": "A String", # [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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 381 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 382 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 383 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 384 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 385 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 386 { 387 "code": "A String", # [Output Only] The error type identifier for this error. 388 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 389 "message": "A String", # [Output Only] An optional, human-readable error message. 390 }, 391 ], 392 }, 393 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 394 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 396 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 397 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 398 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 399 "a_key": "", # Properties of the object. Contains field @type with type URL. 400 }, 401 "name": "A String", # [Output Only] Name of the operation. 402 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 403 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 404 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 406 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 407 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 408 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 409 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 410 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 411 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 412 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 414 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 415 { 416 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 418 { 419 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 421 }, 422 ], 423 "message": "A String", # [Output Only] A human-readable description of the warning code. 424 }, 425 ], 426 "zone": "A String", # [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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 447 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 448 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 449 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 450 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 451 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 452 { 453 "code": "A String", # [Output Only] The error type identifier for this error. 454 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 455 "message": "A String", # [Output Only] An optional, human-readable error message. 456 }, 457 ], 458 }, 459 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 460 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 462 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 463 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 464 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 465 "a_key": "", # Properties of the object. Contains field @type with type URL. 466 }, 467 "name": "A String", # [Output Only] Name of the operation. 468 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 469 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 470 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 472 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 473 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 474 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 475 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 476 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 477 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 478 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 480 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 481 { 482 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 484 { 485 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 487 }, 488 ], 489 "message": "A String", # [Output Only] A human-readable description of the warning code. 490 }, 491 ], 492 "zone": "A String", # [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 "adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). 512 "layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. 513 "enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. 514 "ruleVisibility": "A String", # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules. 515 }, 516 }, 517 "advancedOptionsConfig": { 518 "jsonParsing": "A String", 519 "logLevel": "A String", 520 }, 521 "associations": [ # A list of associations that belong to this policy. 522 { 523 "attachmentId": "A String", # The resource that the security policy is attached to. 524 "displayName": "A String", # [Output Only] The display name of the security policy of the association. 525 "name": "A String", # The name for an association. 526 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 527 }, 528 ], 529 "cloudArmorConfig": { # Configuration options for Cloud Armor. 530 "enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. 531 }, 532 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 533 "ddosProtectionConfig": { 534 "ddosProtection": "A String", 535 }, 536 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 537 "displayName": "A String", # 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 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata'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 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 540 "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies 541 "labelFingerprint": "A String", # 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 "labels": { # 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 "a_key": "A String", 544 }, 545 "name": "A String", # 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 "parent": "A String", # [Output Only] The parent of the security policy. 547 "recaptchaOptionsConfig": { 548 "redirectSiteKey": "A String", # 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 "region": "A String", # [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies. 551 "ruleTupleCount": 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. 552 "rules": [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" 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 "action": "A String", # 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 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 556 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 557 "enableLogging": 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 "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. 558 "headerAction": { # Optional, additional actions that are performed on headers. 559 "requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already present. 560 { 561 "headerName": "A String", # The name of the header to set. 562 "headerValue": "A String", # The value to set the named header to. 563 }, 564 ], 565 }, 566 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 567 "match": { # 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 'action' is enforced. 568 "config": { # 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 "destIpRanges": [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. 570 "A String", 571 ], 572 "destPorts": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 576 "A String", 577 ], 578 }, 579 ], 580 "layer4Configs": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 584 "A String", 585 ], 586 }, 587 ], 588 "srcIpRanges": [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. 589 "A String", 590 ], 591 }, 592 "expr": { # 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: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" 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 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 594 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 595 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 596 "title": "A String", # 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 "versionedExpr": "A String", # 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 "preview": True or False, # If set to true, the specified action is not enforced. 601 "priority": 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 "rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 603 "banDurationSec": 42, # Can only be specified if the action for the rule is "rate_based_ban". 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 "banThreshold": { # Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. 605 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 606 "intervalSec": 42, # Interval over which the threshold is computed. 607 }, 608 "conformAction": "A String", # Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. 609 "enforceOnKey": "A String", # 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 'enforce_on_key' 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 "enforce_on_key_name". 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 "enforce_on_key_name". 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 "enforceOnKeyName": "A String", # 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 "exceedAction": "A String", # 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 "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceed_redirect_options below. 612 "exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. 613 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 614 "type": "A String", # Type of the redirect action. 615 }, 616 "rateLimitThreshold": { # Threshold at which to begin ratelimiting. 617 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 618 "intervalSec": 42, # Interval over which the threshold is computed. 619 }, 620 }, 621 "redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any other actions. 622 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 623 "type": "A String", # Type of the redirect action. 624 }, 625 "redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any other actions. 626 "ruleNumber": "A String", # 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 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 628 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network'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 "A String", 630 ], 631 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 632 "A String", 633 ], 634 }, 635 ], 636 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 637 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 638 "type": "A String", # 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'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 "attachmentId": "A String", # The resource that the security policy is attached to. 659 "displayName": "A String", # [Output Only] The display name of the security policy of the association. 660 "name": "A String", # The name for an association. 661 "securityPolicyId": "A String", # [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 "action": "A String", # 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 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 683 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 684 "enableLogging": 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 "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. 685 "headerAction": { # Optional, additional actions that are performed on headers. 686 "requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already present. 687 { 688 "headerName": "A String", # The name of the header to set. 689 "headerValue": "A String", # The value to set the named header to. 690 }, 691 ], 692 }, 693 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 694 "match": { # 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 'action' is enforced. 695 "config": { # 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 "destIpRanges": [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. 697 "A String", 698 ], 699 "destPorts": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 703 "A String", 704 ], 705 }, 706 ], 707 "layer4Configs": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 711 "A String", 712 ], 713 }, 714 ], 715 "srcIpRanges": [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. 716 "A String", 717 ], 718 }, 719 "expr": { # 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: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" 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 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 721 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 722 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 723 "title": "A String", # 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 "versionedExpr": "A String", # 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 "preview": True or False, # If set to true, the specified action is not enforced. 728 "priority": 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 "rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 730 "banDurationSec": 42, # Can only be specified if the action for the rule is "rate_based_ban". 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 "banThreshold": { # Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. 732 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 733 "intervalSec": 42, # Interval over which the threshold is computed. 734 }, 735 "conformAction": "A String", # Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. 736 "enforceOnKey": "A String", # 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 'enforce_on_key' 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 "enforce_on_key_name". 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 "enforce_on_key_name". 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 "enforceOnKeyName": "A String", # 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 "exceedAction": "A String", # 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 "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceed_redirect_options below. 739 "exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. 740 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 741 "type": "A String", # Type of the redirect action. 742 }, 743 "rateLimitThreshold": { # Threshold at which to begin ratelimiting. 744 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 745 "intervalSec": 42, # Interval over which the threshold is computed. 746 }, 747 }, 748 "redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any other actions. 749 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 750 "type": "A String", # Type of the redirect action. 751 }, 752 "redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any other actions. 753 "ruleNumber": "A String", # 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 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 755 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network'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 "A String", 757 ], 758 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 759 "A String", 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 "adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). 774 "layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. 775 "enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. 776 "ruleVisibility": "A String", # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules. 777 }, 778 }, 779 "advancedOptionsConfig": { 780 "jsonParsing": "A String", 781 "logLevel": "A String", 782 }, 783 "associations": [ # A list of associations that belong to this policy. 784 { 785 "attachmentId": "A String", # The resource that the security policy is attached to. 786 "displayName": "A String", # [Output Only] The display name of the security policy of the association. 787 "name": "A String", # The name for an association. 788 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 789 }, 790 ], 791 "cloudArmorConfig": { # Configuration options for Cloud Armor. 792 "enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. 793 }, 794 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 795 "ddosProtectionConfig": { 796 "ddosProtection": "A String", 797 }, 798 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 799 "displayName": "A String", # 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 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata'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 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 802 "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies 803 "labelFingerprint": "A String", # 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 "labels": { # 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 "a_key": "A String", 806 }, 807 "name": "A String", # 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 "parent": "A String", # [Output Only] The parent of the security policy. 809 "recaptchaOptionsConfig": { 810 "redirectSiteKey": "A String", # 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 "region": "A String", # [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies. 813 "ruleTupleCount": 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. 814 "rules": [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" 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 "action": "A String", # 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 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 818 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 819 "enableLogging": 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 "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. 820 "headerAction": { # Optional, additional actions that are performed on headers. 821 "requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already present. 822 { 823 "headerName": "A String", # The name of the header to set. 824 "headerValue": "A String", # The value to set the named header to. 825 }, 826 ], 827 }, 828 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 829 "match": { # 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 'action' is enforced. 830 "config": { # 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 "destIpRanges": [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. 832 "A String", 833 ], 834 "destPorts": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 838 "A String", 839 ], 840 }, 841 ], 842 "layer4Configs": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 846 "A String", 847 ], 848 }, 849 ], 850 "srcIpRanges": [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. 851 "A String", 852 ], 853 }, 854 "expr": { # 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: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" 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 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 856 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 857 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 858 "title": "A String", # 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 "versionedExpr": "A String", # 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 "preview": True or False, # If set to true, the specified action is not enforced. 863 "priority": 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 "rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 865 "banDurationSec": 42, # Can only be specified if the action for the rule is "rate_based_ban". 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 "banThreshold": { # Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. 867 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 868 "intervalSec": 42, # Interval over which the threshold is computed. 869 }, 870 "conformAction": "A String", # Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. 871 "enforceOnKey": "A String", # 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 'enforce_on_key' 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 "enforce_on_key_name". 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 "enforce_on_key_name". 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 "enforceOnKeyName": "A String", # 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 "exceedAction": "A String", # 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 "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceed_redirect_options below. 874 "exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. 875 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 876 "type": "A String", # Type of the redirect action. 877 }, 878 "rateLimitThreshold": { # Threshold at which to begin ratelimiting. 879 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 880 "intervalSec": 42, # Interval over which the threshold is computed. 881 }, 882 }, 883 "redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any other actions. 884 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 885 "type": "A String", # Type of the redirect action. 886 }, 887 "redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any other actions. 888 "ruleNumber": "A String", # 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 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 890 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network'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 "A String", 892 ], 893 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 894 "A String", 895 ], 896 }, 897 ], 898 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 899 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 900 "type": "A String", # 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's cache. 901} 902 903 parentId: string, Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" 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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 915 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 916 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 917 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 918 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 919 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 920 { 921 "code": "A String", # [Output Only] The error type identifier for this error. 922 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 923 "message": "A String", # [Output Only] An optional, human-readable error message. 924 }, 925 ], 926 }, 927 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 928 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 930 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 931 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 932 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 933 "a_key": "", # Properties of the object. Contains field @type with type URL. 934 }, 935 "name": "A String", # [Output Only] Name of the operation. 936 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 937 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 938 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 940 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 941 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 942 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 943 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 944 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 945 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 946 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 948 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 949 { 950 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 952 { 953 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 955 }, 956 ], 957 "message": "A String", # [Output Only] A human-readable description of the warning code. 958 }, 959 ], 960 "zone": "A String", # [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 `=`, `!=`, `>`, `<`, `<=`, `>=` 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 = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") 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="creationTimestamp desc"`. 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 "etag": "A String", 985 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 986 "items": [ # 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 "adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). 989 "layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. 990 "enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. 991 "ruleVisibility": "A String", # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules. 992 }, 993 }, 994 "advancedOptionsConfig": { 995 "jsonParsing": "A String", 996 "logLevel": "A String", 997 }, 998 "associations": [ # A list of associations that belong to this policy. 999 { 1000 "attachmentId": "A String", # The resource that the security policy is attached to. 1001 "displayName": "A String", # [Output Only] The display name of the security policy of the association. 1002 "name": "A String", # The name for an association. 1003 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 1004 }, 1005 ], 1006 "cloudArmorConfig": { # Configuration options for Cloud Armor. 1007 "enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. 1008 }, 1009 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 1010 "ddosProtectionConfig": { 1011 "ddosProtection": "A String", 1012 }, 1013 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1014 "displayName": "A String", # 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 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata'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 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1017 "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies 1018 "labelFingerprint": "A String", # 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 "labels": { # 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 "a_key": "A String", 1021 }, 1022 "name": "A String", # 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 "parent": "A String", # [Output Only] The parent of the security policy. 1024 "recaptchaOptionsConfig": { 1025 "redirectSiteKey": "A String", # 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 "region": "A String", # [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies. 1028 "ruleTupleCount": 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. 1029 "rules": [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" 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 "action": "A String", # 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 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1033 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 1034 "enableLogging": 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 "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. 1035 "headerAction": { # Optional, additional actions that are performed on headers. 1036 "requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already present. 1037 { 1038 "headerName": "A String", # The name of the header to set. 1039 "headerValue": "A String", # The value to set the named header to. 1040 }, 1041 ], 1042 }, 1043 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 1044 "match": { # 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 'action' is enforced. 1045 "config": { # 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 "destIpRanges": [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. 1047 "A String", 1048 ], 1049 "destPorts": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 1053 "A String", 1054 ], 1055 }, 1056 ], 1057 "layer4Configs": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 1061 "A String", 1062 ], 1063 }, 1064 ], 1065 "srcIpRanges": [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. 1066 "A String", 1067 ], 1068 }, 1069 "expr": { # 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: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" 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 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1071 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1072 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1073 "title": "A String", # 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 "versionedExpr": "A String", # 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 "preview": True or False, # If set to true, the specified action is not enforced. 1078 "priority": 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 "rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 1080 "banDurationSec": 42, # Can only be specified if the action for the rule is "rate_based_ban". 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 "banThreshold": { # Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. 1082 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 1083 "intervalSec": 42, # Interval over which the threshold is computed. 1084 }, 1085 "conformAction": "A String", # Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. 1086 "enforceOnKey": "A String", # 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 'enforce_on_key' 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 "enforce_on_key_name". 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 "enforce_on_key_name". 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 "enforceOnKeyName": "A String", # 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 "exceedAction": "A String", # 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 "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceed_redirect_options below. 1089 "exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. 1090 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 1091 "type": "A String", # Type of the redirect action. 1092 }, 1093 "rateLimitThreshold": { # Threshold at which to begin ratelimiting. 1094 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 1095 "intervalSec": 42, # Interval over which the threshold is computed. 1096 }, 1097 }, 1098 "redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any other actions. 1099 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 1100 "type": "A String", # Type of the redirect action. 1101 }, 1102 "redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any other actions. 1103 "ruleNumber": "A String", # 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 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 1105 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network'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 "A String", 1107 ], 1108 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 1109 "A String", 1110 ], 1111 }, 1112 ], 1113 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1114 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1115 "type": "A String", # 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's cache. 1116 }, 1117 ], 1118 "kind": "compute#securityPolicyList", # [Output Only] Type of resource. Always compute#securityPolicyList for listsof securityPolicies 1119 "nextPageToken": "A String", # [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 "unreachables": [ # [Output Only] Unreachable resources. 1121 "A String", 1122 ], 1123 "warning": { # [Output Only] Informational warning message. 1124 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1126 { 1127 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1129 }, 1130 ], 1131 "message": "A String", # [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 "associations": [ # A list of associations. 1152 { 1153 "attachmentId": "A String", # The resource that the security policy is attached to. 1154 "displayName": "A String", # [Output Only] The display name of the security policy of the association. 1155 "name": "A String", # The name for an association. 1156 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 1157 }, 1158 ], 1159 "kind": "compute#organizationSecurityPoliciesListAssociationsResponse", # [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 'execute()' 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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1195 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1196 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1197 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1198 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1199 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1200 { 1201 "code": "A String", # [Output Only] The error type identifier for this error. 1202 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1203 "message": "A String", # [Output Only] An optional, human-readable error message. 1204 }, 1205 ], 1206 }, 1207 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1208 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1210 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1211 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1212 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 1213 "a_key": "", # Properties of the object. Contains field @type with type URL. 1214 }, 1215 "name": "A String", # [Output Only] Name of the operation. 1216 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1217 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1218 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1220 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1221 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1222 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1223 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1224 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1225 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1226 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1228 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1229 { 1230 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1232 { 1233 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1235 }, 1236 ], 1237 "message": "A String", # [Output Only] A human-readable description of the warning code. 1238 }, 1239 ], 1240 "zone": "A String", # [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 "adaptiveProtectionConfig": { # Configuration options for Cloud Armor Adaptive Protection (CAAP). 1255 "layer7DdosDefenseConfig": { # Configuration options for L7 DDoS detection. # If set to true, enables Cloud Armor Machine Learning. 1256 "enable": True or False, # If set to true, enables CAAP for L7 DDoS detection. 1257 "ruleVisibility": "A String", # Rule visibility can be one of the following: STANDARD - opaque rules. (default) PREMIUM - transparent rules. 1258 }, 1259 }, 1260 "advancedOptionsConfig": { 1261 "jsonParsing": "A String", 1262 "logLevel": "A String", 1263 }, 1264 "associations": [ # A list of associations that belong to this policy. 1265 { 1266 "attachmentId": "A String", # The resource that the security policy is attached to. 1267 "displayName": "A String", # [Output Only] The display name of the security policy of the association. 1268 "name": "A String", # The name for an association. 1269 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 1270 }, 1271 ], 1272 "cloudArmorConfig": { # Configuration options for Cloud Armor. 1273 "enableMl": True or False, # If set to true, enables Cloud Armor Machine Learning. 1274 }, 1275 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 1276 "ddosProtectionConfig": { 1277 "ddosProtection": "A String", 1278 }, 1279 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1280 "displayName": "A String", # 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 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata'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 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1283 "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies 1284 "labelFingerprint": "A String", # 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 "labels": { # 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 "a_key": "A String", 1287 }, 1288 "name": "A String", # 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 "parent": "A String", # [Output Only] The parent of the security policy. 1290 "recaptchaOptionsConfig": { 1291 "redirectSiteKey": "A String", # 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 "region": "A String", # [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies. 1294 "ruleTupleCount": 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. 1295 "rules": [ # A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a security policy, a default rule with action "allow" 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 "action": "A String", # 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 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1299 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 1300 "enableLogging": 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 "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. 1301 "headerAction": { # Optional, additional actions that are performed on headers. 1302 "requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already present. 1303 { 1304 "headerName": "A String", # The name of the header to set. 1305 "headerValue": "A String", # The value to set the named header to. 1306 }, 1307 ], 1308 }, 1309 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 1310 "match": { # 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 'action' is enforced. 1311 "config": { # 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 "destIpRanges": [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. 1313 "A String", 1314 ], 1315 "destPorts": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 1319 "A String", 1320 ], 1321 }, 1322 ], 1323 "layer4Configs": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 1327 "A String", 1328 ], 1329 }, 1330 ], 1331 "srcIpRanges": [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. 1332 "A String", 1333 ], 1334 }, 1335 "expr": { # 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: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" 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 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1337 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1338 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1339 "title": "A String", # 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 "versionedExpr": "A String", # 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 "preview": True or False, # If set to true, the specified action is not enforced. 1344 "priority": 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 "rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 1346 "banDurationSec": 42, # Can only be specified if the action for the rule is "rate_based_ban". 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 "banThreshold": { # Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. 1348 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 1349 "intervalSec": 42, # Interval over which the threshold is computed. 1350 }, 1351 "conformAction": "A String", # Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. 1352 "enforceOnKey": "A String", # 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 'enforce_on_key' 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 "enforce_on_key_name". 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 "enforce_on_key_name". 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 "enforceOnKeyName": "A String", # 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 "exceedAction": "A String", # 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 "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceed_redirect_options below. 1355 "exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. 1356 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 1357 "type": "A String", # Type of the redirect action. 1358 }, 1359 "rateLimitThreshold": { # Threshold at which to begin ratelimiting. 1360 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 1361 "intervalSec": 42, # Interval over which the threshold is computed. 1362 }, 1363 }, 1364 "redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any other actions. 1365 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 1366 "type": "A String", # Type of the redirect action. 1367 }, 1368 "redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any other actions. 1369 "ruleNumber": "A String", # 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 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 1371 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network'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 "A String", 1373 ], 1374 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 1375 "A String", 1376 ], 1377 }, 1378 ], 1379 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1380 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1381 "type": "A String", # 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'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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1395 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1396 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1397 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1398 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1399 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1400 { 1401 "code": "A String", # [Output Only] The error type identifier for this error. 1402 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1403 "message": "A String", # [Output Only] An optional, human-readable error message. 1404 }, 1405 ], 1406 }, 1407 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1408 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1410 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1411 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1412 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 1413 "a_key": "", # Properties of the object. Contains field @type with type URL. 1414 }, 1415 "name": "A String", # [Output Only] Name of the operation. 1416 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1417 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1418 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1420 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1421 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1422 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1423 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1424 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1425 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1426 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1428 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1429 { 1430 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1432 { 1433 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1435 }, 1436 ], 1437 "message": "A String", # [Output Only] A human-readable description of the warning code. 1438 }, 1439 ], 1440 "zone": "A String", # [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 "action": "A String", # 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 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1456 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 1457 "enableLogging": 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 "goto_next" rules. This field may only be specified when the versioned_expr is set to FIREWALL. 1458 "headerAction": { # Optional, additional actions that are performed on headers. 1459 "requestHeadersToAdds": [ # The list of request headers to add or overwrite if they're already present. 1460 { 1461 "headerName": "A String", # The name of the header to set. 1462 "headerValue": "A String", # The value to set the named header to. 1463 }, 1464 ], 1465 }, 1466 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 1467 "match": { # 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 'action' is enforced. 1468 "config": { # 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 "destIpRanges": [ # CIDR IP address range. This field may only be specified when versioned_expr is set to FIREWALL. 1470 "A String", 1471 ], 1472 "destPorts": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 1476 "A String", 1477 ], 1478 }, 1479 ], 1480 "layer4Configs": [ # 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 "ipProtocol": "A String", # 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 "ports": [ # 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: ["22"], ["80","443"], and ["12345-12349"]. This field may only be specified when versioned_expr is set to FIREWALL. 1484 "A String", 1485 ], 1486 }, 1487 ], 1488 "srcIpRanges": [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10. 1489 "A String", 1490 ], 1491 }, 1492 "expr": { # 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: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" 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 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1494 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1495 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1496 "title": "A String", # 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 "versionedExpr": "A String", # 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 "preview": True or False, # If set to true, the specified action is not enforced. 1501 "priority": 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 "rateLimitOptions": { # Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 1503 "banDurationSec": 42, # Can only be specified if the action for the rule is "rate_based_ban". 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 "banThreshold": { # Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. 1505 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 1506 "intervalSec": 42, # Interval over which the threshold is computed. 1507 }, 1508 "conformAction": "A String", # Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. 1509 "enforceOnKey": "A String", # 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 'enforce_on_key' 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 "enforce_on_key_name". 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 "enforce_on_key_name". 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 "enforceOnKeyName": "A String", # 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 "exceedAction": "A String", # 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 "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceed_redirect_options below. 1512 "exceedRedirectOptions": { # Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect. 1513 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 1514 "type": "A String", # Type of the redirect action. 1515 }, 1516 "rateLimitThreshold": { # Threshold at which to begin ratelimiting. 1517 "count": 42, # Number of HTTP(S) requests for calculating the threshold. 1518 "intervalSec": 42, # Interval over which the threshold is computed. 1519 }, 1520 }, 1521 "redirectOptions": { # Parameters defining the redirect action. Cannot be specified for any other actions. 1522 "target": "A String", # Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA. 1523 "type": "A String", # Type of the redirect action. 1524 }, 1525 "redirectTarget": "A String", # This must be specified for redirect actions. Cannot be specified for any other actions. 1526 "ruleNumber": "A String", # 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 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 1528 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network'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 "A String", 1530 ], 1531 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 1532 "A String", 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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1548 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1549 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1550 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1551 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1552 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1553 { 1554 "code": "A String", # [Output Only] The error type identifier for this error. 1555 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1556 "message": "A String", # [Output Only] An optional, human-readable error message. 1557 }, 1558 ], 1559 }, 1560 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1561 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1563 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1564 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1565 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 1566 "a_key": "", # Properties of the object. Contains field @type with type URL. 1567 }, 1568 "name": "A String", # [Output Only] Name of the operation. 1569 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1570 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1571 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1573 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1574 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1575 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1576 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1577 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1578 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1579 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1581 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1582 { 1583 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1585 { 1586 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1588 }, 1589 ], 1590 "message": "A String", # [Output Only] A human-readable description of the warning code. 1591 }, 1592 ], 1593 "zone": "A String", # [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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1615 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1616 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1617 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1618 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1619 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1620 { 1621 "code": "A String", # [Output Only] The error type identifier for this error. 1622 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1623 "message": "A String", # [Output Only] An optional, human-readable error message. 1624 }, 1625 ], 1626 }, 1627 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1628 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1630 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1631 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1632 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 1633 "a_key": "", # Properties of the object. Contains field @type with type URL. 1634 }, 1635 "name": "A String", # [Output Only] Name of the operation. 1636 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1637 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1638 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1640 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1641 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1642 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1643 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1644 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1645 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1646 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1648 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1649 { 1650 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1652 { 1653 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1655 }, 1656 ], 1657 "message": "A String", # [Output Only] A human-readable description of the warning code. 1658 }, 1659 ], 1660 "zone": "A String", # [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 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1682 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1683 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1684 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1685 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1686 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1687 { 1688 "code": "A String", # [Output Only] The error type identifier for this error. 1689 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1690 "message": "A String", # [Output Only] An optional, human-readable error message. 1691 }, 1692 ], 1693 }, 1694 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1695 "httpErrorStatusCode": 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 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1697 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1698 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1699 "metadata": { # [Output Only] Service-specific metadata attached to this operation. 1700 "a_key": "", # Properties of the object. Contains field @type with type URL. 1701 }, 1702 "name": "A String", # [Output Only] Name of the operation. 1703 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1704 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1705 "progress": 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 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1707 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1708 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1709 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1710 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1711 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1712 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1713 "targetLink": "A String", # [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 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1715 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1716 { 1717 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1719 { 1720 "key": "A String", # [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 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1722 }, 1723 ], 1724 "message": "A String", # [Output Only] A human-readable description of the warning code. 1725 }, 1726 ], 1727 "zone": "A String", # [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>