chore: regens API reference docs (#889)
diff --git a/docs/dyn/compute_beta.disks.html b/docs/dyn/compute_beta.disks.html
index ab3d973..0c43fcd 100644
--- a/docs/dyn/compute_beta.disks.html
+++ b/docs/dyn/compute_beta.disks.html
@@ -75,16 +75,16 @@
<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.disks.html">disks</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
- <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, disk, body, requestId=None)</a></code></p>
+ <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, disk, body=None, requestId=None)</a></code></p>
<p class="firstline">Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.</p>
<p class="toc_element">
- <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
+ <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
<p class="firstline">Retrieves an aggregated list of persistent disks.</p>
<p class="toc_element">
<code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
- <code><a href="#createSnapshot">createSnapshot(project, zone, disk, body, guestFlush=None, requestId=None)</a></code></p>
+ <code><a href="#createSnapshot">createSnapshot(project, zone, disk, body=None, guestFlush=None, requestId=None)</a></code></p>
<p class="firstline">Creates a snapshot of a specified persistent disk.</p>
<p class="toc_element">
<code><a href="#delete">delete(project, zone, disk, requestId=None)</a></code></p>
@@ -93,10 +93,10 @@
<code><a href="#get">get(project, zone, disk)</a></code></p>
<p class="firstline">Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.</p>
<p class="toc_element">
- <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
+ <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
<p class="toc_element">
- <code><a href="#insert">insert(project, zone, body, requestId=None, sourceImage=None)</a></code></p>
+ <code><a href="#insert">insert(project, zone, body=None, requestId=None, sourceImage=None)</a></code></p>
<p class="firstline">Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.</p>
<p class="toc_element">
<code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
@@ -105,34 +105,34 @@
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
- <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, disk, body, requestId=None)</a></code></p>
+ <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, disk, body=None, requestId=None)</a></code></p>
<p class="firstline">Removes resource policies from a disk.</p>
<p class="toc_element">
- <code><a href="#resize">resize(project, zone, disk, body, requestId=None)</a></code></p>
+ <code><a href="#resize">resize(project, zone, disk, body=None, requestId=None)</a></code></p>
<p class="firstline">Resizes the specified persistent disk. You can only increase the size of the disk.</p>
<p class="toc_element">
- <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body)</a></code></p>
+ <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
<p class="toc_element">
- <code><a href="#setLabels">setLabels(project, zone, resource, body, requestId=None)</a></code></p>
+ <code><a href="#setLabels">setLabels(project, zone, resource, body=None, requestId=None)</a></code></p>
<p class="firstline">Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.</p>
<p class="toc_element">
- <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
+ <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
<h3>Method Details</h3>
<div class="method">
- <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, disk, body, requestId=None)</code>
+ <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, disk, body=None, requestId=None)</code>
<pre>Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
disk: string, The disk name for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{
- "resourcePolicies": [ # Resource policies to be added to this disk.
+ "resourcePolicies": [ # Resource policies to be added to this disk. Currently you can only specify one policy here.
"A String",
],
}
@@ -148,26 +148,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/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 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. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"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.
- "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.
+ "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.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -182,10 +186,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -203,25 +207,26 @@
</div>
<div class="method">
- <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
+ <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
<pre>Retrieves an aggregated list of persistent disks.
Args:
project: string, Project ID for this request. (required)
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.
+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.
- 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)
- 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.
- filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ 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`)
+ 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.
+ filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
-For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
-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.
+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).
+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) ```
+ includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Returns:
An object of the form:
@@ -234,13 +239,18 @@
"disks": [ # [Output Only] A list of disks contained in this scope.
{ # Represents a Persistent Disk resource.
#
+ # Google Compute Engine has two Disk resources:
+ #
+ # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
+ #
# Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options.
#
# The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
#
- # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for beta.disks ==) (== resource_for v1.disks ==) (== resource_for v1.regionDisks ==) (== resource_for beta.regionDisks ==)
+ # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
"sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -274,6 +284,7 @@
#
# If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -287,7 +298,7 @@
"physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
"lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
"type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
- "status": "A String", # [Output Only] The status of disk creation.
+ "status": "A String", # [Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.
"sourceSnapshot": "A String", # The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
# - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
# - projects/project/global/snapshots/snapshot
@@ -302,6 +313,7 @@
"resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations.
"A String",
],
+ "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
"replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
"A String",
],
@@ -317,6 +329,7 @@
"region": "A String", # [Output Only] URL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
"sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -390,24 +403,25 @@
</div>
<div class="method">
- <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body, guestFlush=None, requestId=None)</code>
+ <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body=None, guestFlush=None, requestId=None)</code>
<pre>Creates a snapshot of a specified persistent disk.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
disk: string, Name of the persistent disk to snapshot. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{ # Represents a Persistent Disk Snapshot resource.
#
- # You can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)
- "autoCreated": True or False, # [Output Only] Set to true if snapshots are automatically by applying resource policy on the target disk.
+ # You can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for {$api_version}.snapshots ==)
+ "autoCreated": True or False, # [Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.
"status": "A String", # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
"kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
"sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -428,6 +442,7 @@
#
# If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -445,8 +460,9 @@
"a_key": "A String",
},
"name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- "diskSizeGb": "A String", # [Output Only] Size of the snapshot, specified in GB.
- "storageLocations": [ # GCS bucket storage location of the snapshot (regional or multi-regional).
+ "diskSizeGb": "A String", # [Output Only] Size of the source disk, specified in GB.
+ "downloadBytes": "A String", # [Output Only] Number of bytes downloaded to restore a snapshot to a disk.
+ "storageLocations": [ # Cloud Storage bucket storage location of the snapshot (regional or multi-regional).
"A String",
],
"licenses": [ # [Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).
@@ -473,26 +489,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/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 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. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"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.
- "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.
+ "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.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -507,10 +527,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -546,26 +566,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/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 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. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"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.
- "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.
+ "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.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -580,10 +604,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -614,13 +638,18 @@
{ # Represents a Persistent Disk resource.
#
+ # Google Compute Engine has two Disk resources:
+ #
+ # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
+ #
# Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options.
#
# The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
#
- # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for beta.disks ==) (== resource_for v1.disks ==) (== resource_for v1.regionDisks ==) (== resource_for beta.regionDisks ==)
+ # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
"sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -654,6 +683,7 @@
#
# If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -667,7 +697,7 @@
"physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
"lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
"type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
- "status": "A String", # [Output Only] The status of disk creation.
+ "status": "A String", # [Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.
"sourceSnapshot": "A String", # The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
# - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
# - projects/project/global/snapshots/snapshot
@@ -682,6 +712,7 @@
"resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations.
"A String",
],
+ "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
"replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
"A String",
],
@@ -697,6 +728,7 @@
"region": "A String", # [Output Only] URL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
"sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -728,34 +760,35 @@
</div>
<div class="method">
- <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
+ <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
<pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
resource: string, Name or id of the resource for this request. (required)
+ optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Returns:
An object of the form:
- { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
+ { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
#
#
#
- # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
+ # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members 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.
#
- # **JSON Example**
+ # Optionally, a `binding` can 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.
#
- # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
+ # **JSON example:**
#
- # **YAML Example**
+ # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "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 }
#
- # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
+ # **YAML example:**
#
+ # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com 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 developer's guide](https://cloud.google.com/iam/docs).
+ # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
"auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
{ # 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.
#
@@ -763,21 +796,22 @@
#
# Example Policy with multiple AuditConfigs:
#
- # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
+ # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "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:aliya@example.com" ] } ] } ] }
#
- # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
+ # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
"exemptedMembers": [
"A String",
],
"auditLogConfigs": [ # The configuration for logging of each type of permission.
{ # Provides the configuration for logging a type of permissions. Example:
#
- # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
+ # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
#
- # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
+ # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
"A String",
],
+ "ignoreChildExemptions": True or False,
"logType": "A String", # The log type that this config enables.
},
],
@@ -796,14 +830,18 @@
#
# Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
#
- # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
- #
- # At this time we do not support multiple field names (though this may be supported in the future).
+ # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
"field": "A String", # The field value to attribute.
+ "customFields": [ # Custom fields.
+ { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
+ "name": "A String", # Name is the field name.
+ "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
+ },
+ ],
"metric": "A String", # The metric to update.
},
"dataAccess": { # Write a Data Access (Gin) log # Data access options.
- "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
+ "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
},
"cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
"logName": "A String", # The log_name to populate in the Cloud Audit Record.
@@ -837,11 +875,21 @@
"description": "A String", # Human-readable description of the rule.
},
],
- "version": 42, # Deprecated.
+ "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.
"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.
#
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
- "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
+ # **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.
+ "bindings": [ # Associates a list of `members` to 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 member.
{ # Associates `members` with a `role`.
"role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
"members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
@@ -850,7 +898,7 @@
#
# * `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, `alice@gmail.com` .
+ # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
#
#
#
@@ -858,20 +906,40 @@
#
# * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
#
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?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, `my-other-app@appspot.gserviceaccount.com?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, `admins@example.com?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`.
"A String",
],
- "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
+ "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. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
#
- # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
- "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ # 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.
+ "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.
"expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
- #
- # The application context of the containing message determines which well-known feature set of CEL is supported.
- "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "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.
+ "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.
},
},
],
@@ -880,24 +948,29 @@
</div>
<div class="method">
- <code class="details" id="insert">insert(project, zone, body, requestId=None, sourceImage=None)</code>
+ <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceImage=None)</code>
<pre>Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{ # Represents a Persistent Disk resource.
#
+ # Google Compute Engine has two Disk resources:
+ #
+ # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
+ #
# Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options.
#
# The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
#
- # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for beta.disks ==) (== resource_for v1.disks ==) (== resource_for v1.regionDisks ==) (== resource_for beta.regionDisks ==)
+ # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
"sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -931,6 +1004,7 @@
#
# If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -944,7 +1018,7 @@
"physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
"lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
"type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
- "status": "A String", # [Output Only] The status of disk creation.
+ "status": "A String", # [Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.
"sourceSnapshot": "A String", # The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
# - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
# - projects/project/global/snapshots/snapshot
@@ -959,6 +1033,7 @@
"resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations.
"A String",
],
+ "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
"replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
"A String",
],
@@ -974,6 +1049,7 @@
"region": "A String", # [Output Only] URL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
"sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -1015,26 +1091,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/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 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. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"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.
- "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.
+ "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.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -1049,10 +1129,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -1078,18 +1158,18 @@
zone: string, The name of the zone for this request. (required)
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.
+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.
- 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)
- 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.
- filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
+Currently, only sorting by `name` or `creationTimestamp desc` is supported.
+ 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`)
+ 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.
+ filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
-For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
+For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
-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.
+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).
+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) ```
Returns:
An object of the form:
@@ -1100,13 +1180,18 @@
"items": [ # A list of Disk resources.
{ # Represents a Persistent Disk resource.
#
+ # Google Compute Engine has two Disk resources:
+ #
+ # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
+ #
# Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options.
#
# The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
#
- # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for beta.disks ==) (== resource_for v1.disks ==) (== resource_for v1.regionDisks ==) (== resource_for beta.regionDisks ==)
+ # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
"sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -1140,6 +1225,7 @@
#
# If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -1153,7 +1239,7 @@
"physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
"lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
"type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
- "status": "A String", # [Output Only] The status of disk creation.
+ "status": "A String", # [Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.
"sourceSnapshot": "A String", # The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
# - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
# - projects/project/global/snapshots/snapshot
@@ -1168,6 +1254,7 @@
"resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations.
"A String",
],
+ "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
"replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
"A String",
],
@@ -1183,6 +1270,7 @@
"region": "A String", # [Output Only] URL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
"sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
"rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
+ "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
"sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
"rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
#
@@ -1243,14 +1331,14 @@
</div>
<div class="method">
- <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, disk, body, requestId=None)</code>
+ <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, disk, body=None, requestId=None)</code>
<pre>Removes resource policies from a disk.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
disk: string, The disk name for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{
@@ -1270,26 +1358,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/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 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. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"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.
- "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.
+ "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.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -1304,10 +1396,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -1325,14 +1417,14 @@
</div>
<div class="method">
- <code class="details" id="resize">resize(project, zone, disk, body, requestId=None)</code>
+ <code class="details" id="resize">resize(project, zone, disk, body=None, requestId=None)</code>
<pre>Resizes the specified persistent disk. You can only increase the size of the disk.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
disk: string, The name of the persistent disk. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{
@@ -1350,26 +1442,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/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 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. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"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.
- "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.
+ "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.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -1384,10 +1480,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -1405,34 +1501,34 @@
</div>
<div class="method">
- <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body)</code>
+ <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
<pre>Sets the access control policy on the specified resource. Replaces any existing policy.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
resource: string, Name or id of the resource for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{
- "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. # 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.
+ "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # 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.
#
#
#
- # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
+ # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members 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.
#
- # **JSON Example**
+ # Optionally, a `binding` can 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.
#
- # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
+ # **JSON example:**
#
- # **YAML Example**
+ # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "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 }
#
- # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
+ # **YAML example:**
#
+ # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com 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 developer's guide](https://cloud.google.com/iam/docs).
+ # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
"auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
{ # 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.
#
@@ -1440,21 +1536,22 @@
#
# Example Policy with multiple AuditConfigs:
#
- # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
+ # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "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:aliya@example.com" ] } ] } ] }
#
- # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
+ # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
"exemptedMembers": [
"A String",
],
"auditLogConfigs": [ # The configuration for logging of each type of permission.
{ # Provides the configuration for logging a type of permissions. Example:
#
- # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
+ # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
#
- # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
+ # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
"A String",
],
+ "ignoreChildExemptions": True or False,
"logType": "A String", # The log type that this config enables.
},
],
@@ -1473,14 +1570,18 @@
#
# Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
#
- # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
- #
- # At this time we do not support multiple field names (though this may be supported in the future).
+ # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
"field": "A String", # The field value to attribute.
+ "customFields": [ # Custom fields.
+ { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
+ "name": "A String", # Name is the field name.
+ "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
+ },
+ ],
"metric": "A String", # The metric to update.
},
"dataAccess": { # Write a Data Access (Gin) log # Data access options.
- "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
+ "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
},
"cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
"logName": "A String", # The log_name to populate in the Cloud Audit Record.
@@ -1514,11 +1615,21 @@
"description": "A String", # Human-readable description of the rule.
},
],
- "version": 42, # Deprecated.
+ "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.
"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.
#
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
- "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
+ # **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.
+ "bindings": [ # Associates a list of `members` to 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 member.
{ # Associates `members` with a `role`.
"role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
"members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
@@ -1527,7 +1638,7 @@
#
# * `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, `alice@gmail.com` .
+ # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
#
#
#
@@ -1535,20 +1646,40 @@
#
# * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
#
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?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, `my-other-app@appspot.gserviceaccount.com?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, `admins@example.com?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`.
"A String",
],
- "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
+ "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. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
#
- # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
- "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ # 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.
+ "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.
"expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
- #
- # The application context of the containing message determines which well-known feature set of CEL is supported.
- "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "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.
+ "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.
},
},
],
@@ -1563,7 +1694,7 @@
#
# * `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, `alice@gmail.com` .
+ # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
#
#
#
@@ -1571,20 +1702,40 @@
#
# * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
#
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?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, `my-other-app@appspot.gserviceaccount.com?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, `admins@example.com?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`.
"A String",
],
- "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
+ "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. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
#
- # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
- "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ # 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.
+ "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.
"expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
- #
- # The application context of the containing message determines which well-known feature set of CEL is supported.
- "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "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.
+ "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.
},
},
],
@@ -1595,23 +1746,23 @@
Returns:
An object of the form:
- { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
+ { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
#
#
#
- # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
+ # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members 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.
#
- # **JSON Example**
+ # Optionally, a `binding` can 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.
#
- # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
+ # **JSON example:**
#
- # **YAML Example**
+ # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "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 }
#
- # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
+ # **YAML example:**
#
+ # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com 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 developer's guide](https://cloud.google.com/iam/docs).
+ # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
"auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
{ # 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.
#
@@ -1619,21 +1770,22 @@
#
# Example Policy with multiple AuditConfigs:
#
- # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
+ # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "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:aliya@example.com" ] } ] } ] }
#
- # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
+ # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
"exemptedMembers": [
"A String",
],
"auditLogConfigs": [ # The configuration for logging of each type of permission.
{ # Provides the configuration for logging a type of permissions. Example:
#
- # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
+ # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
#
- # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
+ # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
"A String",
],
+ "ignoreChildExemptions": True or False,
"logType": "A String", # The log type that this config enables.
},
],
@@ -1652,14 +1804,18 @@
#
# Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
#
- # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
- #
- # At this time we do not support multiple field names (though this may be supported in the future).
+ # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
"field": "A String", # The field value to attribute.
+ "customFields": [ # Custom fields.
+ { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
+ "name": "A String", # Name is the field name.
+ "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
+ },
+ ],
"metric": "A String", # The metric to update.
},
"dataAccess": { # Write a Data Access (Gin) log # Data access options.
- "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
+ "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
},
"cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
"logName": "A String", # The log_name to populate in the Cloud Audit Record.
@@ -1693,11 +1849,21 @@
"description": "A String", # Human-readable description of the rule.
},
],
- "version": 42, # Deprecated.
+ "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.
"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.
#
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
- "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
+ # **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.
+ "bindings": [ # Associates a list of `members` to 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 member.
{ # Associates `members` with a `role`.
"role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
"members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
@@ -1706,7 +1872,7 @@
#
# * `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, `alice@gmail.com` .
+ # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
#
#
#
@@ -1714,20 +1880,40 @@
#
# * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
#
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?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, `my-other-app@appspot.gserviceaccount.com?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, `admins@example.com?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`.
"A String",
],
- "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
+ "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. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
#
- # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
- "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ # 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.
+ "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.
"expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
- #
- # The application context of the containing message determines which well-known feature set of CEL is supported.
- "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
- "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "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.
+ "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.
},
},
],
@@ -1736,14 +1922,14 @@
</div>
<div class="method">
- <code class="details" id="setLabels">setLabels(project, zone, resource, body, requestId=None)</code>
+ <code class="details" id="setLabels">setLabels(project, zone, resource, body=None, requestId=None)</code>
<pre>Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
resource: string, Name or id of the resource for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{
@@ -1764,26 +1950,30 @@
{ # Represents an Operation resource.
#
+ # Google Compute Engine has three Operation resources:
+ #
+ # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/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 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. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
+ # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
"targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
"clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
"creationTimestamp": "A String", # [Deprecated] This field is deprecated.
- "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
"zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
"insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
- "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
- "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
+ "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
+ "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
"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.
- "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.
+ "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.
"statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
- "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
+ "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
"description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
"warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
{
@@ -1798,10 +1988,10 @@
],
},
],
- "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
+ "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
"startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
- "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
- "name": "A String", # [Output Only] Name of the resource.
+ "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
+ "name": "A String", # [Output Only] Name of the operation.
"region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
"error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
"errors": [ # [Output Only] The array of errors encountered while processing this operation.
@@ -1819,14 +2009,14 @@
</div>
<div class="method">
- <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
+ <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
<pre>Returns permissions that a caller has on the specified resource.
Args:
project: string, Project ID for this request. (required)
zone: string, The name of the zone for this request. (required)
resource: string, Name or id of the resource for this request. (required)
- body: object, The request body. (required)
+ body: object, The request body.
The object takes the form of:
{