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, requestId=None, replaceExistingAssociation=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, requestId=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="#copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None)</a></code></p> 85<p class="firstline">Copies rules to the specified security policy.</p> 86<p class="toc_element"> 87 <code><a href="#delete">delete(securityPolicy, requestId=None)</a></code></p> 88<p class="firstline">Deletes the specified policy.</p> 89<p class="toc_element"> 90 <code><a href="#get">get(securityPolicy)</a></code></p> 91<p class="firstline">List all of the ordered rules present in a single specified policy.</p> 92<p class="toc_element"> 93 <code><a href="#getAssociation">getAssociation(securityPolicy, name=None)</a></code></p> 94<p class="firstline">Gets an association with the specified name.</p> 95<p class="toc_element"> 96 <code><a href="#getRule">getRule(securityPolicy, priority=None)</a></code></p> 97<p class="firstline">Gets a rule at the specified priority.</p> 98<p class="toc_element"> 99 <code><a href="#insert">insert(body, requestId=None, parentId=None)</a></code></p> 100<p class="firstline">Creates a new policy in the specified project using the data included in the request.</p> 101<p class="toc_element"> 102 <code><a href="#list">list(orderBy=None, filter=None, pageToken=None, maxResults=None, parentId=None)</a></code></p> 103<p class="firstline">List all the policies that have been configured for the specified project.</p> 104<p class="toc_element"> 105 <code><a href="#listAssociations">listAssociations(targetResource=None)</a></code></p> 106<p class="firstline">Lists associations of a specified target, i.e., organization or folder.</p> 107<p class="toc_element"> 108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 109<p class="firstline">Retrieves the next page of results.</p> 110<p class="toc_element"> 111 <code><a href="#move">move(securityPolicy, requestId=None, parentId=None)</a></code></p> 112<p class="firstline">Moves the specified security policy.</p> 113<p class="toc_element"> 114 <code><a href="#patch">patch(securityPolicy, body, requestId=None)</a></code></p> 115<p class="firstline">Patches the specified policy with the data included in the request.</p> 116<p class="toc_element"> 117 <code><a href="#patchRule">patchRule(securityPolicy, body, priority=None, requestId=None)</a></code></p> 118<p class="firstline">Patches a rule at the specified priority.</p> 119<p class="toc_element"> 120 <code><a href="#removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None)</a></code></p> 121<p class="firstline">Removes an association for the specified security policy.</p> 122<p class="toc_element"> 123 <code><a href="#removeRule">removeRule(securityPolicy, priority=None, requestId=None)</a></code></p> 124<p class="firstline">Deletes a rule at the specified priority.</p> 125<h3>Method Details</h3> 126<div class="method"> 127 <code class="details" id="addAssociation">addAssociation(securityPolicy, body, requestId=None, replaceExistingAssociation=None)</code> 128 <pre>Inserts an association for the specified security policy. 129 130Args: 131 securityPolicy: string, Name of the security policy to update. (required) 132 body: object, The request body. (required) 133 The object takes the form of: 134 135{ 136 "attachmentId": "A String", # The resource that the security policy is attached to. 137 "name": "A String", # The name for an association. 138 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 139} 140 141 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. 142 143For 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. 144 145The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 146 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 assocation already exists. 147 148Returns: 149 An object of the form: 150 151 { # Represents an Operation resource. 152 # 153 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 154 # 155 # Operations can be global, regional or zonal. 156 # - For global operations, use the globalOperations resource. 157 # - For regional operations, use the regionOperations resource. 158 # - For zonal operations, use the zonalOperations resource. 159 # 160 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 161 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 162 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 163 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 164 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 165 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 166 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 167 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 168 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 169 "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. 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 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 172 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 173 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 174 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 175 { 176 "message": "A String", # [Output Only] A human-readable description of the warning code. 177 "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. 178 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 179 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 180 { 181 "value": "A String", # [Output Only] A warning data value corresponding to the key. 182 "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). 183 }, 184 ], 185 }, 186 ], 187 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 188 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 189 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 190 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 191 "name": "A String", # [Output Only] Name of the resource. 192 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 193 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 194 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 195 { 196 "message": "A String", # [Output Only] An optional, human-readable error message. 197 "code": "A String", # [Output Only] The error type identifier for this error. 198 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 199 }, 200 ], 201 }, 202 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 203 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 204 "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. 205 }</pre> 206</div> 207 208<div class="method"> 209 <code class="details" id="addRule">addRule(securityPolicy, body, requestId=None)</code> 210 <pre>Inserts a rule into a security policy. 211 212Args: 213 securityPolicy: string, Name of the security policy to update. (required) 214 body: object, The request body. (required) 215 The object takes the form of: 216 217{ # 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). 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 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 220 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 221 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 222 "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. 223 # 224 # This field may only be specified when the versioned_expr is set to FIREWALL. 225 "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 prority. 226 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions. 227 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule. 228 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting. 229 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload". 230 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. 231 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502. 232 }, 233 "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. 234 # 235 # This field may only be specified when versioned_expr is set to FIREWALL. 236 "A String", 237 ], 238 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 239 "preview": True or False, # If set to true, the specified action is not enforced. 240 "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. 241 "expr": { # Represents an expression text. Example: # 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. 242 # 243 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 244 "title": "A String", # An 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. 245 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 246 # 247 # The application context of the containing message determines which well-known feature set of CEL is supported. 248 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 249 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 250 }, 251 "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. 252 "srcIpRanges": [ # CIDR IP address range. 253 "A String", 254 ], 255 "destIpRanges": [ # CIDR IP address range. 256 # 257 # This field may only be specified when versioned_expr is set to FIREWALL. 258 "A String", 259 ], 260 "destPorts": [ # Pairs of IP protocols and ports that the rule should match. 261 # 262 # This field may only be specified when versioned_expr is set to FIREWALL. 263 { 264 "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. 265 "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. 266 # 267 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 268 # 269 # This field may only be specified when versioned_expr is set to FIREWALL. 270 "A String", 271 ], 272 }, 273 ], 274 }, 275 "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. 276 }, 277} 278 279 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. 280 281For 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. 282 283The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 284 285Returns: 286 An object of the form: 287 288 { # Represents an Operation resource. 289 # 290 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 291 # 292 # Operations can be global, regional or zonal. 293 # - For global operations, use the globalOperations resource. 294 # - For regional operations, use the regionOperations resource. 295 # - For zonal operations, use the zonalOperations resource. 296 # 297 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 298 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 299 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 300 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 301 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 302 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 303 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 304 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 305 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 306 "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. 307 "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. 308 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 309 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 310 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 311 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 312 { 313 "message": "A String", # [Output Only] A human-readable description of the warning code. 314 "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. 315 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 316 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 317 { 318 "value": "A String", # [Output Only] A warning data value corresponding to the key. 319 "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). 320 }, 321 ], 322 }, 323 ], 324 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 325 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 326 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 327 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 328 "name": "A String", # [Output Only] Name of the resource. 329 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 330 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 331 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 332 { 333 "message": "A String", # [Output Only] An optional, human-readable error message. 334 "code": "A String", # [Output Only] The error type identifier for this error. 335 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 336 }, 337 ], 338 }, 339 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 340 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 341 "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. 342 }</pre> 343</div> 344 345<div class="method"> 346 <code class="details" id="copyRules">copyRules(securityPolicy, requestId=None, sourceSecurityPolicy=None)</code> 347 <pre>Copies rules to the specified security policy. 348 349Args: 350 securityPolicy: string, Name of the security policy to update. (required) 351 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. 352 353For 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. 354 355The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 356 sourceSecurityPolicy: string, The security policy from which to copy rules. 357 358Returns: 359 An object of the form: 360 361 { # Represents an Operation resource. 362 # 363 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 364 # 365 # Operations can be global, regional or zonal. 366 # - For global operations, use the globalOperations resource. 367 # - For regional operations, use the regionOperations resource. 368 # - For zonal operations, use the zonalOperations resource. 369 # 370 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 371 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 372 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 373 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 374 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 375 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 376 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 377 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 378 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 379 "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. 380 "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. 381 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 382 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 383 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 384 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 385 { 386 "message": "A String", # [Output Only] A human-readable description of the warning code. 387 "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. 388 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 389 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 390 { 391 "value": "A String", # [Output Only] A warning data value corresponding to the key. 392 "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). 393 }, 394 ], 395 }, 396 ], 397 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 398 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 399 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 400 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 401 "name": "A String", # [Output Only] Name of the resource. 402 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 403 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 404 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 405 { 406 "message": "A String", # [Output Only] An optional, human-readable error message. 407 "code": "A String", # [Output Only] The error type identifier for this error. 408 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 409 }, 410 ], 411 }, 412 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 413 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 414 "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. 415 }</pre> 416</div> 417 418<div class="method"> 419 <code class="details" id="delete">delete(securityPolicy, requestId=None)</code> 420 <pre>Deletes the specified policy. 421 422Args: 423 securityPolicy: string, Name of the security policy to delete. (required) 424 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. 425 426For 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. 427 428The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 429 430Returns: 431 An object of the form: 432 433 { # Represents an Operation resource. 434 # 435 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 436 # 437 # Operations can be global, regional or zonal. 438 # - For global operations, use the globalOperations resource. 439 # - For regional operations, use the regionOperations resource. 440 # - For zonal operations, use the zonalOperations resource. 441 # 442 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 443 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 444 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 445 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 446 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 447 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 448 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 449 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 450 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 451 "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. 452 "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. 453 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 454 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 455 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 456 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 457 { 458 "message": "A String", # [Output Only] A human-readable description of the warning code. 459 "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. 460 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 461 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 462 { 463 "value": "A String", # [Output Only] A warning data value corresponding to the key. 464 "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). 465 }, 466 ], 467 }, 468 ], 469 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 470 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 471 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 472 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 473 "name": "A String", # [Output Only] Name of the resource. 474 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 475 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 476 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 477 { 478 "message": "A String", # [Output Only] An optional, human-readable error message. 479 "code": "A String", # [Output Only] The error type identifier for this error. 480 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 481 }, 482 ], 483 }, 484 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 485 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 486 "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. 487 }</pre> 488</div> 489 490<div class="method"> 491 <code class="details" id="get">get(securityPolicy)</code> 492 <pre>List all of the ordered rules present in a single specified policy. 493 494Args: 495 securityPolicy: string, Name of the security policy to get. (required) 496 497Returns: 498 An object of the form: 499 500 { # A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==) 501 "associations": [ # A list of assocations that belong to this policy. 502 { 503 "attachmentId": "A String", # The resource that the security policy is attached to. 504 "name": "A String", # The name for an association. 505 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 506 }, 507 ], 508 "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies 509 "ruleTupleCount": 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. 510 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 511 "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. 512 { # 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). 513 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 514 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 515 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 516 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 517 "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. 518 # 519 # This field may only be specified when the versioned_expr is set to FIREWALL. 520 "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 prority. 521 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions. 522 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule. 523 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting. 524 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload". 525 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. 526 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502. 527 }, 528 "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. 529 # 530 # This field may only be specified when versioned_expr is set to FIREWALL. 531 "A String", 532 ], 533 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 534 "preview": True or False, # If set to true, the specified action is not enforced. 535 "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. 536 "expr": { # Represents an expression text. Example: # 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. 537 # 538 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 539 "title": "A String", # An 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. 540 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 541 # 542 # The application context of the containing message determines which well-known feature set of CEL is supported. 543 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 544 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 545 }, 546 "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. 547 "srcIpRanges": [ # CIDR IP address range. 548 "A String", 549 ], 550 "destIpRanges": [ # CIDR IP address range. 551 # 552 # This field may only be specified when versioned_expr is set to FIREWALL. 553 "A String", 554 ], 555 "destPorts": [ # Pairs of IP protocols and ports that the rule should match. 556 # 557 # This field may only be specified when versioned_expr is set to FIREWALL. 558 { 559 "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. 560 "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. 561 # 562 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 563 # 564 # This field may only be specified when versioned_expr is set to FIREWALL. 565 "A String", 566 ], 567 }, 568 ], 569 }, 570 "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. 571 }, 572 }, 573 ], 574 "type": "A String", # The type indicates the intended use of the security policy. CLOUD_ARMOR policies apply to backend services. FIREWALL policies apply to organizations. 575 "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. 576 # 577 # To see the latest fingerprint, make get() request to the security policy. 578 "labels": { # Labels to apply to this security policy resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty. 579 "a_key": "A String", 580 }, 581 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 582 "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. 583 # 584 # To see the latest fingerprint, make get() request to the security policy. 585 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 586 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 587 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 588 "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. 589 }</pre> 590</div> 591 592<div class="method"> 593 <code class="details" id="getAssociation">getAssociation(securityPolicy, name=None)</code> 594 <pre>Gets an association with the specified name. 595 596Args: 597 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required) 598 name: string, The name of the association to get from the security policy. 599 600Returns: 601 An object of the form: 602 603 { 604 "attachmentId": "A String", # The resource that the security policy is attached to. 605 "name": "A String", # The name for an association. 606 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 607 }</pre> 608</div> 609 610<div class="method"> 611 <code class="details" id="getRule">getRule(securityPolicy, priority=None)</code> 612 <pre>Gets a rule at the specified priority. 613 614Args: 615 securityPolicy: string, Name of the security policy to which the queried rule belongs. (required) 616 priority: integer, The priority of the rule to get from the security policy. 617 618Returns: 619 An object of the form: 620 621 { # 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). 622 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 623 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 624 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 625 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 626 "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. 627 # 628 # This field may only be specified when the versioned_expr is set to FIREWALL. 629 "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 prority. 630 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions. 631 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule. 632 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting. 633 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload". 634 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. 635 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502. 636 }, 637 "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. 638 # 639 # This field may only be specified when versioned_expr is set to FIREWALL. 640 "A String", 641 ], 642 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 643 "preview": True or False, # If set to true, the specified action is not enforced. 644 "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. 645 "expr": { # Represents an expression text. Example: # 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. 646 # 647 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 648 "title": "A String", # An 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. 649 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 650 # 651 # The application context of the containing message determines which well-known feature set of CEL is supported. 652 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 653 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 654 }, 655 "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. 656 "srcIpRanges": [ # CIDR IP address range. 657 "A String", 658 ], 659 "destIpRanges": [ # CIDR IP address range. 660 # 661 # This field may only be specified when versioned_expr is set to FIREWALL. 662 "A String", 663 ], 664 "destPorts": [ # Pairs of IP protocols and ports that the rule should match. 665 # 666 # This field may only be specified when versioned_expr is set to FIREWALL. 667 { 668 "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. 669 "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. 670 # 671 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 672 # 673 # This field may only be specified when versioned_expr is set to FIREWALL. 674 "A String", 675 ], 676 }, 677 ], 678 }, 679 "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. 680 }, 681 }</pre> 682</div> 683 684<div class="method"> 685 <code class="details" id="insert">insert(body, requestId=None, parentId=None)</code> 686 <pre>Creates a new policy in the specified project using the data included in the request. 687 688Args: 689 body: object, The request body. (required) 690 The object takes the form of: 691 692{ # A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==) 693 "associations": [ # A list of assocations that belong to this policy. 694 { 695 "attachmentId": "A String", # The resource that the security policy is attached to. 696 "name": "A String", # The name for an association. 697 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 698 }, 699 ], 700 "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies 701 "ruleTupleCount": 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. 702 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 703 "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. 704 { # 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). 705 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 706 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 707 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 708 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 709 "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. 710 # 711 # This field may only be specified when the versioned_expr is set to FIREWALL. 712 "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 prority. 713 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions. 714 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule. 715 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting. 716 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload". 717 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. 718 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502. 719 }, 720 "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. 721 # 722 # This field may only be specified when versioned_expr is set to FIREWALL. 723 "A String", 724 ], 725 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 726 "preview": True or False, # If set to true, the specified action is not enforced. 727 "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. 728 "expr": { # Represents an expression text. Example: # 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. 729 # 730 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 731 "title": "A String", # An 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. 732 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 733 # 734 # The application context of the containing message determines which well-known feature set of CEL is supported. 735 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 736 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 737 }, 738 "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. 739 "srcIpRanges": [ # CIDR IP address range. 740 "A String", 741 ], 742 "destIpRanges": [ # CIDR IP address range. 743 # 744 # This field may only be specified when versioned_expr is set to FIREWALL. 745 "A String", 746 ], 747 "destPorts": [ # Pairs of IP protocols and ports that the rule should match. 748 # 749 # This field may only be specified when versioned_expr is set to FIREWALL. 750 { 751 "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. 752 "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. 753 # 754 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 755 # 756 # This field may only be specified when versioned_expr is set to FIREWALL. 757 "A String", 758 ], 759 }, 760 ], 761 }, 762 "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. 763 }, 764 }, 765 ], 766 "type": "A String", # The type indicates the intended use of the security policy. CLOUD_ARMOR policies apply to backend services. FIREWALL policies apply to organizations. 767 "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. 768 # 769 # To see the latest fingerprint, make get() request to the security policy. 770 "labels": { # Labels to apply to this security policy resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty. 771 "a_key": "A String", 772 }, 773 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 774 "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. 775 # 776 # To see the latest fingerprint, make get() request to the security policy. 777 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 778 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 779 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 780 "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. 781} 782 783 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. 784 785For 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. 786 787The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 788 parentId: string, Parent ID for this request. 789 790Returns: 791 An object of the form: 792 793 { # Represents an Operation resource. 794 # 795 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 796 # 797 # Operations can be global, regional or zonal. 798 # - For global operations, use the globalOperations resource. 799 # - For regional operations, use the regionOperations resource. 800 # - For zonal operations, use the zonalOperations resource. 801 # 802 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 803 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 804 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 805 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 806 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 807 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 808 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 809 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 810 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 811 "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. 812 "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. 813 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 814 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 815 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 816 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 817 { 818 "message": "A String", # [Output Only] A human-readable description of the warning code. 819 "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. 820 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 821 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 822 { 823 "value": "A String", # [Output Only] A warning data value corresponding to the key. 824 "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). 825 }, 826 ], 827 }, 828 ], 829 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 830 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 831 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 832 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 833 "name": "A String", # [Output Only] Name of the resource. 834 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 835 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 836 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 837 { 838 "message": "A String", # [Output Only] An optional, human-readable error message. 839 "code": "A String", # [Output Only] The error type identifier for this error. 840 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 841 }, 842 ], 843 }, 844 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 845 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 846 "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. 847 }</pre> 848</div> 849 850<div class="method"> 851 <code class="details" id="list">list(orderBy=None, filter=None, pageToken=None, maxResults=None, parentId=None)</code> 852 <pre>List all the policies that have been configured for the specified project. 853 854Args: 855 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 856 857You 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. 858 859Currently, only sorting by name or creationTimestamp desc is supported. 860 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. 861 862For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 863 864You 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. 865 866To 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). 867 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. 868 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) 869 parentId: string, Parent ID for this request. 870 871Returns: 872 An object of the form: 873 874 { 875 "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. 876 "items": [ # A list of SecurityPolicy resources. 877 { # A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==) 878 "associations": [ # A list of assocations that belong to this policy. 879 { 880 "attachmentId": "A String", # The resource that the security policy is attached to. 881 "name": "A String", # The name for an association. 882 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 883 }, 884 ], 885 "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies 886 "ruleTupleCount": 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. 887 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 888 "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. 889 { # 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). 890 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 891 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 892 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 893 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 894 "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. 895 # 896 # This field may only be specified when the versioned_expr is set to FIREWALL. 897 "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 prority. 898 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions. 899 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule. 900 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting. 901 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload". 902 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. 903 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502. 904 }, 905 "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. 906 # 907 # This field may only be specified when versioned_expr is set to FIREWALL. 908 "A String", 909 ], 910 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 911 "preview": True or False, # If set to true, the specified action is not enforced. 912 "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. 913 "expr": { # Represents an expression text. Example: # 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. 914 # 915 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 916 "title": "A String", # An 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. 917 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 918 # 919 # The application context of the containing message determines which well-known feature set of CEL is supported. 920 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 921 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 922 }, 923 "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. 924 "srcIpRanges": [ # CIDR IP address range. 925 "A String", 926 ], 927 "destIpRanges": [ # CIDR IP address range. 928 # 929 # This field may only be specified when versioned_expr is set to FIREWALL. 930 "A String", 931 ], 932 "destPorts": [ # Pairs of IP protocols and ports that the rule should match. 933 # 934 # This field may only be specified when versioned_expr is set to FIREWALL. 935 { 936 "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. 937 "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. 938 # 939 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 940 # 941 # This field may only be specified when versioned_expr is set to FIREWALL. 942 "A String", 943 ], 944 }, 945 ], 946 }, 947 "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. 948 }, 949 }, 950 ], 951 "type": "A String", # The type indicates the intended use of the security policy. CLOUD_ARMOR policies apply to backend services. FIREWALL policies apply to organizations. 952 "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. 953 # 954 # To see the latest fingerprint, make get() request to the security policy. 955 "labels": { # Labels to apply to this security policy resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty. 956 "a_key": "A String", 957 }, 958 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 959 "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. 960 # 961 # To see the latest fingerprint, make get() request to the security policy. 962 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 963 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 964 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 965 "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. 966 }, 967 ], 968 "kind": "compute#securityPolicyList", # [Output Only] Type of resource. Always compute#securityPolicyList for listsof securityPolicies 969 "warning": { # [Output Only] Informational warning message. 970 "message": "A String", # [Output Only] A human-readable description of the warning code. 971 "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. 972 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 973 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 974 { 975 "value": "A String", # [Output Only] A warning data value corresponding to the key. 976 "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). 977 }, 978 ], 979 }, 980 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 981 }</pre> 982</div> 983 984<div class="method"> 985 <code class="details" id="listAssociations">listAssociations(targetResource=None)</code> 986 <pre>Lists associations of a specified target, i.e., organization or folder. 987 988Args: 989 targetResource: string, The target resource to list associations. It is an organization, or a folder. 990 991Returns: 992 An object of the form: 993 994 { 995 "associations": [ # A list of associations. 996 { 997 "attachmentId": "A String", # The resource that the security policy is attached to. 998 "name": "A String", # The name for an association. 999 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 1000 }, 1001 ], 1002 "kind": "compute#organizationSecurityPoliciesListAssociationsResponse", # [Output Only] Type of securityPolicy associations. Always compute#organizationSecurityPoliciesListAssociations for lists of securityPolicy associations. 1003 }</pre> 1004</div> 1005 1006<div class="method"> 1007 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1008 <pre>Retrieves the next page of results. 1009 1010Args: 1011 previous_request: The request for the previous page. (required) 1012 previous_response: The response from the request for the previous page. (required) 1013 1014Returns: 1015 A request object that you can call 'execute()' on to request the next 1016 page. Returns None if there are no more items in the collection. 1017 </pre> 1018</div> 1019 1020<div class="method"> 1021 <code class="details" id="move">move(securityPolicy, requestId=None, parentId=None)</code> 1022 <pre>Moves the specified security policy. 1023 1024Args: 1025 securityPolicy: string, Name of the security policy to update. (required) 1026 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. 1027 1028For 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. 1029 1030The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1031 parentId: string, The new parent of the security policy. 1032 1033Returns: 1034 An object of the form: 1035 1036 { # Represents an Operation resource. 1037 # 1038 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1039 # 1040 # Operations can be global, regional or zonal. 1041 # - For global operations, use the globalOperations resource. 1042 # - For regional operations, use the regionOperations resource. 1043 # - For zonal operations, use the zonalOperations resource. 1044 # 1045 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1046 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1047 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1048 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1049 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1050 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1051 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1052 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1053 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1054 "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. 1055 "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. 1056 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1057 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1058 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1059 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1060 { 1061 "message": "A String", # [Output Only] A human-readable description of the warning code. 1062 "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. 1063 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1064 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1065 { 1066 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1067 "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). 1068 }, 1069 ], 1070 }, 1071 ], 1072 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1073 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1074 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1075 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1076 "name": "A String", # [Output Only] Name of the resource. 1077 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1078 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1079 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1080 { 1081 "message": "A String", # [Output Only] An optional, human-readable error message. 1082 "code": "A String", # [Output Only] The error type identifier for this error. 1083 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1084 }, 1085 ], 1086 }, 1087 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1088 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1089 "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. 1090 }</pre> 1091</div> 1092 1093<div class="method"> 1094 <code class="details" id="patch">patch(securityPolicy, body, requestId=None)</code> 1095 <pre>Patches the specified policy with the data included in the request. 1096 1097Args: 1098 securityPolicy: string, Name of the security policy to update. (required) 1099 body: object, The request body. (required) 1100 The object takes the form of: 1101 1102{ # A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==) 1103 "associations": [ # A list of assocations that belong to this policy. 1104 { 1105 "attachmentId": "A String", # The resource that the security policy is attached to. 1106 "name": "A String", # The name for an association. 1107 "securityPolicyId": "A String", # [Output Only] The security policy ID of the association. 1108 }, 1109 ], 1110 "kind": "compute#securityPolicy", # [Output only] Type of the resource. Always compute#securityPolicyfor security policies 1111 "ruleTupleCount": 42, # [Output Only] Total count of all security policy rule tuples. A security policy can not exceed a set number of tuples. 1112 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1113 "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. 1114 { # 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). 1115 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 1116 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 1117 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1118 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 1119 "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. 1120 # 1121 # This field may only be specified when the versioned_expr is set to FIREWALL. 1122 "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 prority. 1123 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions. 1124 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule. 1125 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting. 1126 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload". 1127 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. 1128 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502. 1129 }, 1130 "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. 1131 # 1132 # This field may only be specified when versioned_expr is set to FIREWALL. 1133 "A String", 1134 ], 1135 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 1136 "preview": True or False, # If set to true, the specified action is not enforced. 1137 "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. 1138 "expr": { # Represents an expression text. Example: # 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. 1139 # 1140 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 1141 "title": "A String", # An 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. 1142 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1143 # 1144 # The application context of the containing message determines which well-known feature set of CEL is supported. 1145 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1146 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1147 }, 1148 "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. 1149 "srcIpRanges": [ # CIDR IP address range. 1150 "A String", 1151 ], 1152 "destIpRanges": [ # CIDR IP address range. 1153 # 1154 # This field may only be specified when versioned_expr is set to FIREWALL. 1155 "A String", 1156 ], 1157 "destPorts": [ # Pairs of IP protocols and ports that the rule should match. 1158 # 1159 # This field may only be specified when versioned_expr is set to FIREWALL. 1160 { 1161 "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. 1162 "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. 1163 # 1164 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 1165 # 1166 # This field may only be specified when versioned_expr is set to FIREWALL. 1167 "A String", 1168 ], 1169 }, 1170 ], 1171 }, 1172 "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. 1173 }, 1174 }, 1175 ], 1176 "type": "A String", # The type indicates the intended use of the security policy. CLOUD_ARMOR policies apply to backend services. FIREWALL policies apply to organizations. 1177 "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. 1178 # 1179 # To see the latest fingerprint, make get() request to the security policy. 1180 "labels": { # Labels to apply to this security policy resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty. 1181 "a_key": "A String", 1182 }, 1183 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1184 "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. 1185 # 1186 # To see the latest fingerprint, make get() request to the security policy. 1187 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 1188 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1189 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1190 "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. 1191} 1192 1193 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. 1194 1195For 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. 1196 1197The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1198 1199Returns: 1200 An object of the form: 1201 1202 { # Represents an Operation resource. 1203 # 1204 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1205 # 1206 # Operations can be global, regional or zonal. 1207 # - For global operations, use the globalOperations resource. 1208 # - For regional operations, use the regionOperations resource. 1209 # - For zonal operations, use the zonalOperations resource. 1210 # 1211 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1212 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1213 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1214 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1215 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1216 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1217 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1218 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1219 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1220 "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. 1221 "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. 1222 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1223 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1224 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1225 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1226 { 1227 "message": "A String", # [Output Only] A human-readable description of the warning code. 1228 "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. 1229 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1230 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1231 { 1232 "value": "A String", # [Output Only] A warning data value corresponding to the key. 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 }, 1235 ], 1236 }, 1237 ], 1238 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1239 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1240 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1241 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1242 "name": "A String", # [Output Only] Name of the resource. 1243 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1244 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1245 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1246 { 1247 "message": "A String", # [Output Only] An optional, human-readable error message. 1248 "code": "A String", # [Output Only] The error type identifier for this error. 1249 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1250 }, 1251 ], 1252 }, 1253 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1254 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1255 "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. 1256 }</pre> 1257</div> 1258 1259<div class="method"> 1260 <code class="details" id="patchRule">patchRule(securityPolicy, body, priority=None, requestId=None)</code> 1261 <pre>Patches a rule at the specified priority. 1262 1263Args: 1264 securityPolicy: string, Name of the security policy to update. (required) 1265 body: object, The request body. (required) 1266 The object takes the form of: 1267 1268{ # 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). 1269 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL. 1270 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule. 1271 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1272 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 1273 "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. 1274 # 1275 # This field may only be specified when the versioned_expr is set to FIREWALL. 1276 "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 prority. 1277 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions. 1278 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule. 1279 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting. 1280 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload". 1281 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. 1282 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502. 1283 }, 1284 "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. 1285 # 1286 # This field may only be specified when versioned_expr is set to FIREWALL. 1287 "A String", 1288 ], 1289 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 1290 "preview": True or False, # If set to true, the specified action is not enforced. 1291 "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. 1292 "expr": { # Represents an expression text. Example: # 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. 1293 # 1294 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" 1295 "title": "A String", # An 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. 1296 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1297 # 1298 # The application context of the containing message determines which well-known feature set of CEL is supported. 1299 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1300 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1301 }, 1302 "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. 1303 "srcIpRanges": [ # CIDR IP address range. 1304 "A String", 1305 ], 1306 "destIpRanges": [ # CIDR IP address range. 1307 # 1308 # This field may only be specified when versioned_expr is set to FIREWALL. 1309 "A String", 1310 ], 1311 "destPorts": [ # Pairs of IP protocols and ports that the rule should match. 1312 # 1313 # This field may only be specified when versioned_expr is set to FIREWALL. 1314 { 1315 "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. 1316 "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. 1317 # 1318 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 1319 # 1320 # This field may only be specified when versioned_expr is set to FIREWALL. 1321 "A String", 1322 ], 1323 }, 1324 ], 1325 }, 1326 "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. 1327 }, 1328} 1329 1330 priority: integer, The priority of the rule to patch. 1331 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. 1332 1333For 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. 1334 1335The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1336 1337Returns: 1338 An object of the form: 1339 1340 { # Represents an Operation resource. 1341 # 1342 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1343 # 1344 # Operations can be global, regional or zonal. 1345 # - For global operations, use the globalOperations resource. 1346 # - For regional operations, use the regionOperations resource. 1347 # - For zonal operations, use the zonalOperations resource. 1348 # 1349 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1350 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1351 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1352 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1353 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1354 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1355 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1356 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1357 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1358 "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. 1359 "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. 1360 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1361 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1362 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1363 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1364 { 1365 "message": "A String", # [Output Only] A human-readable description of the warning code. 1366 "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. 1367 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1368 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1369 { 1370 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1371 "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). 1372 }, 1373 ], 1374 }, 1375 ], 1376 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1377 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1378 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1379 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1380 "name": "A String", # [Output Only] Name of the resource. 1381 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1382 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1383 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1384 { 1385 "message": "A String", # [Output Only] An optional, human-readable error message. 1386 "code": "A String", # [Output Only] The error type identifier for this error. 1387 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1388 }, 1389 ], 1390 }, 1391 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1392 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1393 "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. 1394 }</pre> 1395</div> 1396 1397<div class="method"> 1398 <code class="details" id="removeAssociation">removeAssociation(securityPolicy, name=None, requestId=None)</code> 1399 <pre>Removes an association for the specified security policy. 1400 1401Args: 1402 securityPolicy: string, Name of the security policy to update. (required) 1403 name: string, Name for the attachment that will be removed. 1404 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. 1405 1406For 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. 1407 1408The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1409 1410Returns: 1411 An object of the form: 1412 1413 { # Represents an Operation resource. 1414 # 1415 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1416 # 1417 # Operations can be global, regional or zonal. 1418 # - For global operations, use the globalOperations resource. 1419 # - For regional operations, use the regionOperations resource. 1420 # - For zonal operations, use the zonalOperations resource. 1421 # 1422 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1423 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1424 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1425 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1426 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1427 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1428 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1429 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1430 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1431 "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. 1432 "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. 1433 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1434 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1435 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1436 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1437 { 1438 "message": "A String", # [Output Only] A human-readable description of the warning code. 1439 "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. 1440 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1441 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1442 { 1443 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1444 "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). 1445 }, 1446 ], 1447 }, 1448 ], 1449 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1450 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1451 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1452 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1453 "name": "A String", # [Output Only] Name of the resource. 1454 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1455 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1456 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1457 { 1458 "message": "A String", # [Output Only] An optional, human-readable error message. 1459 "code": "A String", # [Output Only] The error type identifier for this error. 1460 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1461 }, 1462 ], 1463 }, 1464 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1465 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1466 "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. 1467 }</pre> 1468</div> 1469 1470<div class="method"> 1471 <code class="details" id="removeRule">removeRule(securityPolicy, priority=None, requestId=None)</code> 1472 <pre>Deletes a rule at the specified priority. 1473 1474Args: 1475 securityPolicy: string, Name of the security policy to update. (required) 1476 priority: integer, The priority of the rule to remove from the security policy. 1477 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 1478 1479For 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. 1480 1481The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 1482 1483Returns: 1484 An object of the form: 1485 1486 { # Represents an Operation resource. 1487 # 1488 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 1489 # 1490 # Operations can be global, regional or zonal. 1491 # - For global operations, use the globalOperations resource. 1492 # - For regional operations, use the regionOperations resource. 1493 # - For zonal operations, use the zonalOperations resource. 1494 # 1495 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 1496 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1497 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1498 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1499 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1500 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1501 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1502 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 1503 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 1504 "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. 1505 "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. 1506 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1507 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 1508 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1509 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1510 { 1511 "message": "A String", # [Output Only] A human-readable description of the warning code. 1512 "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. 1513 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 1514 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1515 { 1516 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1517 "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). 1518 }, 1519 ], 1520 }, 1521 ], 1522 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1523 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 1524 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1525 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 1526 "name": "A String", # [Output Only] Name of the resource. 1527 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1528 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1529 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1530 { 1531 "message": "A String", # [Output Only] An optional, human-readable error message. 1532 "code": "A String", # [Output Only] The error type identifier for this error. 1533 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1534 }, 1535 ], 1536 }, 1537 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1538 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1539 "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. 1540 }</pre> 1541</div> 1542 1543</body></html>