1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.disks.html">disks</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, disk, body=None, requestId=None, x__xgafv=None)</a></code></p> 79<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> 80<p class="toc_element"> 81 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Retrieves an aggregated list of persistent disks.</p> 83<p class="toc_element"> 84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p> 85<p class="firstline">Retrieves the next page of results.</p> 86<p class="toc_element"> 87 <code><a href="#close">close()</a></code></p> 88<p class="firstline">Close httplib2 connections.</p> 89<p class="toc_element"> 90 <code><a href="#createSnapshot">createSnapshot(project, zone, disk, body=None, guestFlush=None, requestId=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.</p> 92<p class="toc_element"> 93 <code><a href="#delete">delete(project, zone, disk, requestId=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.</p> 95<p class="toc_element"> 96 <code><a href="#get">get(project, zone, disk, x__xgafv=None)</a></code></p> 97<p class="firstline">Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.</p> 98<p class="toc_element"> 99 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</a></code></p> 100<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p> 101<p class="toc_element"> 102 <code><a href="#insert">insert(project, zone, body=None, requestId=None, sourceImage=None, x__xgafv=None)</a></code></p> 103<p class="firstline">Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) 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> 104<p class="toc_element"> 105 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p> 106<p class="firstline">Retrieves a list of persistent disks contained within the specified zone.</p> 107<p class="toc_element"> 108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 109<p class="firstline">Retrieves the next page of results.</p> 110<p class="toc_element"> 111 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, disk, body=None, requestId=None, x__xgafv=None)</a></code></p> 112<p class="firstline">Removes resource policies from a disk.</p> 113<p class="toc_element"> 114 <code><a href="#resize">resize(project, zone, disk, body=None, requestId=None, x__xgafv=None)</a></code></p> 115<p class="firstline">Resizes the specified persistent disk. You can only increase the size of the disk.</p> 116<p class="toc_element"> 117 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None, x__xgafv=None)</a></code></p> 118<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p> 119<p class="toc_element"> 120 <code><a href="#setLabels">setLabels(project, zone, resource, body=None, requestId=None, x__xgafv=None)</a></code></p> 121<p class="firstline">Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.</p> 122<p class="toc_element"> 123 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</a></code></p> 124<p class="firstline">Returns permissions that a caller has on the specified resource.</p> 125<h3>Method Details</h3> 126<div class="method"> 127 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, disk, body=None, requestId=None, x__xgafv=None)</code> 128 <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. 129 130Args: 131 project: string, Project ID for this request. (required) 132 zone: string, The name of the zone for this request. (required) 133 disk: string, The disk name for this request. (required) 134 body: object, The request body. 135 The object takes the form of: 136 137{ 138 "resourcePolicies": [ # Full or relative path to the resource policy to be added to this disk. You can only specify one resource policy. 139 "A String", 140 ], 141} 142 143 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 144 x__xgafv: string, V1 error format. 145 Allowed values 146 1 - v1 error format 147 2 - v2 error format 148 149Returns: 150 An object of the form: 151 152 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 153 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 154 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 155 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 156 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 157 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 158 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 159 { 160 "code": "A String", # [Output Only] The error type identifier for this error. 161 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 162 "message": "A String", # [Output Only] An optional, human-readable error message. 163 }, 164 ], 165 }, 166 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 167 "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. 168 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 169 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 170 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 171 "name": "A String", # [Output Only] Name of the operation. 172 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 173 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 174 "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. 175 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 176 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 177 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 178 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 179 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 180 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 181 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 182 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 183 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 184 { 185 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 186 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 187 { 188 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 189 "value": "A String", # [Output Only] A warning data value corresponding to the key. 190 }, 191 ], 192 "message": "A String", # [Output Only] A human-readable description of the warning code. 193 }, 194 ], 195 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 196}</pre> 197</div> 198 199<div class="method"> 200 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 201 <pre>Retrieves an aggregated list of persistent disks. 202 203Args: 204 project: string, Project ID for this request. (required) 205 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` 206 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. 207 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`) 208 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. 209 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. 210 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 211 x__xgafv: string, V1 error format. 212 Allowed values 213 1 - v1 error format 214 2 - v2 error format 215 216Returns: 217 An object of the form: 218 219 { 220 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 221 "items": { # A list of DisksScopedList resources. 222 "a_key": { # [Output Only] Name of the scope containing this set of disks. 223 "disks": [ # [Output Only] A list of disks contained in this scope. 224 { # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/v1/disks) * [Regional](/compute/docs/reference/rest/v1/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. 225 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 226 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 227 "diskEncryptionKey": { # Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later. For example, to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following format: "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, then the disk is encrypted using an automatically generated key and you don't need to provide a key to use the disk later. 228 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 229 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 230 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 231 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 232 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 233 }, 234 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. 235 { # Guest OS features. 236 "type": "A String", # The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE For more information, see Enabling guest operating system features. 237 }, 238 ], 239 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 240 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 241 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk. 242 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 243 "a_key": "A String", 244 }, 245 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 246 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 247 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 248 "A String", 249 ], 250 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 251 "A String", 252 ], 253 "locationHint": "A String", # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API. 254 "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. 255 "options": "A String", # Internal use only. 256 "physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, 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. 257 "provisionedIops": "A String", # Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation. 258 "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. 259 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 260 "A String", 261 ], 262 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 263 "A String", 264 ], 265 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 266 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 267 "sizeGb": "A String", # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive. 268 "sourceDisk": "A String", # The source disk 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/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk 269 "sourceDiskId": "A String", # [Output Only] The unique ID of the disk used to create this disk. This value identifies the exact disk that was used to create this persistent disk. For example, if you created the persistent disk from a disk that was later deleted and recreated under the same name, the source disk ID would identify the exact version of the disk that was used. 270 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family 271 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 272 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 273 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 274 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 275 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 276 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 277 }, 278 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. 279 "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 - global/snapshots/snapshot 280 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 281 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 282 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 283 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 284 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 285 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 286 }, 287 "sourceSnapshotId": "A String", # [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. 288 "sourceStorageObject": "A String", # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead. 289 "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. 290 "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-ssd . See Persistent disk types. 291 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 292 "A String", 293 ], 294 "zone": "A String", # [Output Only] URL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 295 }, 296 ], 297 "warning": { # [Output Only] Informational warning which replaces the list of disks when the list is empty. 298 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 299 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 300 { 301 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 302 "value": "A String", # [Output Only] A warning data value corresponding to the key. 303 }, 304 ], 305 "message": "A String", # [Output Only] A human-readable description of the warning code. 306 }, 307 }, 308 }, 309 "kind": "compute#diskAggregatedList", # [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks. 310 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. 311 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 312 "unreachables": [ # [Output Only] Unreachable resources. 313 "A String", 314 ], 315 "warning": { # [Output Only] Informational warning message. 316 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 317 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 318 { 319 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 320 "value": "A String", # [Output Only] A warning data value corresponding to the key. 321 }, 322 ], 323 "message": "A String", # [Output Only] A human-readable description of the warning code. 324 }, 325}</pre> 326</div> 327 328<div class="method"> 329 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 330 <pre>Retrieves the next page of results. 331 332Args: 333 previous_request: The request for the previous page. (required) 334 previous_response: The response from the request for the previous page. (required) 335 336Returns: 337 A request object that you can call 'execute()' on to request the next 338 page. Returns None if there are no more items in the collection. 339 </pre> 340</div> 341 342<div class="method"> 343 <code class="details" id="close">close()</code> 344 <pre>Close httplib2 connections.</pre> 345</div> 346 347<div class="method"> 348 <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body=None, guestFlush=None, requestId=None, x__xgafv=None)</code> 349 <pre>Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project. 350 351Args: 352 project: string, Project ID for this request. (required) 353 zone: string, The name of the zone for this request. (required) 354 disk: string, Name of the persistent disk to snapshot. (required) 355 body: object, The request body. 356 The object takes the form of: 357 358{ # 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. 359 "autoCreated": True or False, # [Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk. 360 "chainName": "A String", # Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for advanced service owners who needs to create separate snapshot chains, for example, for chargeback tracking. When you describe your snapshot resource, this field is visible only if it has a non-empty value. 361 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 362 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 363 "diskSizeGb": "A String", # [Output Only] Size of the source disk, specified in GB. 364 "downloadBytes": "A String", # [Output Only] Number of bytes downloaded to restore a snapshot to a disk. 365 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 366 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources. 367 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a snapshot. 368 "labels": { # Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. 369 "a_key": "A String", 370 }, 371 "licenseCodes": [ # [Output Only] Integer license codes indicating which licenses are attached to this snapshot. 372 "A String", 373 ], 374 "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). 375 "A String", 376 ], 377 "locationHint": "A String", # An opaque location hint used to place the snapshot close to other resources. This field is for use by internal tools that use the public API. 378 "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. 379 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 380 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 381 "snapshotEncryptionKey": { # Encrypts the snapshot using a customer-supplied encryption key. After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the snapshot later. For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request. Customer-supplied encryption keys do not protect access to metadata of the snapshot. 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. 382 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 383 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 384 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 385 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 386 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 387 }, 388 "sourceDisk": "A String", # The source disk used to create this snapshot. 389 "sourceDiskEncryptionKey": { # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. 390 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 391 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 392 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 393 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 394 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 395 }, 396 "sourceDiskId": "A String", # [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name. 397 "status": "A String", # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. 398 "storageBytes": "A String", # [Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion. 399 "storageBytesStatus": "A String", # [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date. 400 "storageLocations": [ # Cloud Storage bucket storage location of the snapshot (regional or multi-regional). 401 "A String", 402 ], 403} 404 405 guestFlush: boolean, [Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS). 406 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 407 x__xgafv: string, V1 error format. 408 Allowed values 409 1 - v1 error format 410 2 - v2 error format 411 412Returns: 413 An object of the form: 414 415 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 416 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 417 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 418 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 419 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 420 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 421 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 422 { 423 "code": "A String", # [Output Only] The error type identifier for this error. 424 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 425 "message": "A String", # [Output Only] An optional, human-readable error message. 426 }, 427 ], 428 }, 429 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 430 "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. 431 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 432 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 433 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 434 "name": "A String", # [Output Only] Name of the operation. 435 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 436 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 437 "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. 438 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 439 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 440 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 441 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 442 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 443 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 444 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 445 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 446 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 447 { 448 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 449 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 450 { 451 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 452 "value": "A String", # [Output Only] A warning data value corresponding to the key. 453 }, 454 ], 455 "message": "A String", # [Output Only] A human-readable description of the warning code. 456 }, 457 ], 458 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 459}</pre> 460</div> 461 462<div class="method"> 463 <code class="details" id="delete">delete(project, zone, disk, requestId=None, x__xgafv=None)</code> 464 <pre>Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. 465 466Args: 467 project: string, Project ID for this request. (required) 468 zone: string, The name of the zone for this request. (required) 469 disk: string, Name of the persistent disk to delete. (required) 470 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 471 x__xgafv: string, V1 error format. 472 Allowed values 473 1 - v1 error format 474 2 - v2 error format 475 476Returns: 477 An object of the form: 478 479 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 480 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 481 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 482 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 483 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 484 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 485 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 486 { 487 "code": "A String", # [Output Only] The error type identifier for this error. 488 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 489 "message": "A String", # [Output Only] An optional, human-readable error message. 490 }, 491 ], 492 }, 493 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 494 "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. 495 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 496 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 497 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 498 "name": "A String", # [Output Only] Name of the operation. 499 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 500 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 501 "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. 502 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 503 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 504 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 505 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 506 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 507 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 508 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 509 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 510 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 511 { 512 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 513 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 514 { 515 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 516 "value": "A String", # [Output Only] A warning data value corresponding to the key. 517 }, 518 ], 519 "message": "A String", # [Output Only] A human-readable description of the warning code. 520 }, 521 ], 522 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 523}</pre> 524</div> 525 526<div class="method"> 527 <code class="details" id="get">get(project, zone, disk, x__xgafv=None)</code> 528 <pre>Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. 529 530Args: 531 project: string, Project ID for this request. (required) 532 zone: string, The name of the zone for this request. (required) 533 disk: string, Name of the persistent disk to return. (required) 534 x__xgafv: string, V1 error format. 535 Allowed values 536 1 - v1 error format 537 2 - v2 error format 538 539Returns: 540 An object of the form: 541 542 { # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/v1/disks) * [Regional](/compute/docs/reference/rest/v1/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. 543 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 544 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 545 "diskEncryptionKey": { # Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later. For example, to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following format: "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, then the disk is encrypted using an automatically generated key and you don't need to provide a key to use the disk later. 546 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 547 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 548 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 549 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 550 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 551 }, 552 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. 553 { # Guest OS features. 554 "type": "A String", # The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE For more information, see Enabling guest operating system features. 555 }, 556 ], 557 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 558 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 559 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk. 560 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 561 "a_key": "A String", 562 }, 563 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 564 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 565 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 566 "A String", 567 ], 568 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 569 "A String", 570 ], 571 "locationHint": "A String", # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API. 572 "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. 573 "options": "A String", # Internal use only. 574 "physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, 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. 575 "provisionedIops": "A String", # Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation. 576 "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. 577 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 578 "A String", 579 ], 580 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 581 "A String", 582 ], 583 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 584 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 585 "sizeGb": "A String", # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive. 586 "sourceDisk": "A String", # The source disk 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/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk 587 "sourceDiskId": "A String", # [Output Only] The unique ID of the disk used to create this disk. This value identifies the exact disk that was used to create this persistent disk. For example, if you created the persistent disk from a disk that was later deleted and recreated under the same name, the source disk ID would identify the exact version of the disk that was used. 588 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family 589 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 590 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 591 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 592 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 593 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 594 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 595 }, 596 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. 597 "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 - global/snapshots/snapshot 598 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 599 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 600 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 601 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 602 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 603 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 604 }, 605 "sourceSnapshotId": "A String", # [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. 606 "sourceStorageObject": "A String", # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead. 607 "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. 608 "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-ssd . See Persistent disk types. 609 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 610 "A String", 611 ], 612 "zone": "A String", # [Output Only] URL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 613}</pre> 614</div> 615 616<div class="method"> 617 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</code> 618 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists. 619 620Args: 621 project: string, Project ID for this request. (required) 622 zone: string, The name of the zone for this request. (required) 623 resource: string, Name or id of the resource for this request. (required) 624 optionsRequestedPolicyVersion: integer, Requested IAM Policy version. 625 x__xgafv: string, V1 error format. 626 Allowed values 627 1 - v1 error format 628 2 - v2 error format 629 630Returns: 631 An object of the form: 632 633 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). 634 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 635 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 636 "auditLogConfigs": [ # The configuration for logging of each type of permission. 637 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 638 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 639 "A String", 640 ], 641 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 642 "logType": "A String", # The log type that this config enables. 643 }, 644 ], 645 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 646 "A String", 647 ], 648 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 649 }, 650 ], 651 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 652 { # Associates `members`, or principals, with a `role`. 653 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 654 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 655 "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. 656 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 657 "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. 658 "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. 659 }, 660 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 661 "A String", 662 ], 663 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 664 }, 665 ], 666 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 667 "rules": [ # This is deprecated and has no effect. Do not use. 668 { # This is deprecated and has no effect. Do not use. 669 "action": "A String", # This is deprecated and has no effect. Do not use. 670 "conditions": [ # This is deprecated and has no effect. Do not use. 671 { # This is deprecated and has no effect. Do not use. 672 "iam": "A String", # This is deprecated and has no effect. Do not use. 673 "op": "A String", # This is deprecated and has no effect. Do not use. 674 "svc": "A String", # This is deprecated and has no effect. Do not use. 675 "sys": "A String", # This is deprecated and has no effect. Do not use. 676 "values": [ # This is deprecated and has no effect. Do not use. 677 "A String", 678 ], 679 }, 680 ], 681 "description": "A String", # This is deprecated and has no effect. Do not use. 682 "ins": [ # This is deprecated and has no effect. Do not use. 683 "A String", 684 ], 685 "logConfigs": [ # This is deprecated and has no effect. Do not use. 686 { # This is deprecated and has no effect. Do not use. 687 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 688 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 689 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 690 }, 691 "logName": "A String", # This is deprecated and has no effect. Do not use. 692 }, 693 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 694 "customFields": [ # This is deprecated and has no effect. Do not use. 695 { # This is deprecated and has no effect. Do not use. 696 "name": "A String", # This is deprecated and has no effect. Do not use. 697 "value": "A String", # This is deprecated and has no effect. Do not use. 698 }, 699 ], 700 "field": "A String", # This is deprecated and has no effect. Do not use. 701 "metric": "A String", # This is deprecated and has no effect. Do not use. 702 }, 703 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 704 "logMode": "A String", # This is deprecated and has no effect. Do not use. 705 }, 706 }, 707 ], 708 "notIns": [ # This is deprecated and has no effect. Do not use. 709 "A String", 710 ], 711 "permissions": [ # This is deprecated and has no effect. Do not use. 712 "A String", 713 ], 714 }, 715 ], 716 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 717}</pre> 718</div> 719 720<div class="method"> 721 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceImage=None, x__xgafv=None)</code> 722 <pre>Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) 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. 723 724Args: 725 project: string, Project ID for this request. (required) 726 zone: string, The name of the zone for this request. (required) 727 body: object, The request body. 728 The object takes the form of: 729 730{ # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/v1/disks) * [Regional](/compute/docs/reference/rest/v1/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. 731 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 732 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 733 "diskEncryptionKey": { # Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later. For example, to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following format: "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, then the disk is encrypted using an automatically generated key and you don't need to provide a key to use the disk later. 734 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 735 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 736 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 737 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 738 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 739 }, 740 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. 741 { # Guest OS features. 742 "type": "A String", # The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE For more information, see Enabling guest operating system features. 743 }, 744 ], 745 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 746 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 747 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk. 748 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 749 "a_key": "A String", 750 }, 751 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 752 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 753 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 754 "A String", 755 ], 756 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 757 "A String", 758 ], 759 "locationHint": "A String", # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API. 760 "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. 761 "options": "A String", # Internal use only. 762 "physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, 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. 763 "provisionedIops": "A String", # Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation. 764 "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. 765 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 766 "A String", 767 ], 768 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 769 "A String", 770 ], 771 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 772 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 773 "sizeGb": "A String", # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive. 774 "sourceDisk": "A String", # The source disk 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/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk 775 "sourceDiskId": "A String", # [Output Only] The unique ID of the disk used to create this disk. This value identifies the exact disk that was used to create this persistent disk. For example, if you created the persistent disk from a disk that was later deleted and recreated under the same name, the source disk ID would identify the exact version of the disk that was used. 776 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family 777 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 778 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 779 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 780 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 781 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 782 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 783 }, 784 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. 785 "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 - global/snapshots/snapshot 786 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 787 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 788 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 789 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 790 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 791 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 792 }, 793 "sourceSnapshotId": "A String", # [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. 794 "sourceStorageObject": "A String", # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead. 795 "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. 796 "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-ssd . See Persistent disk types. 797 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 798 "A String", 799 ], 800 "zone": "A String", # [Output Only] URL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 801} 802 803 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 804 sourceImage: string, Source image to restore onto a disk. This field is optional. 805 x__xgafv: string, V1 error format. 806 Allowed values 807 1 - v1 error format 808 2 - v2 error format 809 810Returns: 811 An object of the form: 812 813 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 814 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 815 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 816 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 817 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 818 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 819 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 820 { 821 "code": "A String", # [Output Only] The error type identifier for this error. 822 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 823 "message": "A String", # [Output Only] An optional, human-readable error message. 824 }, 825 ], 826 }, 827 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 828 "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. 829 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 830 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 831 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 832 "name": "A String", # [Output Only] Name of the operation. 833 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 834 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 835 "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. 836 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 837 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 838 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 839 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 840 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 841 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 842 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 843 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 844 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 845 { 846 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 847 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 848 { 849 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 850 "value": "A String", # [Output Only] A warning data value corresponding to the key. 851 }, 852 ], 853 "message": "A String", # [Output Only] A human-readable description of the warning code. 854 }, 855 ], 856 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 857}</pre> 858</div> 859 860<div class="method"> 861 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 862 <pre>Retrieves a list of persistent disks contained within the specified zone. 863 864Args: 865 project: string, Project ID for this request. (required) 866 zone: string, The name of the zone for this request. (required) 867 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` 868 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) 869 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. 870 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. 871 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 872 x__xgafv: string, V1 error format. 873 Allowed values 874 1 - v1 error format 875 2 - v2 error format 876 877Returns: 878 An object of the form: 879 880 { # A list of Disk resources. 881 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 882 "items": [ # A list of Disk resources. 883 { # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/v1/disks) * [Regional](/compute/docs/reference/rest/v1/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. 884 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 885 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 886 "diskEncryptionKey": { # Encrypts the disk using a customer-supplied encryption key or a customer-managed encryption key. Encryption keys do not protect access to metadata of the disk. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later. For example, to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine. After you encrypt a disk with a customer-managed key, the diskEncryptionKey.kmsKeyName is set to a key *version* name once the disk is created. The disk is encrypted with this version of the key. In the response, diskEncryptionKey.kmsKeyName appears in the following format: "diskEncryptionKey.kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeysVersions/version If you do not provide an encryption key when creating the disk, then the disk is encrypted using an automatically generated key and you don't need to provide a key to use the disk later. 887 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 888 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 889 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 890 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 891 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 892 }, 893 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. 894 { # Guest OS features. 895 "type": "A String", # The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - SECURE_BOOT - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE For more information, see Enabling guest operating system features. 896 }, 897 ], 898 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 899 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 900 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a disk. 901 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 902 "a_key": "A String", 903 }, 904 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 905 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 906 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 907 "A String", 908 ], 909 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 910 "A String", 911 ], 912 "locationHint": "A String", # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API. 913 "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. 914 "options": "A String", # Internal use only. 915 "physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, 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. 916 "provisionedIops": "A String", # Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation. 917 "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. 918 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 919 "A String", 920 ], 921 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 922 "A String", 923 ], 924 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 925 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 926 "sizeGb": "A String", # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive. 927 "sourceDisk": "A String", # The source disk 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/zones/zone /disks/disk - https://www.googleapis.com/compute/v1/projects/project/regions/region /disks/disk - projects/project/zones/zone/disks/disk - projects/project/regions/region/disks/disk - zones/zone/disks/disk - regions/region/disks/disk 928 "sourceDiskId": "A String", # [Output Only] The unique ID of the disk used to create this disk. This value identifies the exact disk that was used to create this persistent disk. For example, if you created the persistent disk from a disk that was later deleted and recreated under the same name, the source disk ID would identify the exact version of the disk that was used. 929 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family 930 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 931 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 932 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 933 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 934 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 935 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 936 }, 937 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. 938 "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 - global/snapshots/snapshot 939 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 940 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key 941 "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. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/ 942 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=" 943 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem 944 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 945 }, 946 "sourceSnapshotId": "A String", # [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. 947 "sourceStorageObject": "A String", # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead. 948 "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. 949 "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-ssd . See Persistent disk types. 950 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 951 "A String", 952 ], 953 "zone": "A String", # [Output Only] URL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 954 }, 955 ], 956 "kind": "compute#diskList", # [Output Only] Type of resource. Always compute#diskList for lists of disks. 957 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. 958 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 959 "warning": { # [Output Only] Informational warning message. 960 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 961 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 962 { 963 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 964 "value": "A String", # [Output Only] A warning data value corresponding to the key. 965 }, 966 ], 967 "message": "A String", # [Output Only] A human-readable description of the warning code. 968 }, 969}</pre> 970</div> 971 972<div class="method"> 973 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 974 <pre>Retrieves the next page of results. 975 976Args: 977 previous_request: The request for the previous page. (required) 978 previous_response: The response from the request for the previous page. (required) 979 980Returns: 981 A request object that you can call 'execute()' on to request the next 982 page. Returns None if there are no more items in the collection. 983 </pre> 984</div> 985 986<div class="method"> 987 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, disk, body=None, requestId=None, x__xgafv=None)</code> 988 <pre>Removes resource policies from a disk. 989 990Args: 991 project: string, Project ID for this request. (required) 992 zone: string, The name of the zone for this request. (required) 993 disk: string, The disk name for this request. (required) 994 body: object, The request body. 995 The object takes the form of: 996 997{ 998 "resourcePolicies": [ # Resource policies to be removed from this disk. 999 "A String", 1000 ], 1001} 1002 1003 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1004 x__xgafv: string, V1 error format. 1005 Allowed values 1006 1 - v1 error format 1007 2 - v2 error format 1008 1009Returns: 1010 An object of the form: 1011 1012 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 1013 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1014 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1015 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1016 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1017 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1018 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1019 { 1020 "code": "A String", # [Output Only] The error type identifier for this error. 1021 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1022 "message": "A String", # [Output Only] An optional, human-readable error message. 1023 }, 1024 ], 1025 }, 1026 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1027 "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. 1028 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1029 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1030 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1031 "name": "A String", # [Output Only] Name of the operation. 1032 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1033 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1034 "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. 1035 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1036 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1037 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1038 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1039 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1040 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1041 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 1042 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1043 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1044 { 1045 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 1046 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1047 { 1048 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 1049 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1050 }, 1051 ], 1052 "message": "A String", # [Output Only] A human-readable description of the warning code. 1053 }, 1054 ], 1055 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1056}</pre> 1057</div> 1058 1059<div class="method"> 1060 <code class="details" id="resize">resize(project, zone, disk, body=None, requestId=None, x__xgafv=None)</code> 1061 <pre>Resizes the specified persistent disk. You can only increase the size of the disk. 1062 1063Args: 1064 project: string, Project ID for this request. (required) 1065 zone: string, The name of the zone for this request. (required) 1066 disk: string, The name of the persistent disk. (required) 1067 body: object, The request body. 1068 The object takes the form of: 1069 1070{ 1071 "sizeGb": "A String", # The new size of the persistent disk, which is specified in GB. 1072} 1073 1074 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1075 x__xgafv: string, V1 error format. 1076 Allowed values 1077 1 - v1 error format 1078 2 - v2 error format 1079 1080Returns: 1081 An object of the form: 1082 1083 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 1084 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1085 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1086 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1087 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1088 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1089 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1090 { 1091 "code": "A String", # [Output Only] The error type identifier for this error. 1092 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1093 "message": "A String", # [Output Only] An optional, human-readable error message. 1094 }, 1095 ], 1096 }, 1097 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1098 "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. 1099 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1100 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1101 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1102 "name": "A String", # [Output Only] Name of the operation. 1103 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1104 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1105 "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. 1106 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1107 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1108 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1109 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1110 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1111 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1112 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 1113 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1114 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1115 { 1116 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 1117 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1118 { 1119 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 1120 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1121 }, 1122 ], 1123 "message": "A String", # [Output Only] A human-readable description of the warning code. 1124 }, 1125 ], 1126 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1127}</pre> 1128</div> 1129 1130<div class="method"> 1131 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None, x__xgafv=None)</code> 1132 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. 1133 1134Args: 1135 project: string, Project ID for this request. (required) 1136 zone: string, The name of the zone for this request. (required) 1137 resource: string, Name or id of the resource for this request. (required) 1138 body: object, The request body. 1139 The object takes the form of: 1140 1141{ 1142 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. 1143 { # Associates `members`, or principals, with a `role`. 1144 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1145 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1146 "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. 1147 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1148 "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. 1149 "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. 1150 }, 1151 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1152 "A String", 1153 ], 1154 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1155 }, 1156 ], 1157 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. 1158 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them. 1159 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 1160 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 1161 "auditLogConfigs": [ # The configuration for logging of each type of permission. 1162 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 1163 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 1164 "A String", 1165 ], 1166 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 1167 "logType": "A String", # The log type that this config enables. 1168 }, 1169 ], 1170 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 1171 "A String", 1172 ], 1173 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 1174 }, 1175 ], 1176 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 1177 { # Associates `members`, or principals, with a `role`. 1178 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1179 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1180 "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. 1181 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1182 "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. 1183 "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. 1184 }, 1185 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1186 "A String", 1187 ], 1188 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1189 }, 1190 ], 1191 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 1192 "rules": [ # This is deprecated and has no effect. Do not use. 1193 { # This is deprecated and has no effect. Do not use. 1194 "action": "A String", # This is deprecated and has no effect. Do not use. 1195 "conditions": [ # This is deprecated and has no effect. Do not use. 1196 { # This is deprecated and has no effect. Do not use. 1197 "iam": "A String", # This is deprecated and has no effect. Do not use. 1198 "op": "A String", # This is deprecated and has no effect. Do not use. 1199 "svc": "A String", # This is deprecated and has no effect. Do not use. 1200 "sys": "A String", # This is deprecated and has no effect. Do not use. 1201 "values": [ # This is deprecated and has no effect. Do not use. 1202 "A String", 1203 ], 1204 }, 1205 ], 1206 "description": "A String", # This is deprecated and has no effect. Do not use. 1207 "ins": [ # This is deprecated and has no effect. Do not use. 1208 "A String", 1209 ], 1210 "logConfigs": [ # This is deprecated and has no effect. Do not use. 1211 { # This is deprecated and has no effect. Do not use. 1212 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1213 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1214 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 1215 }, 1216 "logName": "A String", # This is deprecated and has no effect. Do not use. 1217 }, 1218 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1219 "customFields": [ # This is deprecated and has no effect. Do not use. 1220 { # This is deprecated and has no effect. Do not use. 1221 "name": "A String", # This is deprecated and has no effect. Do not use. 1222 "value": "A String", # This is deprecated and has no effect. Do not use. 1223 }, 1224 ], 1225 "field": "A String", # This is deprecated and has no effect. Do not use. 1226 "metric": "A String", # This is deprecated and has no effect. Do not use. 1227 }, 1228 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1229 "logMode": "A String", # This is deprecated and has no effect. Do not use. 1230 }, 1231 }, 1232 ], 1233 "notIns": [ # This is deprecated and has no effect. Do not use. 1234 "A String", 1235 ], 1236 "permissions": [ # This is deprecated and has no effect. Do not use. 1237 "A String", 1238 ], 1239 }, 1240 ], 1241 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1242 }, 1243} 1244 1245 x__xgafv: string, V1 error format. 1246 Allowed values 1247 1 - v1 error format 1248 2 - v2 error format 1249 1250Returns: 1251 An object of the form: 1252 1253 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). 1254 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 1255 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts [email protected] from DATA_READ logging, and [email protected] from DATA_WRITE logging. 1256 "auditLogConfigs": [ # The configuration for logging of each type of permission. 1257 { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:[email protected]" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting [email protected] from DATA_READ logging. 1258 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 1259 "A String", 1260 ], 1261 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 1262 "logType": "A String", # The log type that this config enables. 1263 }, 1264 ], 1265 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 1266 "A String", 1267 ], 1268 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. 1269 }, 1270 ], 1271 "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. 1272 { # Associates `members`, or principals, with a `role`. 1273 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1274 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1275 "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. 1276 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1277 "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. 1278 "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. 1279 }, 1280 "members": [ # Specifies the principals requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `[email protected]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. 1281 "A String", 1282 ], 1283 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1284 }, 1285 ], 1286 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. 1287 "rules": [ # This is deprecated and has no effect. Do not use. 1288 { # This is deprecated and has no effect. Do not use. 1289 "action": "A String", # This is deprecated and has no effect. Do not use. 1290 "conditions": [ # This is deprecated and has no effect. Do not use. 1291 { # This is deprecated and has no effect. Do not use. 1292 "iam": "A String", # This is deprecated and has no effect. Do not use. 1293 "op": "A String", # This is deprecated and has no effect. Do not use. 1294 "svc": "A String", # This is deprecated and has no effect. Do not use. 1295 "sys": "A String", # This is deprecated and has no effect. Do not use. 1296 "values": [ # This is deprecated and has no effect. Do not use. 1297 "A String", 1298 ], 1299 }, 1300 ], 1301 "description": "A String", # This is deprecated and has no effect. Do not use. 1302 "ins": [ # This is deprecated and has no effect. Do not use. 1303 "A String", 1304 ], 1305 "logConfigs": [ # This is deprecated and has no effect. Do not use. 1306 { # This is deprecated and has no effect. Do not use. 1307 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1308 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1309 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 1310 }, 1311 "logName": "A String", # This is deprecated and has no effect. Do not use. 1312 }, 1313 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1314 "customFields": [ # This is deprecated and has no effect. Do not use. 1315 { # This is deprecated and has no effect. Do not use. 1316 "name": "A String", # This is deprecated and has no effect. Do not use. 1317 "value": "A String", # This is deprecated and has no effect. Do not use. 1318 }, 1319 ], 1320 "field": "A String", # This is deprecated and has no effect. Do not use. 1321 "metric": "A String", # This is deprecated and has no effect. Do not use. 1322 }, 1323 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1324 "logMode": "A String", # This is deprecated and has no effect. Do not use. 1325 }, 1326 }, 1327 ], 1328 "notIns": [ # This is deprecated and has no effect. Do not use. 1329 "A String", 1330 ], 1331 "permissions": [ # This is deprecated and has no effect. Do not use. 1332 "A String", 1333 ], 1334 }, 1335 ], 1336 "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). 1337}</pre> 1338</div> 1339 1340<div class="method"> 1341 <code class="details" id="setLabels">setLabels(project, zone, resource, body=None, requestId=None, x__xgafv=None)</code> 1342 <pre>Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. 1343 1344Args: 1345 project: string, Project ID for this request. (required) 1346 zone: string, The name of the zone for this request. (required) 1347 resource: string, Name or id of the resource for this request. (required) 1348 body: object, The request body. 1349 The object takes the form of: 1350 1351{ 1352 "labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint. 1353 "labels": { # The labels to set for this resource. 1354 "a_key": "A String", 1355 }, 1356} 1357 1358 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1359 x__xgafv: string, V1 error format. 1360 Allowed values 1361 1 - v1 error format 1362 2 - v2 error format 1363 1364Returns: 1365 An object of the form: 1366 1367 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/v1/globalOperations) * [Regional](/compute/docs/reference/rest/v1/regionOperations) * [Zonal](/compute/docs/reference/rest/v1/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 1368 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1369 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1370 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1371 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1372 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1373 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1374 { 1375 "code": "A String", # [Output Only] The error type identifier for this error. 1376 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1377 "message": "A String", # [Output Only] An optional, human-readable error message. 1378 }, 1379 ], 1380 }, 1381 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1382 "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. 1383 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1384 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1385 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1386 "name": "A String", # [Output Only] Name of the operation. 1387 "operationGroupId": "A String", # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request. 1388 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1389 "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. 1390 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1391 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1392 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1393 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1394 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1395 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1396 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 1397 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1398 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1399 { 1400 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 1401 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1402 { 1403 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 1404 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1405 }, 1406 ], 1407 "message": "A String", # [Output Only] A human-readable description of the warning code. 1408 }, 1409 ], 1410 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1411}</pre> 1412</div> 1413 1414<div class="method"> 1415 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</code> 1416 <pre>Returns permissions that a caller has on the specified resource. 1417 1418Args: 1419 project: string, Project ID for this request. (required) 1420 zone: string, The name of the zone for this request. (required) 1421 resource: string, Name or id of the resource for this request. (required) 1422 body: object, The request body. 1423 The object takes the form of: 1424 1425{ 1426 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 1427 "A String", 1428 ], 1429} 1430 1431 x__xgafv: string, V1 error format. 1432 Allowed values 1433 1 - v1 error format 1434 2 - v2 error format 1435 1436Returns: 1437 An object of the form: 1438 1439 { 1440 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 1441 "A String", 1442 ], 1443}</pre> 1444</div> 1445 1446</body></html>