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_v1.html">Compute Engine API</a> . <a href="compute_v1.firewallPolicies.html">firewallPolicies</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#addAssociation">addAssociation(firewallPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</a></code></p> 79<p class="firstline">Inserts an association for the specified firewall policy.</p> 80<p class="toc_element"> 81 <code><a href="#addRule">addRule(firewallPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Inserts a rule into a firewall policy.</p> 83<p class="toc_element"> 84 <code><a href="#cloneRules">cloneRules(firewallPolicy, requestId=None, sourceFirewallPolicy=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Copies rules to the specified firewall policy.</p> 86<p class="toc_element"> 87 <code><a href="#close">close()</a></code></p> 88<p class="firstline">Close httplib2 connections.</p> 89<p class="toc_element"> 90 <code><a href="#delete">delete(firewallPolicy, requestId=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Deletes the specified policy.</p> 92<p class="toc_element"> 93 <code><a href="#get">get(firewallPolicy, x__xgafv=None)</a></code></p> 94<p class="firstline">Returns the specified firewall policy.</p> 95<p class="toc_element"> 96 <code><a href="#getAssociation">getAssociation(firewallPolicy, name=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Gets an association with the specified name.</p> 98<p class="toc_element"> 99 <code><a href="#getIamPolicy">getIamPolicy(resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</a></code></p> 100<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p> 101<p class="toc_element"> 102 <code><a href="#getRule">getRule(firewallPolicy, priority=None, x__xgafv=None)</a></code></p> 103<p class="firstline">Gets a rule of the specified priority.</p> 104<p class="toc_element"> 105 <code><a href="#insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</a></code></p> 106<p class="firstline">Creates a new policy in the specified project using the data included in the request.</p> 107<p class="toc_element"> 108 <code><a href="#list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> 109<p class="firstline">Lists all the policies that have been configured for the specified folder or organization.</p> 110<p class="toc_element"> 111 <code><a href="#listAssociations">listAssociations(targetResource=None, x__xgafv=None)</a></code></p> 112<p class="firstline">Lists associations of a specified target, i.e., organization or folder.</p> 113<p class="toc_element"> 114 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 115<p class="firstline">Retrieves the next page of results.</p> 116<p class="toc_element"> 117 <code><a href="#move">move(firewallPolicy, parentId=None, requestId=None, x__xgafv=None)</a></code></p> 118<p class="firstline">Moves the specified firewall policy.</p> 119<p class="toc_element"> 120 <code><a href="#patch">patch(firewallPolicy, body=None, requestId=None, x__xgafv=None)</a></code></p> 121<p class="firstline">Patches the specified policy with the data included in the request.</p> 122<p class="toc_element"> 123 <code><a href="#patchRule">patchRule(firewallPolicy, body=None, priority=None, requestId=None, x__xgafv=None)</a></code></p> 124<p class="firstline">Patches a rule of the specified priority.</p> 125<p class="toc_element"> 126 <code><a href="#removeAssociation">removeAssociation(firewallPolicy, name=None, requestId=None, x__xgafv=None)</a></code></p> 127<p class="firstline">Removes an association for the specified firewall policy.</p> 128<p class="toc_element"> 129 <code><a href="#removeRule">removeRule(firewallPolicy, priority=None, requestId=None, x__xgafv=None)</a></code></p> 130<p class="firstline">Deletes a rule of the specified priority.</p> 131<p class="toc_element"> 132 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> 133<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p> 134<p class="toc_element"> 135 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> 136<p class="firstline">Returns permissions that a caller has on the specified resource.</p> 137<h3>Method Details</h3> 138<div class="method"> 139 <code class="details" id="addAssociation">addAssociation(firewallPolicy, body=None, replaceExistingAssociation=None, requestId=None, x__xgafv=None)</code> 140 <pre>Inserts an association for the specified firewall policy. 141 142Args: 143 firewallPolicy: string, Name of the firewall policy to update. (required) 144 body: object, The request body. 145 The object takes the form of: 146 147{ 148 "attachmentTarget": "A String", # The target that the firewall policy is attached to. 149 "displayName": "A String", # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 150 "firewallPolicyId": "A String", # [Output Only] The firewall policy ID of the association. 151 "name": "A String", # The name for an association. 152 "shortName": "A String", # [Output Only] The short name of the firewall policy of the association. 153} 154 155 replaceExistingAssociation: boolean, Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists. 156 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 157 x__xgafv: string, V1 error format. 158 Allowed values 159 1 - v1 error format 160 2 - v2 error format 161 162Returns: 163 An object of the form: 164 165 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 166 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 167 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 168 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 169 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 170 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 171 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 172 { 173 "code": "A String", # [Output Only] The error type identifier for this error. 174 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 175 "message": "A String", # [Output Only] An optional, human-readable error message. 176 }, 177 ], 178 }, 179 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 180 "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. 181 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 182 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 183 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 184 "name": "A String", # [Output Only] Name of the operation. 185 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 186 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 187 "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. 188 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 189 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 190 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 191 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 192 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 193 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 194 "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. 195 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 196 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 197 { 198 "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. 199 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 200 { 201 "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). 202 "value": "A String", # [Output Only] A warning data value corresponding to the key. 203 }, 204 ], 205 "message": "A String", # [Output Only] A human-readable description of the warning code. 206 }, 207 ], 208 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 209}</pre> 210</div> 211 212<div class="method"> 213 <code class="details" id="addRule">addRule(firewallPolicy, body=None, requestId=None, x__xgafv=None)</code> 214 <pre>Inserts a rule into a firewall policy. 215 216Args: 217 firewallPolicy: string, Name of the firewall policy to update. (required) 218 body: object, The request body. 219 The object takes the form of: 220 221{ # 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). 222 "action": "A String", # The Action to perform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 223 "description": "A String", # An optional description for this resource. 224 "direction": "A String", # The direction in which this rule applies. 225 "disabled": True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. 226 "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. 227 "kind": "compute#firewallPolicyRule", # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules 228 "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. 229 "destIpRanges": [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. 230 "A String", 231 ], 232 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. 233 { 234 "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. 235 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 236 "A String", 237 ], 238 }, 239 ], 240 "srcIpRanges": [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. 241 "A String", 242 ], 243 }, 244 "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. 245 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall policy rule. 246 "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. 247 "A String", 248 ], 249 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 250 "A String", 251 ], 252} 253 254 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 255 x__xgafv: string, V1 error format. 256 Allowed values 257 1 - v1 error format 258 2 - v2 error format 259 260Returns: 261 An object of the form: 262 263 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 264 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 265 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 266 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 267 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 268 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 269 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 270 { 271 "code": "A String", # [Output Only] The error type identifier for this error. 272 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 273 "message": "A String", # [Output Only] An optional, human-readable error message. 274 }, 275 ], 276 }, 277 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 278 "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. 279 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 280 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 281 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 282 "name": "A String", # [Output Only] Name of the operation. 283 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 284 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 285 "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. 286 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 287 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 288 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 289 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 290 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 291 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 292 "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. 293 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 294 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 295 { 296 "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. 297 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 298 { 299 "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). 300 "value": "A String", # [Output Only] A warning data value corresponding to the key. 301 }, 302 ], 303 "message": "A String", # [Output Only] A human-readable description of the warning code. 304 }, 305 ], 306 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 307}</pre> 308</div> 309 310<div class="method"> 311 <code class="details" id="cloneRules">cloneRules(firewallPolicy, requestId=None, sourceFirewallPolicy=None, x__xgafv=None)</code> 312 <pre>Copies rules to the specified firewall policy. 313 314Args: 315 firewallPolicy: string, Name of the firewall policy to update. (required) 316 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 317 sourceFirewallPolicy: string, The firewall policy from which to copy rules. 318 x__xgafv: string, V1 error format. 319 Allowed values 320 1 - v1 error format 321 2 - v2 error format 322 323Returns: 324 An object of the form: 325 326 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 327 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 328 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 329 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 330 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 331 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 332 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 333 { 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 "message": "A String", # [Output Only] An optional, human-readable error message. 337 }, 338 ], 339 }, 340 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 341 "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. 342 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 343 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 344 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 345 "name": "A String", # [Output Only] Name of the operation. 346 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 347 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 348 "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. 349 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 350 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 351 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 352 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 353 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 354 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 355 "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. 356 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 357 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 358 { 359 "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. 360 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 361 { 362 "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). 363 "value": "A String", # [Output Only] A warning data value corresponding to the key. 364 }, 365 ], 366 "message": "A String", # [Output Only] A human-readable description of the warning code. 367 }, 368 ], 369 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 370}</pre> 371</div> 372 373<div class="method"> 374 <code class="details" id="close">close()</code> 375 <pre>Close httplib2 connections.</pre> 376</div> 377 378<div class="method"> 379 <code class="details" id="delete">delete(firewallPolicy, requestId=None, x__xgafv=None)</code> 380 <pre>Deletes the specified policy. 381 382Args: 383 firewallPolicy: string, Name of the firewall policy to delete. (required) 384 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 385 x__xgafv: string, V1 error format. 386 Allowed values 387 1 - v1 error format 388 2 - v2 error format 389 390Returns: 391 An object of the form: 392 393 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 394 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 395 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 396 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 397 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 398 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 399 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 400 { 401 "code": "A String", # [Output Only] The error type identifier for this error. 402 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 403 "message": "A String", # [Output Only] An optional, human-readable error message. 404 }, 405 ], 406 }, 407 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 408 "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. 409 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 410 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 411 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 412 "name": "A String", # [Output Only] Name of the operation. 413 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 414 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 415 "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. 416 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 417 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 418 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 419 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 420 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 421 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 422 "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. 423 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 424 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 425 { 426 "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. 427 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 428 { 429 "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). 430 "value": "A String", # [Output Only] A warning data value corresponding to the key. 431 }, 432 ], 433 "message": "A String", # [Output Only] A human-readable description of the warning code. 434 }, 435 ], 436 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 437}</pre> 438</div> 439 440<div class="method"> 441 <code class="details" id="get">get(firewallPolicy, x__xgafv=None)</code> 442 <pre>Returns the specified firewall policy. 443 444Args: 445 firewallPolicy: string, Name of the firewall policy to get. (required) 446 x__xgafv: string, V1 error format. 447 Allowed values 448 1 - v1 error format 449 2 - v2 error format 450 451Returns: 452 An object of the form: 453 454 { # Represents a Firewall Policy resource. 455 "associations": [ # A list of associations that belong to this firewall policy. 456 { 457 "attachmentTarget": "A String", # The target that the firewall policy is attached to. 458 "displayName": "A String", # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 459 "firewallPolicyId": "A String", # [Output Only] The firewall policy ID of the association. 460 "name": "A String", # The name for an association. 461 "shortName": "A String", # [Output Only] The short name of the firewall policy of the association. 462 }, 463 ], 464 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 465 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 466 "displayName": "A String", # Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. 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. 467 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 468 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 469 "kind": "compute#firewallPolicy", # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 470 "name": "A String", # [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy. 471 "parent": "A String", # [Output Only] The parent of the firewall policy. 472 "ruleTupleCount": 42, # [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 473 "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 firewall policy, a default rule with action "allow" will be added. 474 { # 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). 475 "action": "A String", # The Action to perform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 476 "description": "A String", # An optional description for this resource. 477 "direction": "A String", # The direction in which this rule applies. 478 "disabled": True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. 479 "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. 480 "kind": "compute#firewallPolicyRule", # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules 481 "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. 482 "destIpRanges": [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. 483 "A String", 484 ], 485 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. 486 { 487 "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. 488 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 489 "A String", 490 ], 491 }, 492 ], 493 "srcIpRanges": [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. 494 "A String", 495 ], 496 }, 497 "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. 498 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall policy rule. 499 "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. 500 "A String", 501 ], 502 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 503 "A String", 504 ], 505 }, 506 ], 507 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 508 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 509 "shortName": "A String", # User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. 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. 510}</pre> 511</div> 512 513<div class="method"> 514 <code class="details" id="getAssociation">getAssociation(firewallPolicy, name=None, x__xgafv=None)</code> 515 <pre>Gets an association with the specified name. 516 517Args: 518 firewallPolicy: string, Name of the firewall policy to which the queried rule belongs. (required) 519 name: string, The name of the association to get from the firewall policy. 520 x__xgafv: string, V1 error format. 521 Allowed values 522 1 - v1 error format 523 2 - v2 error format 524 525Returns: 526 An object of the form: 527 528 { 529 "attachmentTarget": "A String", # The target that the firewall policy is attached to. 530 "displayName": "A String", # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 531 "firewallPolicyId": "A String", # [Output Only] The firewall policy ID of the association. 532 "name": "A String", # The name for an association. 533 "shortName": "A String", # [Output Only] The short name of the firewall policy of the association. 534}</pre> 535</div> 536 537<div class="method"> 538 <code class="details" id="getIamPolicy">getIamPolicy(resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</code> 539 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists. 540 541Args: 542 resource: string, Name or id of the resource for this request. (required) 543 optionsRequestedPolicyVersion: integer, Requested IAM Policy version. 544 x__xgafv: string, V1 error format. 545 Allowed values 546 1 - v1 error format 547 2 - v2 error format 548 549Returns: 550 An object of the form: 551 552 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). 553 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 554 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 555 "auditLogConfigs": [ # The configuration for logging of each type of permission. 556 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 557 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 558 "A String", 559 ], 560 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 561 "logType": "A String", # The log type that this config enables. 562 }, 563 ], 564 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 565 "A String", 566 ], 567 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 568 }, 569 ], 570 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 571 { # Associates `members`, or principals, with a `role`. 572 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 573 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 574 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 575 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 576 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 577 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 578 }, 579 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 580 "A String", 581 ], 582 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 583 }, 584 ], 585 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 586 "rules": [ # This is deprecated and has no effect. Do not use. 587 { # This is deprecated and has no effect. Do not use. 588 "action": "A String", # This is deprecated and has no effect. Do not use. 589 "conditions": [ # This is deprecated and has no effect. Do not use. 590 { # This is deprecated and has no effect. Do not use. 591 "iam": "A String", # This is deprecated and has no effect. Do not use. 592 "op": "A String", # This is deprecated and has no effect. Do not use. 593 "svc": "A String", # This is deprecated and has no effect. Do not use. 594 "sys": "A String", # This is deprecated and has no effect. Do not use. 595 "values": [ # This is deprecated and has no effect. Do not use. 596 "A String", 597 ], 598 }, 599 ], 600 "description": "A String", # This is deprecated and has no effect. Do not use. 601 "ins": [ # This is deprecated and has no effect. Do not use. 602 "A String", 603 ], 604 "logConfigs": [ # This is deprecated and has no effect. Do not use. 605 { # This is deprecated and has no effect. Do not use. 606 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 607 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 608 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 609 }, 610 "logName": "A String", # This is deprecated and has no effect. Do not use. 611 }, 612 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 613 "customFields": [ # This is deprecated and has no effect. Do not use. 614 { # This is deprecated and has no effect. Do not use. 615 "name": "A String", # This is deprecated and has no effect. Do not use. 616 "value": "A String", # This is deprecated and has no effect. Do not use. 617 }, 618 ], 619 "field": "A String", # This is deprecated and has no effect. Do not use. 620 "metric": "A String", # This is deprecated and has no effect. Do not use. 621 }, 622 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 623 "logMode": "A String", # This is deprecated and has no effect. Do not use. 624 }, 625 }, 626 ], 627 "notIns": [ # This is deprecated and has no effect. Do not use. 628 "A String", 629 ], 630 "permissions": [ # This is deprecated and has no effect. Do not use. 631 "A String", 632 ], 633 }, 634 ], 635 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 636}</pre> 637</div> 638 639<div class="method"> 640 <code class="details" id="getRule">getRule(firewallPolicy, priority=None, x__xgafv=None)</code> 641 <pre>Gets a rule of the specified priority. 642 643Args: 644 firewallPolicy: string, Name of the firewall policy to which the queried rule belongs. (required) 645 priority: integer, The priority of the rule to get from the firewall policy. 646 x__xgafv: string, V1 error format. 647 Allowed values 648 1 - v1 error format 649 2 - v2 error format 650 651Returns: 652 An object of the form: 653 654 { # 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). 655 "action": "A String", # The Action to perform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 656 "description": "A String", # An optional description for this resource. 657 "direction": "A String", # The direction in which this rule applies. 658 "disabled": True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. 659 "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. 660 "kind": "compute#firewallPolicyRule", # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules 661 "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. 662 "destIpRanges": [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. 663 "A String", 664 ], 665 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. 666 { 667 "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. 668 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 669 "A String", 670 ], 671 }, 672 ], 673 "srcIpRanges": [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. 674 "A String", 675 ], 676 }, 677 "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. 678 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall policy rule. 679 "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. 680 "A String", 681 ], 682 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 683 "A String", 684 ], 685}</pre> 686</div> 687 688<div class="method"> 689 <code class="details" id="insert">insert(body=None, parentId=None, requestId=None, x__xgafv=None)</code> 690 <pre>Creates a new policy in the specified project using the data included in the request. 691 692Args: 693 body: object, The request body. 694 The object takes the form of: 695 696{ # Represents a Firewall Policy resource. 697 "associations": [ # A list of associations that belong to this firewall policy. 698 { 699 "attachmentTarget": "A String", # The target that the firewall policy is attached to. 700 "displayName": "A String", # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 701 "firewallPolicyId": "A String", # [Output Only] The firewall policy ID of the association. 702 "name": "A String", # The name for an association. 703 "shortName": "A String", # [Output Only] The short name of the firewall policy of the association. 704 }, 705 ], 706 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 707 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 708 "displayName": "A String", # Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. 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. 709 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 710 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 711 "kind": "compute#firewallPolicy", # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 712 "name": "A String", # [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy. 713 "parent": "A String", # [Output Only] The parent of the firewall policy. 714 "ruleTupleCount": 42, # [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 715 "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 firewall policy, a default rule with action "allow" will be added. 716 { # 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). 717 "action": "A String", # The Action to perform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 718 "description": "A String", # An optional description for this resource. 719 "direction": "A String", # The direction in which this rule applies. 720 "disabled": True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. 721 "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. 722 "kind": "compute#firewallPolicyRule", # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules 723 "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. 724 "destIpRanges": [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. 725 "A String", 726 ], 727 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. 728 { 729 "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. 730 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 731 "A String", 732 ], 733 }, 734 ], 735 "srcIpRanges": [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. 736 "A String", 737 ], 738 }, 739 "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. 740 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall policy rule. 741 "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. 742 "A String", 743 ], 744 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 745 "A String", 746 ], 747 }, 748 ], 749 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 750 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 751 "shortName": "A String", # User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 752} 753 754 parentId: string, Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization. 755 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 756 x__xgafv: string, V1 error format. 757 Allowed values 758 1 - v1 error format 759 2 - v2 error format 760 761Returns: 762 An object of the form: 763 764 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 765 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 766 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 767 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 768 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 769 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 770 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 771 { 772 "code": "A String", # [Output Only] The error type identifier for this error. 773 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 774 "message": "A String", # [Output Only] An optional, human-readable error message. 775 }, 776 ], 777 }, 778 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 779 "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. 780 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 781 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 782 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 783 "name": "A String", # [Output Only] Name of the operation. 784 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 785 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 786 "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. 787 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 788 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 789 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 790 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 791 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 792 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 793 "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. 794 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 795 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 796 { 797 "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. 798 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 799 { 800 "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). 801 "value": "A String", # [Output Only] A warning data value corresponding to the key. 802 }, 803 ], 804 "message": "A String", # [Output Only] A human-readable description of the warning code. 805 }, 806 ], 807 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 808}</pre> 809</div> 810 811<div class="method"> 812 <code class="details" id="list">list(filter=None, maxResults=None, orderBy=None, pageToken=None, parentId=None, returnPartialSuccess=None, x__xgafv=None)</code> 813 <pre>Lists all the policies that have been configured for the specified folder or organization. 814 815Args: 816 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` 817 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`) 818 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. 819 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. 820 parentId: string, Parent ID for this request. 821 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 822 x__xgafv: string, V1 error format. 823 Allowed values 824 1 - v1 error format 825 2 - v2 error format 826 827Returns: 828 An object of the form: 829 830 { 831 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 832 "items": [ # A list of FirewallPolicy resources. 833 { # Represents a Firewall Policy resource. 834 "associations": [ # A list of associations that belong to this firewall policy. 835 { 836 "attachmentTarget": "A String", # The target that the firewall policy is attached to. 837 "displayName": "A String", # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 838 "firewallPolicyId": "A String", # [Output Only] The firewall policy ID of the association. 839 "name": "A String", # The name for an association. 840 "shortName": "A String", # [Output Only] The short name of the firewall policy of the association. 841 }, 842 ], 843 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 844 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 845 "displayName": "A String", # Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. 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. 846 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 847 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 848 "kind": "compute#firewallPolicy", # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 849 "name": "A String", # [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy. 850 "parent": "A String", # [Output Only] The parent of the firewall policy. 851 "ruleTupleCount": 42, # [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 852 "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 firewall policy, a default rule with action "allow" will be added. 853 { # 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). 854 "action": "A String", # The Action to perform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 855 "description": "A String", # An optional description for this resource. 856 "direction": "A String", # The direction in which this rule applies. 857 "disabled": True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. 858 "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. 859 "kind": "compute#firewallPolicyRule", # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules 860 "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. 861 "destIpRanges": [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. 862 "A String", 863 ], 864 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. 865 { 866 "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. 867 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 868 "A String", 869 ], 870 }, 871 ], 872 "srcIpRanges": [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. 873 "A String", 874 ], 875 }, 876 "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. 877 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall policy rule. 878 "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. 879 "A String", 880 ], 881 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 882 "A String", 883 ], 884 }, 885 ], 886 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 887 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 888 "shortName": "A String", # User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. 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. 889 }, 890 ], 891 "kind": "compute#firewallPolicyList", # [Output Only] Type of resource. Always compute#firewallPolicyList for listsof FirewallPolicies 892 "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. 893 "warning": { # [Output Only] Informational warning message. 894 "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. 895 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 896 { 897 "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). 898 "value": "A String", # [Output Only] A warning data value corresponding to the key. 899 }, 900 ], 901 "message": "A String", # [Output Only] A human-readable description of the warning code. 902 }, 903}</pre> 904</div> 905 906<div class="method"> 907 <code class="details" id="listAssociations">listAssociations(targetResource=None, x__xgafv=None)</code> 908 <pre>Lists associations of a specified target, i.e., organization or folder. 909 910Args: 911 targetResource: string, The target resource to list associations. It is an organization, or a folder. 912 x__xgafv: string, V1 error format. 913 Allowed values 914 1 - v1 error format 915 2 - v2 error format 916 917Returns: 918 An object of the form: 919 920 { 921 "associations": [ # A list of associations. 922 { 923 "attachmentTarget": "A String", # The target that the firewall policy is attached to. 924 "displayName": "A String", # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 925 "firewallPolicyId": "A String", # [Output Only] The firewall policy ID of the association. 926 "name": "A String", # The name for an association. 927 "shortName": "A String", # [Output Only] The short name of the firewall policy of the association. 928 }, 929 ], 930 "kind": "compute#firewallPoliciesListAssociationsResponse", # [Output Only] Type of firewallPolicy associations. Always compute#FirewallPoliciesListAssociations for lists of firewallPolicy associations. 931}</pre> 932</div> 933 934<div class="method"> 935 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 936 <pre>Retrieves the next page of results. 937 938Args: 939 previous_request: The request for the previous page. (required) 940 previous_response: The response from the request for the previous page. (required) 941 942Returns: 943 A request object that you can call 'execute()' on to request the next 944 page. Returns None if there are no more items in the collection. 945 </pre> 946</div> 947 948<div class="method"> 949 <code class="details" id="move">move(firewallPolicy, parentId=None, requestId=None, x__xgafv=None)</code> 950 <pre>Moves the specified firewall policy. 951 952Args: 953 firewallPolicy: string, Name of the firewall policy to update. (required) 954 parentId: string, The new parent of the firewall policy. 955 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 956 x__xgafv: string, V1 error format. 957 Allowed values 958 1 - v1 error format 959 2 - v2 error format 960 961Returns: 962 An object of the form: 963 964 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 965 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 966 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 967 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 968 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 969 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 970 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 971 { 972 "code": "A String", # [Output Only] The error type identifier for this error. 973 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 974 "message": "A String", # [Output Only] An optional, human-readable error message. 975 }, 976 ], 977 }, 978 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 979 "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. 980 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 981 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 982 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 983 "name": "A String", # [Output Only] Name of the operation. 984 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 985 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 986 "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. 987 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 988 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 989 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 990 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 991 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 992 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 993 "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. 994 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 995 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 996 { 997 "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. 998 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 999 { 1000 "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). 1001 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1002 }, 1003 ], 1004 "message": "A String", # [Output Only] A human-readable description of the warning code. 1005 }, 1006 ], 1007 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1008}</pre> 1009</div> 1010 1011<div class="method"> 1012 <code class="details" id="patch">patch(firewallPolicy, body=None, requestId=None, x__xgafv=None)</code> 1013 <pre>Patches the specified policy with the data included in the request. 1014 1015Args: 1016 firewallPolicy: string, Name of the firewall policy to update. (required) 1017 body: object, The request body. 1018 The object takes the form of: 1019 1020{ # Represents a Firewall Policy resource. 1021 "associations": [ # A list of associations that belong to this firewall policy. 1022 { 1023 "attachmentTarget": "A String", # The target that the firewall policy is attached to. 1024 "displayName": "A String", # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. 1025 "firewallPolicyId": "A String", # [Output Only] The firewall policy ID of the association. 1026 "name": "A String", # The name for an association. 1027 "shortName": "A String", # [Output Only] The short name of the firewall policy of the association. 1028 }, 1029 ], 1030 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 1031 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1032 "displayName": "A String", # Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. 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. 1033 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy. 1034 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1035 "kind": "compute#firewallPolicy", # [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies 1036 "name": "A String", # [Output Only] Name of the resource. It is a numeric ID allocated by GCP which uniquely identifies the Firewall Policy. 1037 "parent": "A String", # [Output Only] The parent of the firewall policy. 1038 "ruleTupleCount": 42, # [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. 1039 "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 firewall policy, a default rule with action "allow" will be added. 1040 { # 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). 1041 "action": "A String", # The Action to perform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 1042 "description": "A String", # An optional description for this resource. 1043 "direction": "A String", # The direction in which this rule applies. 1044 "disabled": True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. 1045 "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. 1046 "kind": "compute#firewallPolicyRule", # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules 1047 "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. 1048 "destIpRanges": [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. 1049 "A String", 1050 ], 1051 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. 1052 { 1053 "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. 1054 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 1055 "A String", 1056 ], 1057 }, 1058 ], 1059 "srcIpRanges": [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. 1060 "A String", 1061 ], 1062 }, 1063 "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. 1064 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall policy rule. 1065 "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. 1066 "A String", 1067 ], 1068 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 1069 "A String", 1070 ], 1071 }, 1072 ], 1073 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1074 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id. 1075 "shortName": "A String", # User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. This name must be set on creation and cannot be changed. 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. 1076} 1077 1078 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1079 x__xgafv: string, V1 error format. 1080 Allowed values 1081 1 - v1 error format 1082 2 - v2 error format 1083 1084Returns: 1085 An object of the form: 1086 1087 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 1088 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1089 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1090 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1091 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1092 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1093 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1094 { 1095 "code": "A String", # [Output Only] The error type identifier for this error. 1096 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1097 "message": "A String", # [Output Only] An optional, human-readable error message. 1098 }, 1099 ], 1100 }, 1101 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1102 "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. 1103 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1104 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1105 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1106 "name": "A String", # [Output Only] Name of the operation. 1107 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1108 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1109 "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. 1110 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1111 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1112 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1113 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1114 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1115 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1116 "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. 1117 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1118 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1119 { 1120 "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. 1121 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1122 { 1123 "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). 1124 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1125 }, 1126 ], 1127 "message": "A String", # [Output Only] A human-readable description of the warning code. 1128 }, 1129 ], 1130 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1131}</pre> 1132</div> 1133 1134<div class="method"> 1135 <code class="details" id="patchRule">patchRule(firewallPolicy, body=None, priority=None, requestId=None, x__xgafv=None)</code> 1136 <pre>Patches a rule of the specified priority. 1137 1138Args: 1139 firewallPolicy: string, Name of the firewall policy to update. (required) 1140 body: object, The request body. 1141 The object takes the form of: 1142 1143{ # 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). 1144 "action": "A String", # The Action to perform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502. 1145 "description": "A String", # An optional description for this resource. 1146 "direction": "A String", # The direction in which this rule applies. 1147 "disabled": True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. 1148 "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. 1149 "kind": "compute#firewallPolicyRule", # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules 1150 "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. 1151 "destIpRanges": [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. 1152 "A String", 1153 ], 1154 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match. 1155 { 1156 "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. 1157 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. 1158 "A String", 1159 ], 1160 }, 1161 ], 1162 "srcIpRanges": [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. 1163 "A String", 1164 ], 1165 }, 1166 "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. 1167 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall policy rule. 1168 "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. 1169 "A String", 1170 ], 1171 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule. 1172 "A String", 1173 ], 1174} 1175 1176 priority: integer, The priority of the rule to patch. 1177 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1178 x__xgafv: string, V1 error format. 1179 Allowed values 1180 1 - v1 error format 1181 2 - v2 error format 1182 1183Returns: 1184 An object of the form: 1185 1186 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 1187 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1188 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1189 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1190 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1191 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1192 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1193 { 1194 "code": "A String", # [Output Only] The error type identifier for this error. 1195 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1196 "message": "A String", # [Output Only] An optional, human-readable error message. 1197 }, 1198 ], 1199 }, 1200 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1201 "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. 1202 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1203 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1204 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1205 "name": "A String", # [Output Only] Name of the operation. 1206 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1207 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1208 "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. 1209 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1210 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1211 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1212 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1213 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1214 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1215 "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. 1216 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1217 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1218 { 1219 "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. 1220 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1221 { 1222 "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). 1223 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1224 }, 1225 ], 1226 "message": "A String", # [Output Only] A human-readable description of the warning code. 1227 }, 1228 ], 1229 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1230}</pre> 1231</div> 1232 1233<div class="method"> 1234 <code class="details" id="removeAssociation">removeAssociation(firewallPolicy, name=None, requestId=None, x__xgafv=None)</code> 1235 <pre>Removes an association for the specified firewall policy. 1236 1237Args: 1238 firewallPolicy: string, Name of the firewall policy to update. (required) 1239 name: string, Name for the attachment that will be removed. 1240 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1241 x__xgafv: string, V1 error format. 1242 Allowed values 1243 1 - v1 error format 1244 2 - v2 error format 1245 1246Returns: 1247 An object of the form: 1248 1249 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 1250 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1251 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1252 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1253 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1254 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1255 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1256 { 1257 "code": "A String", # [Output Only] The error type identifier for this error. 1258 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1259 "message": "A String", # [Output Only] An optional, human-readable error message. 1260 }, 1261 ], 1262 }, 1263 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1264 "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. 1265 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1266 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1267 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1268 "name": "A String", # [Output Only] Name of the operation. 1269 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1270 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1271 "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. 1272 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1273 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1274 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1275 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1276 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1277 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1278 "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. 1279 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1280 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1281 { 1282 "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. 1283 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1284 { 1285 "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). 1286 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1287 }, 1288 ], 1289 "message": "A String", # [Output Only] A human-readable description of the warning code. 1290 }, 1291 ], 1292 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1293}</pre> 1294</div> 1295 1296<div class="method"> 1297 <code class="details" id="removeRule">removeRule(firewallPolicy, priority=None, requestId=None, x__xgafv=None)</code> 1298 <pre>Deletes a rule of the specified priority. 1299 1300Args: 1301 firewallPolicy: string, Name of the firewall policy to update. (required) 1302 priority: integer, The priority of the rule to remove from the firewall policy. 1303 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1304 x__xgafv: string, V1 error format. 1305 Allowed values 1306 1 - v1 error format 1307 2 - v2 error format 1308 1309Returns: 1310 An object of the form: 1311 1312 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 1313 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1314 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1315 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1316 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1317 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1318 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1319 { 1320 "code": "A String", # [Output Only] The error type identifier for this error. 1321 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1322 "message": "A String", # [Output Only] An optional, human-readable error message. 1323 }, 1324 ], 1325 }, 1326 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1327 "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. 1328 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1329 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1330 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1331 "name": "A String", # [Output Only] Name of the operation. 1332 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1333 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1334 "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. 1335 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1336 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1337 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1338 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1339 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1340 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1341 "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. 1342 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1343 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1344 { 1345 "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. 1346 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1347 { 1348 "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). 1349 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1350 }, 1351 ], 1352 "message": "A String", # [Output Only] A human-readable description of the warning code. 1353 }, 1354 ], 1355 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1356}</pre> 1357</div> 1358 1359<div class="method"> 1360 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> 1361 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. 1362 1363Args: 1364 resource: string, Name or id of the resource for this request. (required) 1365 body: object, The request body. 1366 The object takes the form of: 1367 1368{ 1369 "bindings": [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings. 1370 { # Associates `members`, or principals, with a `role`. 1371 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1372 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1373 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1374 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1375 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1376 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 1377 }, 1378 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1379 "A String", 1380 ], 1381 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1382 }, 1383 ], 1384 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. 1385 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them. 1386 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 1387 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 1388 "auditLogConfigs": [ # The configuration for logging of each type of permission. 1389 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 1390 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 1391 "A String", 1392 ], 1393 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 1394 "logType": "A String", # The log type that this config enables. 1395 }, 1396 ], 1397 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 1398 "A String", 1399 ], 1400 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 1401 }, 1402 ], 1403 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 1404 { # Associates `members`, or principals, with a `role`. 1405 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1406 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1407 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1408 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1409 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1410 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 1411 }, 1412 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1413 "A String", 1414 ], 1415 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1416 }, 1417 ], 1418 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 1419 "rules": [ # This is deprecated and has no effect. Do not use. 1420 { # This is deprecated and has no effect. Do not use. 1421 "action": "A String", # This is deprecated and has no effect. Do not use. 1422 "conditions": [ # This is deprecated and has no effect. Do not use. 1423 { # This is deprecated and has no effect. Do not use. 1424 "iam": "A String", # This is deprecated and has no effect. Do not use. 1425 "op": "A String", # This is deprecated and has no effect. Do not use. 1426 "svc": "A String", # This is deprecated and has no effect. Do not use. 1427 "sys": "A String", # This is deprecated and has no effect. Do not use. 1428 "values": [ # This is deprecated and has no effect. Do not use. 1429 "A String", 1430 ], 1431 }, 1432 ], 1433 "description": "A String", # This is deprecated and has no effect. Do not use. 1434 "ins": [ # This is deprecated and has no effect. Do not use. 1435 "A String", 1436 ], 1437 "logConfigs": [ # This is deprecated and has no effect. Do not use. 1438 { # This is deprecated and has no effect. Do not use. 1439 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1440 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1441 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 1442 }, 1443 "logName": "A String", # This is deprecated and has no effect. Do not use. 1444 }, 1445 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1446 "customFields": [ # This is deprecated and has no effect. Do not use. 1447 { # This is deprecated and has no effect. Do not use. 1448 "name": "A String", # This is deprecated and has no effect. Do not use. 1449 "value": "A String", # This is deprecated and has no effect. Do not use. 1450 }, 1451 ], 1452 "field": "A String", # This is deprecated and has no effect. Do not use. 1453 "metric": "A String", # This is deprecated and has no effect. Do not use. 1454 }, 1455 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1456 "logMode": "A String", # This is deprecated and has no effect. Do not use. 1457 }, 1458 }, 1459 ], 1460 "notIns": [ # This is deprecated and has no effect. Do not use. 1461 "A String", 1462 ], 1463 "permissions": [ # This is deprecated and has no effect. Do not use. 1464 "A String", 1465 ], 1466 }, 1467 ], 1468 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1469 }, 1470} 1471 1472 x__xgafv: string, V1 error format. 1473 Allowed values 1474 1 - v1 error format 1475 2 - v2 error format 1476 1477Returns: 1478 An object of the form: 1479 1480 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). 1481 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 1482 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 1483 "auditLogConfigs": [ # The configuration for logging of each type of permission. 1484 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 1485 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 1486 "A String", 1487 ], 1488 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 1489 "logType": "A String", # The log type that this config enables. 1490 }, 1491 ], 1492 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 1493 "A String", 1494 ], 1495 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 1496 }, 1497 ], 1498 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 1499 { # Associates `members`, or principals, with a `role`. 1500 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1501 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1502 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1503 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1504 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1505 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 1506 }, 1507 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1508 "A String", 1509 ], 1510 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1511 }, 1512 ], 1513 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 1514 "rules": [ # This is deprecated and has no effect. Do not use. 1515 { # This is deprecated and has no effect. Do not use. 1516 "action": "A String", # This is deprecated and has no effect. Do not use. 1517 "conditions": [ # This is deprecated and has no effect. Do not use. 1518 { # This is deprecated and has no effect. Do not use. 1519 "iam": "A String", # This is deprecated and has no effect. Do not use. 1520 "op": "A String", # This is deprecated and has no effect. Do not use. 1521 "svc": "A String", # This is deprecated and has no effect. Do not use. 1522 "sys": "A String", # This is deprecated and has no effect. Do not use. 1523 "values": [ # This is deprecated and has no effect. Do not use. 1524 "A String", 1525 ], 1526 }, 1527 ], 1528 "description": "A String", # This is deprecated and has no effect. Do not use. 1529 "ins": [ # This is deprecated and has no effect. Do not use. 1530 "A String", 1531 ], 1532 "logConfigs": [ # This is deprecated and has no effect. Do not use. 1533 { # This is deprecated and has no effect. Do not use. 1534 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1535 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1536 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 1537 }, 1538 "logName": "A String", # This is deprecated and has no effect. Do not use. 1539 }, 1540 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1541 "customFields": [ # This is deprecated and has no effect. Do not use. 1542 { # This is deprecated and has no effect. Do not use. 1543 "name": "A String", # This is deprecated and has no effect. Do not use. 1544 "value": "A String", # This is deprecated and has no effect. Do not use. 1545 }, 1546 ], 1547 "field": "A String", # This is deprecated and has no effect. Do not use. 1548 "metric": "A String", # This is deprecated and has no effect. Do not use. 1549 }, 1550 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1551 "logMode": "A String", # This is deprecated and has no effect. Do not use. 1552 }, 1553 }, 1554 ], 1555 "notIns": [ # This is deprecated and has no effect. Do not use. 1556 "A String", 1557 ], 1558 "permissions": [ # This is deprecated and has no effect. Do not use. 1559 "A String", 1560 ], 1561 }, 1562 ], 1563 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1564}</pre> 1565</div> 1566 1567<div class="method"> 1568 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> 1569 <pre>Returns permissions that a caller has on the specified resource. 1570 1571Args: 1572 resource: string, Name or id of the resource for this request. (required) 1573 body: object, The request body. 1574 The object takes the form of: 1575 1576{ 1577 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 1578 "A String", 1579 ], 1580} 1581 1582 x__xgafv: string, V1 error format. 1583 Allowed values 1584 1 - v1 error format 1585 2 - v2 error format 1586 1587Returns: 1588 An object of the form: 1589 1590 { 1591 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 1592 "A String", 1593 ], 1594}</pre> 1595</div> 1596 1597</body></html>