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_beta.html">Compute Engine API</a> . <a href="compute_beta.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<p class="toc_element"> 126 <code><a href="#update">update(project, zone, disk, body=None, paths=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p> 127<p class="firstline">Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.</p> 128<h3>Method Details</h3> 129<div class="method"> 130 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, disk, body=None, requestId=None, x__xgafv=None)</code> 131 <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. 132 133Args: 134 project: string, Project ID for this request. (required) 135 zone: string, The name of the zone for this request. (required) 136 disk: string, The disk name for this request. (required) 137 body: object, The request body. 138 The object takes the form of: 139 140{ 141 "resourcePolicies": [ # Full or relative path to the resource policy to be added to this disk. You can only specify one resource policy. 142 "A String", 143 ], 144} 145 146 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 147 x__xgafv: string, V1 error format. 148 Allowed values 149 1 - v1 error format 150 2 - v2 error format 151 152Returns: 153 An object of the form: 154 155 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources. 156 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 157 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 158 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 159 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 160 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 161 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 162 { 163 "code": "A String", # [Output Only] The error type identifier for this error. 164 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 165 "message": "A String", # [Output Only] An optional, human-readable error message. 166 }, 167 ], 168 }, 169 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 170 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found. 171 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 172 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 173 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 174 "name": "A String", # [Output Only] Name of the operation. 175 "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. 176 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 177 "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. 178 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 179 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 180 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 181 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 182 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 183 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 184 "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. 185 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 186 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 187 { 188 "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. 189 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 190 { 191 "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). 192 "value": "A String", # [Output Only] A warning data value corresponding to the key. 193 }, 194 ], 195 "message": "A String", # [Output Only] A human-readable description of the warning code. 196 }, 197 ], 198 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 199}</pre> 200</div> 201 202<div class="method"> 203 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 204 <pre>Retrieves an aggregated list of persistent disks. 205 206Args: 207 project: string, Project ID for this request. (required) 208 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) ``` 209 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. 210 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`) 211 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. 212 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. 213 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 214 x__xgafv: string, V1 error format. 215 Allowed values 216 1 - v1 error format 217 2 - v2 error format 218 219Returns: 220 An object of the form: 221 222 { 223 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 224 "items": { # A list of DisksScopedList resources. 225 "a_key": { # [Output Only] Name of the scope containing this set of disks. 226 "disks": [ # [Output Only] A list of disks contained in this scope. 227 { # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/beta/disks) * [Regional](/compute/docs/reference/rest/beta/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. 228 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 229 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 230 "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. 231 "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 232 "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/ 233 "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=" 234 "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 235 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 236 }, 237 "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature. 238 "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. 239 { # Guest OS features. 240 "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. 241 }, 242 ], 243 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 244 "interface": "A String", # [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. 245 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 246 "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. 247 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 248 "a_key": "A String", 249 }, 250 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 251 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 252 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 253 "A String", 254 ], 255 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 256 "A String", 257 ], 258 "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. 259 "locked": True or False, # [Output Only] The field indicates if the disk is created from a locked source image. Attachment of a disk created from a locked source image will cause the following operations to become irreversibly prohibited: - R/W or R/O disk attachment to any other instance - Disk detachment. And the disk can only be deleted when the instance is deleted - Creation of images or snapshots - Disk cloning Furthermore, the instance with at least one disk with locked flag set to true will be prohibited from performing the operations below: - Further attachment of secondary disks. - Detachment of any disks - Create machine images - Create instance template - Delete the instance with --keep-disk parameter set to true for locked disks - Attach a locked disk with --auto-delete parameter set to false 260 "multiWriter": True or False, # Indicates whether or not the disk can be read/write attached to more than one instance. 261 "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. 262 "options": "A String", # Internal use only. 263 "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. 264 "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. 265 "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. 266 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 267 "A String", 268 ], 269 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 270 "A String", 271 ], 272 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 273 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 274 "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. 275 "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 276 "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. 277 "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 278 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 279 "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 280 "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/ 281 "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=" 282 "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 283 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 284 }, 285 "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. 286 "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 287 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 288 "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 289 "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/ 290 "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=" 291 "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 292 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 293 }, 294 "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. 295 "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. 296 "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. 297 "storageType": "A String", # [Deprecated] Storage type of the persistent disk. 298 "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. 299 "userLicenses": [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch 300 "A String", 301 ], 302 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 303 "A String", 304 ], 305 "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. 306 }, 307 ], 308 "warning": { # [Output Only] Informational warning which replaces the list of disks when the list is empty. 309 "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. 310 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 311 { 312 "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). 313 "value": "A String", # [Output Only] A warning data value corresponding to the key. 314 }, 315 ], 316 "message": "A String", # [Output Only] A human-readable description of the warning code. 317 }, 318 }, 319 }, 320 "kind": "compute#diskAggregatedList", # [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks. 321 "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. 322 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 323 "unreachables": [ # [Output Only] Unreachable resources. 324 "A String", 325 ], 326 "warning": { # [Output Only] Informational warning message. 327 "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. 328 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 329 { 330 "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). 331 "value": "A String", # [Output Only] A warning data value corresponding to the key. 332 }, 333 ], 334 "message": "A String", # [Output Only] A human-readable description of the warning code. 335 }, 336}</pre> 337</div> 338 339<div class="method"> 340 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 341 <pre>Retrieves the next page of results. 342 343Args: 344 previous_request: The request for the previous page. (required) 345 previous_response: The response from the request for the previous page. (required) 346 347Returns: 348 A request object that you can call 'execute()' on to request the next 349 page. Returns None if there are no more items in the collection. 350 </pre> 351</div> 352 353<div class="method"> 354 <code class="details" id="close">close()</code> 355 <pre>Close httplib2 connections.</pre> 356</div> 357 358<div class="method"> 359 <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body=None, guestFlush=None, requestId=None, x__xgafv=None)</code> 360 <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. 361 362Args: 363 project: string, Project ID for this request. (required) 364 zone: string, The name of the zone for this request. (required) 365 disk: string, Name of the persistent disk to snapshot. (required) 366 body: object, The request body. 367 The object takes the form of: 368 369{ # 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. 370 "autoCreated": True or False, # [Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk. 371 "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. 372 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 373 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 374 "diskSizeGb": "A String", # [Output Only] Size of the source disk, specified in GB. 375 "downloadBytes": "A String", # [Output Only] Number of bytes downloaded to restore a snapshot to a disk. 376 "guestFlush": True or False, # [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). 377 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 378 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources. 379 "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. 380 "labels": { # Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. 381 "a_key": "A String", 382 }, 383 "licenseCodes": [ # [Output Only] Integer license codes indicating which licenses are attached to this snapshot. 384 "A String", 385 ], 386 "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). 387 "A String", 388 ], 389 "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. 390 "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. 391 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 392 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 393 "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. 394 "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 395 "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/ 396 "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=" 397 "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 398 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 399 }, 400 "sourceDisk": "A String", # The source disk used to create this snapshot. 401 "sourceDiskEncryptionKey": { # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. 402 "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 403 "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/ 404 "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=" 405 "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 406 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 407 }, 408 "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. 409 "status": "A String", # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. 410 "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. 411 "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. 412 "storageLocations": [ # Cloud Storage bucket storage location of the snapshot (regional or multi-regional). 413 "A String", 414 ], 415 "userLicenses": [ # [Output Only] A list of user provided licenses represented by a list of URLs to the license resource. 416 "A String", 417 ], 418} 419 420 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). 421 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). 422 x__xgafv: string, V1 error format. 423 Allowed values 424 1 - v1 error format 425 2 - v2 error format 426 427Returns: 428 An object of the form: 429 430 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 431 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 432 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 433 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 434 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 435 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 436 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 437 { 438 "code": "A String", # [Output Only] The error type identifier for this error. 439 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 440 "message": "A String", # [Output Only] An optional, human-readable error message. 441 }, 442 ], 443 }, 444 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 445 "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. 446 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 447 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 448 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 449 "name": "A String", # [Output Only] Name of the operation. 450 "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. 451 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 452 "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. 453 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 454 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 455 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 456 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 457 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 458 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 459 "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. 460 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 461 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 462 { 463 "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. 464 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 465 { 466 "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). 467 "value": "A String", # [Output Only] A warning data value corresponding to the key. 468 }, 469 ], 470 "message": "A String", # [Output Only] A human-readable description of the warning code. 471 }, 472 ], 473 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 474}</pre> 475</div> 476 477<div class="method"> 478 <code class="details" id="delete">delete(project, zone, disk, requestId=None, x__xgafv=None)</code> 479 <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. 480 481Args: 482 project: string, Project ID for this request. (required) 483 zone: string, The name of the zone for this request. (required) 484 disk: string, Name of the persistent disk to delete. (required) 485 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). 486 x__xgafv: string, V1 error format. 487 Allowed values 488 1 - v1 error format 489 2 - v2 error format 490 491Returns: 492 An object of the form: 493 494 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 495 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 496 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 497 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 498 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 499 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 500 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 501 { 502 "code": "A String", # [Output Only] The error type identifier for this error. 503 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 504 "message": "A String", # [Output Only] An optional, human-readable error message. 505 }, 506 ], 507 }, 508 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 509 "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. 510 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 511 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 512 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 513 "name": "A String", # [Output Only] Name of the operation. 514 "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. 515 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 516 "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. 517 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 518 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 519 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 520 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 521 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 522 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 523 "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. 524 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 525 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 526 { 527 "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. 528 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 529 { 530 "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). 531 "value": "A String", # [Output Only] A warning data value corresponding to the key. 532 }, 533 ], 534 "message": "A String", # [Output Only] A human-readable description of the warning code. 535 }, 536 ], 537 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 538}</pre> 539</div> 540 541<div class="method"> 542 <code class="details" id="get">get(project, zone, disk, x__xgafv=None)</code> 543 <pre>Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. 544 545Args: 546 project: string, Project ID for this request. (required) 547 zone: string, The name of the zone for this request. (required) 548 disk: string, Name of the persistent disk to return. (required) 549 x__xgafv: string, V1 error format. 550 Allowed values 551 1 - v1 error format 552 2 - v2 error format 553 554Returns: 555 An object of the form: 556 557 { # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/beta/disks) * [Regional](/compute/docs/reference/rest/beta/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. 558 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 559 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 560 "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. 561 "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 562 "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/ 563 "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=" 564 "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 565 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 566 }, 567 "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature. 568 "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. 569 { # Guest OS features. 570 "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. 571 }, 572 ], 573 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 574 "interface": "A String", # [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. 575 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 576 "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. 577 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 578 "a_key": "A String", 579 }, 580 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 581 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 582 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 583 "A String", 584 ], 585 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 586 "A String", 587 ], 588 "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. 589 "locked": True or False, # [Output Only] The field indicates if the disk is created from a locked source image. Attachment of a disk created from a locked source image will cause the following operations to become irreversibly prohibited: - R/W or R/O disk attachment to any other instance - Disk detachment. And the disk can only be deleted when the instance is deleted - Creation of images or snapshots - Disk cloning Furthermore, the instance with at least one disk with locked flag set to true will be prohibited from performing the operations below: - Further attachment of secondary disks. - Detachment of any disks - Create machine images - Create instance template - Delete the instance with --keep-disk parameter set to true for locked disks - Attach a locked disk with --auto-delete parameter set to false 590 "multiWriter": True or False, # Indicates whether or not the disk can be read/write attached to more than one instance. 591 "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. 592 "options": "A String", # Internal use only. 593 "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. 594 "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. 595 "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. 596 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 597 "A String", 598 ], 599 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 600 "A String", 601 ], 602 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 603 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 604 "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. 605 "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 606 "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. 607 "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 608 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 609 "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 610 "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/ 611 "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=" 612 "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 613 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 614 }, 615 "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. 616 "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 617 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 618 "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 619 "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/ 620 "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=" 621 "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 622 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 623 }, 624 "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. 625 "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. 626 "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. 627 "storageType": "A String", # [Deprecated] Storage type of the persistent disk. 628 "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. 629 "userLicenses": [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch 630 "A String", 631 ], 632 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 633 "A String", 634 ], 635 "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. 636}</pre> 637</div> 638 639<div class="method"> 640 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</code> 641 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists. 642 643Args: 644 project: string, Project ID for this request. (required) 645 zone: string, The name of the zone for this request. (required) 646 resource: string, Name or id of the resource for this request. (required) 647 optionsRequestedPolicyVersion: integer, Requested IAM Policy version. 648 x__xgafv: string, V1 error format. 649 Allowed values 650 1 - v1 error format 651 2 - v2 error format 652 653Returns: 654 An object of the form: 655 656 { # 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/). 657 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 658 { # 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. 659 "auditLogConfigs": [ # The configuration for logging of each type of permission. 660 { # 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. 661 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 662 "A String", 663 ], 664 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 665 "logType": "A String", # The log type that this config enables. 666 }, 667 ], 668 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 669 "A String", 670 ], 671 "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. 672 }, 673 ], 674 "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`. 675 { # Associates `members`, or principals, with a `role`. 676 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 677 "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). 678 "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. 679 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 680 "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. 681 "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. 682 }, 683 "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`. 684 "A String", 685 ], 686 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 687 }, 688 ], 689 "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. 690 "rules": [ # This is deprecated and has no effect. Do not use. 691 { # This is deprecated and has no effect. Do not use. 692 "action": "A String", # This is deprecated and has no effect. Do not use. 693 "conditions": [ # This is deprecated and has no effect. Do not use. 694 { # This is deprecated and has no effect. Do not use. 695 "iam": "A String", # This is deprecated and has no effect. Do not use. 696 "op": "A String", # This is deprecated and has no effect. Do not use. 697 "svc": "A String", # This is deprecated and has no effect. Do not use. 698 "sys": "A String", # This is deprecated and has no effect. Do not use. 699 "values": [ # This is deprecated and has no effect. Do not use. 700 "A String", 701 ], 702 }, 703 ], 704 "description": "A String", # This is deprecated and has no effect. Do not use. 705 "ins": [ # This is deprecated and has no effect. Do not use. 706 "A String", 707 ], 708 "logConfigs": [ # This is deprecated and has no effect. Do not use. 709 { # This is deprecated and has no effect. Do not use. 710 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 711 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 712 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 713 }, 714 "logName": "A String", # This is deprecated and has no effect. Do not use. 715 }, 716 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 717 "customFields": [ # This is deprecated and has no effect. Do not use. 718 { # This is deprecated and has no effect. Do not use. 719 "name": "A String", # This is deprecated and has no effect. Do not use. 720 "value": "A String", # This is deprecated and has no effect. Do not use. 721 }, 722 ], 723 "field": "A String", # This is deprecated and has no effect. Do not use. 724 "metric": "A String", # This is deprecated and has no effect. Do not use. 725 }, 726 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 727 "logMode": "A String", # This is deprecated and has no effect. Do not use. 728 }, 729 }, 730 ], 731 "notIns": [ # This is deprecated and has no effect. Do not use. 732 "A String", 733 ], 734 "permissions": [ # This is deprecated and has no effect. Do not use. 735 "A String", 736 ], 737 }, 738 ], 739 "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). 740}</pre> 741</div> 742 743<div class="method"> 744 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceImage=None, x__xgafv=None)</code> 745 <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. 746 747Args: 748 project: string, Project ID for this request. (required) 749 zone: string, The name of the zone for this request. (required) 750 body: object, The request body. 751 The object takes the form of: 752 753{ # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/beta/disks) * [Regional](/compute/docs/reference/rest/beta/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. 754 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 755 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 756 "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. 757 "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 758 "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/ 759 "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=" 760 "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 761 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 762 }, 763 "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature. 764 "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. 765 { # Guest OS features. 766 "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. 767 }, 768 ], 769 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 770 "interface": "A String", # [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. 771 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 772 "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. 773 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 774 "a_key": "A String", 775 }, 776 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 777 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 778 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 779 "A String", 780 ], 781 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 782 "A String", 783 ], 784 "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. 785 "locked": True or False, # [Output Only] The field indicates if the disk is created from a locked source image. Attachment of a disk created from a locked source image will cause the following operations to become irreversibly prohibited: - R/W or R/O disk attachment to any other instance - Disk detachment. And the disk can only be deleted when the instance is deleted - Creation of images or snapshots - Disk cloning Furthermore, the instance with at least one disk with locked flag set to true will be prohibited from performing the operations below: - Further attachment of secondary disks. - Detachment of any disks - Create machine images - Create instance template - Delete the instance with --keep-disk parameter set to true for locked disks - Attach a locked disk with --auto-delete parameter set to false 786 "multiWriter": True or False, # Indicates whether or not the disk can be read/write attached to more than one instance. 787 "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. 788 "options": "A String", # Internal use only. 789 "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. 790 "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. 791 "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. 792 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 793 "A String", 794 ], 795 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 796 "A String", 797 ], 798 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 799 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 800 "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. 801 "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 802 "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. 803 "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 804 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 805 "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 806 "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/ 807 "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=" 808 "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 809 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 810 }, 811 "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. 812 "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 813 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 814 "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 815 "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/ 816 "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=" 817 "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 818 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 819 }, 820 "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. 821 "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. 822 "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. 823 "storageType": "A String", # [Deprecated] Storage type of the persistent disk. 824 "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. 825 "userLicenses": [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch 826 "A String", 827 ], 828 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 829 "A String", 830 ], 831 "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. 832} 833 834 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). 835 sourceImage: string, Source image to restore onto a disk. This field is optional. 836 x__xgafv: string, V1 error format. 837 Allowed values 838 1 - v1 error format 839 2 - v2 error format 840 841Returns: 842 An object of the form: 843 844 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 845 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 846 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 847 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 848 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 849 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 850 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 851 { 852 "code": "A String", # [Output Only] The error type identifier for this error. 853 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 854 "message": "A String", # [Output Only] An optional, human-readable error message. 855 }, 856 ], 857 }, 858 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 859 "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. 860 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 861 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 862 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 863 "name": "A String", # [Output Only] Name of the operation. 864 "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. 865 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 866 "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. 867 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 868 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 869 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 870 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 871 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 872 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 873 "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. 874 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 875 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 876 { 877 "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. 878 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 879 { 880 "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). 881 "value": "A String", # [Output Only] A warning data value corresponding to the key. 882 }, 883 ], 884 "message": "A String", # [Output Only] A human-readable description of the warning code. 885 }, 886 ], 887 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 888}</pre> 889</div> 890 891<div class="method"> 892 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code> 893 <pre>Retrieves a list of persistent disks contained within the specified zone. 894 895Args: 896 project: string, Project ID for this request. (required) 897 zone: string, The name of the zone for this request. (required) 898 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) ``` 899 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`) 900 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. 901 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. 902 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. 903 x__xgafv: string, V1 error format. 904 Allowed values 905 1 - v1 error format 906 2 - v2 error format 907 908Returns: 909 An object of the form: 910 911 { # A list of Disk resources. 912 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 913 "items": [ # A list of Disk resources. 914 { # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/beta/disks) * [Regional](/compute/docs/reference/rest/beta/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. 915 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 916 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 917 "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. 918 "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 919 "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/ 920 "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=" 921 "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 922 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 923 }, 924 "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature. 925 "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. 926 { # Guest OS features. 927 "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. 928 }, 929 ], 930 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 931 "interface": "A String", # [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. 932 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 933 "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. 934 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 935 "a_key": "A String", 936 }, 937 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 938 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 939 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 940 "A String", 941 ], 942 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 943 "A String", 944 ], 945 "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. 946 "locked": True or False, # [Output Only] The field indicates if the disk is created from a locked source image. Attachment of a disk created from a locked source image will cause the following operations to become irreversibly prohibited: - R/W or R/O disk attachment to any other instance - Disk detachment. And the disk can only be deleted when the instance is deleted - Creation of images or snapshots - Disk cloning Furthermore, the instance with at least one disk with locked flag set to true will be prohibited from performing the operations below: - Further attachment of secondary disks. - Detachment of any disks - Create machine images - Create instance template - Delete the instance with --keep-disk parameter set to true for locked disks - Attach a locked disk with --auto-delete parameter set to false 947 "multiWriter": True or False, # Indicates whether or not the disk can be read/write attached to more than one instance. 948 "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. 949 "options": "A String", # Internal use only. 950 "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. 951 "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. 952 "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. 953 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 954 "A String", 955 ], 956 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 957 "A String", 958 ], 959 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 960 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 961 "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. 962 "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 963 "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. 964 "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 965 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 966 "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 967 "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/ 968 "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=" 969 "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 970 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 971 }, 972 "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. 973 "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 974 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 975 "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 976 "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/ 977 "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=" 978 "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 979 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 980 }, 981 "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. 982 "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. 983 "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. 984 "storageType": "A String", # [Deprecated] Storage type of the persistent disk. 985 "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. 986 "userLicenses": [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch 987 "A String", 988 ], 989 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 990 "A String", 991 ], 992 "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. 993 }, 994 ], 995 "kind": "compute#diskList", # [Output Only] Type of resource. Always compute#diskList for lists of disks. 996 "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. 997 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 998 "warning": { # [Output Only] Informational warning message. 999 "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. 1000 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1001 { 1002 "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). 1003 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1004 }, 1005 ], 1006 "message": "A String", # [Output Only] A human-readable description of the warning code. 1007 }, 1008}</pre> 1009</div> 1010 1011<div class="method"> 1012 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1013 <pre>Retrieves the next page of results. 1014 1015Args: 1016 previous_request: The request for the previous page. (required) 1017 previous_response: The response from the request for the previous page. (required) 1018 1019Returns: 1020 A request object that you can call 'execute()' on to request the next 1021 page. Returns None if there are no more items in the collection. 1022 </pre> 1023</div> 1024 1025<div class="method"> 1026 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, disk, body=None, requestId=None, x__xgafv=None)</code> 1027 <pre>Removes resource policies from a disk. 1028 1029Args: 1030 project: string, Project ID for this request. (required) 1031 zone: string, The name of the zone for this request. (required) 1032 disk: string, The disk name for this request. (required) 1033 body: object, The request body. 1034 The object takes the form of: 1035 1036{ 1037 "resourcePolicies": [ # Resource policies to be removed from this disk. 1038 "A String", 1039 ], 1040} 1041 1042 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). 1043 x__xgafv: string, V1 error format. 1044 Allowed values 1045 1 - v1 error format 1046 2 - v2 error format 1047 1048Returns: 1049 An object of the form: 1050 1051 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1052 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1053 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1054 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1055 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1056 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1057 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1058 { 1059 "code": "A String", # [Output Only] The error type identifier for this error. 1060 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1061 "message": "A String", # [Output Only] An optional, human-readable error message. 1062 }, 1063 ], 1064 }, 1065 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1066 "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. 1067 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1068 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1069 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1070 "name": "A String", # [Output Only] Name of the operation. 1071 "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. 1072 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1073 "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. 1074 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1075 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1076 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1077 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1078 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1079 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1080 "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. 1081 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1082 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1083 { 1084 "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. 1085 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1086 { 1087 "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). 1088 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1089 }, 1090 ], 1091 "message": "A String", # [Output Only] A human-readable description of the warning code. 1092 }, 1093 ], 1094 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1095}</pre> 1096</div> 1097 1098<div class="method"> 1099 <code class="details" id="resize">resize(project, zone, disk, body=None, requestId=None, x__xgafv=None)</code> 1100 <pre>Resizes the specified persistent disk. You can only increase the size of the disk. 1101 1102Args: 1103 project: string, Project ID for this request. (required) 1104 zone: string, The name of the zone for this request. (required) 1105 disk: string, The name of the persistent disk. (required) 1106 body: object, The request body. 1107 The object takes the form of: 1108 1109{ 1110 "sizeGb": "A String", # The new size of the persistent disk, which is specified in GB. 1111} 1112 1113 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). 1114 x__xgafv: string, V1 error format. 1115 Allowed values 1116 1 - v1 error format 1117 2 - v2 error format 1118 1119Returns: 1120 An object of the form: 1121 1122 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1123 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1124 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1125 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1126 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1127 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1128 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1129 { 1130 "code": "A String", # [Output Only] The error type identifier for this error. 1131 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1132 "message": "A String", # [Output Only] An optional, human-readable error message. 1133 }, 1134 ], 1135 }, 1136 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1137 "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. 1138 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1139 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1140 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1141 "name": "A String", # [Output Only] Name of the operation. 1142 "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. 1143 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1144 "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. 1145 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1146 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1147 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1148 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1149 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1150 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1151 "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. 1152 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1153 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1154 { 1155 "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. 1156 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1157 { 1158 "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). 1159 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1160 }, 1161 ], 1162 "message": "A String", # [Output Only] A human-readable description of the warning code. 1163 }, 1164 ], 1165 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1166}</pre> 1167</div> 1168 1169<div class="method"> 1170 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None, x__xgafv=None)</code> 1171 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. 1172 1173Args: 1174 project: string, Project ID for this request. (required) 1175 zone: string, The name of the zone for this request. (required) 1176 resource: string, Name or id of the resource for this request. (required) 1177 body: object, The request body. 1178 The object takes the form of: 1179 1180{ 1181 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings. 1182 { # Associates `members`, or principals, with a `role`. 1183 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1184 "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). 1185 "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. 1186 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1187 "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. 1188 "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. 1189 }, 1190 "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`. 1191 "A String", 1192 ], 1193 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1194 }, 1195 ], 1196 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. 1197 "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. 1198 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 1199 { # 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. 1200 "auditLogConfigs": [ # The configuration for logging of each type of permission. 1201 { # 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. 1202 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 1203 "A String", 1204 ], 1205 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 1206 "logType": "A String", # The log type that this config enables. 1207 }, 1208 ], 1209 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 1210 "A String", 1211 ], 1212 "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. 1213 }, 1214 ], 1215 "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`. 1216 { # Associates `members`, or principals, with a `role`. 1217 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1218 "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). 1219 "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. 1220 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1221 "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. 1222 "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. 1223 }, 1224 "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`. 1225 "A String", 1226 ], 1227 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1228 }, 1229 ], 1230 "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. 1231 "rules": [ # This is deprecated and has no effect. Do not use. 1232 { # This is deprecated and has no effect. Do not use. 1233 "action": "A String", # This is deprecated and has no effect. Do not use. 1234 "conditions": [ # This is deprecated and has no effect. Do not use. 1235 { # This is deprecated and has no effect. Do not use. 1236 "iam": "A String", # This is deprecated and has no effect. Do not use. 1237 "op": "A String", # This is deprecated and has no effect. Do not use. 1238 "svc": "A String", # This is deprecated and has no effect. Do not use. 1239 "sys": "A String", # This is deprecated and has no effect. Do not use. 1240 "values": [ # This is deprecated and has no effect. Do not use. 1241 "A String", 1242 ], 1243 }, 1244 ], 1245 "description": "A String", # This is deprecated and has no effect. Do not use. 1246 "ins": [ # This is deprecated and has no effect. Do not use. 1247 "A String", 1248 ], 1249 "logConfigs": [ # This is deprecated and has no effect. Do not use. 1250 { # This is deprecated and has no effect. Do not use. 1251 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1252 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1253 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 1254 }, 1255 "logName": "A String", # This is deprecated and has no effect. Do not use. 1256 }, 1257 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1258 "customFields": [ # This is deprecated and has no effect. Do not use. 1259 { # This is deprecated and has no effect. Do not use. 1260 "name": "A String", # This is deprecated and has no effect. Do not use. 1261 "value": "A String", # This is deprecated and has no effect. Do not use. 1262 }, 1263 ], 1264 "field": "A String", # This is deprecated and has no effect. Do not use. 1265 "metric": "A String", # This is deprecated and has no effect. Do not use. 1266 }, 1267 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1268 "logMode": "A String", # This is deprecated and has no effect. Do not use. 1269 }, 1270 }, 1271 ], 1272 "notIns": [ # This is deprecated and has no effect. Do not use. 1273 "A String", 1274 ], 1275 "permissions": [ # This is deprecated and has no effect. Do not use. 1276 "A String", 1277 ], 1278 }, 1279 ], 1280 "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). 1281 }, 1282} 1283 1284 x__xgafv: string, V1 error format. 1285 Allowed values 1286 1 - v1 error format 1287 2 - v2 error format 1288 1289Returns: 1290 An object of the form: 1291 1292 { # 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/). 1293 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. 1294 { # 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. 1295 "auditLogConfigs": [ # The configuration for logging of each type of permission. 1296 { # 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. 1297 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. 1298 "A String", 1299 ], 1300 "ignoreChildExemptions": True or False, # This is deprecated and has no effect. Do not use. 1301 "logType": "A String", # The log type that this config enables. 1302 }, 1303 ], 1304 "exemptedMembers": [ # This is deprecated and has no effect. Do not use. 1305 "A String", 1306 ], 1307 "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. 1308 }, 1309 ], 1310 "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`. 1311 { # Associates `members`, or principals, with a `role`. 1312 "bindingId": "A String", # This is deprecated and has no effect. Do not use. 1313 "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). 1314 "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. 1315 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. 1316 "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. 1317 "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. 1318 }, 1319 "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`. 1320 "A String", 1321 ], 1322 "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1323 }, 1324 ], 1325 "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. 1326 "rules": [ # This is deprecated and has no effect. Do not use. 1327 { # This is deprecated and has no effect. Do not use. 1328 "action": "A String", # This is deprecated and has no effect. Do not use. 1329 "conditions": [ # This is deprecated and has no effect. Do not use. 1330 { # This is deprecated and has no effect. Do not use. 1331 "iam": "A String", # This is deprecated and has no effect. Do not use. 1332 "op": "A String", # This is deprecated and has no effect. Do not use. 1333 "svc": "A String", # This is deprecated and has no effect. Do not use. 1334 "sys": "A String", # This is deprecated and has no effect. Do not use. 1335 "values": [ # This is deprecated and has no effect. Do not use. 1336 "A String", 1337 ], 1338 }, 1339 ], 1340 "description": "A String", # This is deprecated and has no effect. Do not use. 1341 "ins": [ # This is deprecated and has no effect. Do not use. 1342 "A String", 1343 ], 1344 "logConfigs": [ # This is deprecated and has no effect. Do not use. 1345 { # This is deprecated and has no effect. Do not use. 1346 "cloudAudit": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1347 "authorizationLoggingOptions": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1348 "permissionType": "A String", # This is deprecated and has no effect. Do not use. 1349 }, 1350 "logName": "A String", # This is deprecated and has no effect. Do not use. 1351 }, 1352 "counter": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1353 "customFields": [ # This is deprecated and has no effect. Do not use. 1354 { # This is deprecated and has no effect. Do not use. 1355 "name": "A String", # This is deprecated and has no effect. Do not use. 1356 "value": "A String", # This is deprecated and has no effect. Do not use. 1357 }, 1358 ], 1359 "field": "A String", # This is deprecated and has no effect. Do not use. 1360 "metric": "A String", # This is deprecated and has no effect. Do not use. 1361 }, 1362 "dataAccess": { # This is deprecated and has no effect. Do not use. # This is deprecated and has no effect. Do not use. 1363 "logMode": "A String", # This is deprecated and has no effect. Do not use. 1364 }, 1365 }, 1366 ], 1367 "notIns": [ # This is deprecated and has no effect. Do not use. 1368 "A String", 1369 ], 1370 "permissions": [ # This is deprecated and has no effect. Do not use. 1371 "A String", 1372 ], 1373 }, 1374 ], 1375 "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). 1376}</pre> 1377</div> 1378 1379<div class="method"> 1380 <code class="details" id="setLabels">setLabels(project, zone, resource, body=None, requestId=None, x__xgafv=None)</code> 1381 <pre>Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. 1382 1383Args: 1384 project: string, Project ID for this request. (required) 1385 zone: string, The name of the zone for this request. (required) 1386 resource: string, Name or id of the resource for this request. (required) 1387 body: object, The request body. 1388 The object takes the form of: 1389 1390{ 1391 "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. 1392 "labels": { # The labels to set for this resource. 1393 "a_key": "A String", 1394 }, 1395} 1396 1397 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). 1398 x__xgafv: string, V1 error format. 1399 Allowed values 1400 1 - v1 error format 1401 2 - v2 error format 1402 1403Returns: 1404 An object of the form: 1405 1406 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1407 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1408 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1409 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1410 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1411 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1412 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1413 { 1414 "code": "A String", # [Output Only] The error type identifier for this error. 1415 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1416 "message": "A String", # [Output Only] An optional, human-readable error message. 1417 }, 1418 ], 1419 }, 1420 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1421 "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. 1422 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1423 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1424 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1425 "name": "A String", # [Output Only] Name of the operation. 1426 "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. 1427 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1428 "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. 1429 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1430 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1431 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1432 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1433 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1434 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1435 "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. 1436 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1437 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1438 { 1439 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 1440 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1441 { 1442 "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). 1443 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1444 }, 1445 ], 1446 "message": "A String", # [Output Only] A human-readable description of the warning code. 1447 }, 1448 ], 1449 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1450}</pre> 1451</div> 1452 1453<div class="method"> 1454 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</code> 1455 <pre>Returns permissions that a caller has on the specified resource. 1456 1457Args: 1458 project: string, Project ID for this request. (required) 1459 zone: string, The name of the zone for this request. (required) 1460 resource: string, Name or id of the resource for this request. (required) 1461 body: object, The request body. 1462 The object takes the form of: 1463 1464{ 1465 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. 1466 "A String", 1467 ], 1468} 1469 1470 x__xgafv: string, V1 error format. 1471 Allowed values 1472 1 - v1 error format 1473 2 - v2 error format 1474 1475Returns: 1476 An object of the form: 1477 1478 { 1479 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. 1480 "A String", 1481 ], 1482}</pre> 1483</div> 1484 1485<div class="method"> 1486 <code class="details" id="update">update(project, zone, disk, body=None, paths=None, requestId=None, updateMask=None, x__xgafv=None)</code> 1487 <pre>Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license. 1488 1489Args: 1490 project: string, Project ID for this request. (required) 1491 zone: string, The name of the zone for this request. (required) 1492 disk: string, The disk name for this request. (required) 1493 body: object, The request body. 1494 The object takes the form of: 1495 1496{ # Represents a Persistent Disk resource. Google Compute Engine has two Disk resources: * [Zonal](/compute/docs/reference/rest/beta/disks) * [Regional](/compute/docs/reference/rest/beta/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. 1497 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 1498 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 1499 "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. 1500 "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 1501 "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/ 1502 "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=" 1503 "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 1504 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 1505 }, 1506 "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature. 1507 "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. 1508 { # Guest OS features. 1509 "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. 1510 }, 1511 ], 1512 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1513 "interface": "A String", # [Deprecated] Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. 1514 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks. 1515 "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. 1516 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. 1517 "a_key": "A String", 1518 }, 1519 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format. 1520 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format. 1521 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk. 1522 "A String", 1523 ], 1524 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use. 1525 "A String", 1526 ], 1527 "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. 1528 "locked": True or False, # [Output Only] The field indicates if the disk is created from a locked source image. Attachment of a disk created from a locked source image will cause the following operations to become irreversibly prohibited: - R/W or R/O disk attachment to any other instance - Disk detachment. And the disk can only be deleted when the instance is deleted - Creation of images or snapshots - Disk cloning Furthermore, the instance with at least one disk with locked flag set to true will be prohibited from performing the operations below: - Further attachment of secondary disks. - Detachment of any disks - Create machine images - Create instance template - Delete the instance with --keep-disk parameter set to true for locked disks - Attach a locked disk with --auto-delete parameter set to false 1529 "multiWriter": True or False, # Indicates whether or not the disk can be read/write attached to more than one instance. 1530 "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. 1531 "options": "A String", # Internal use only. 1532 "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. 1533 "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. 1534 "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. 1535 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources. 1536 "A String", 1537 ], 1538 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. 1539 "A String", 1540 ], 1541 "satisfiesPzs": True or False, # [Output Only] Reserved for future use. 1542 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource. 1543 "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. 1544 "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 1545 "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. 1546 "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 1547 "sourceImageEncryptionKey": { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. 1548 "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 1549 "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/ 1550 "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=" 1551 "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 1552 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 1553 }, 1554 "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. 1555 "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 1556 "sourceSnapshotEncryptionKey": { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. 1557 "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 1558 "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/ 1559 "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=" 1560 "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 1561 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. 1562 }, 1563 "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. 1564 "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. 1565 "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. 1566 "storageType": "A String", # [Deprecated] Storage type of the persistent disk. 1567 "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. 1568 "userLicenses": [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch 1569 "A String", 1570 ], 1571 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance 1572 "A String", 1573 ], 1574 "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. 1575} 1576 1577 paths: string, A parameter (repeated) 1578 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). 1579 updateMask: string, update_mask indicates fields to be updated as part of this request. 1580 x__xgafv: string, V1 error format. 1581 Allowed values 1582 1 - v1 error format 1583 2 - v2 error format 1584 1585Returns: 1586 An object of the form: 1587 1588 { # Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/beta/globalOperations) * [Regional](/compute/docs/reference/rest/beta/regionOperations) * [Zonal](/compute/docs/reference/rest/beta/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. 1589 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 1590 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 1591 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 1592 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 1593 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 1594 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 1595 { 1596 "code": "A String", # [Output Only] The error type identifier for this error. 1597 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 1598 "message": "A String", # [Output Only] An optional, human-readable error message. 1599 }, 1600 ], 1601 }, 1602 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. 1603 "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. 1604 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server. 1605 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 1606 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources. 1607 "name": "A String", # [Output Only] Name of the operation. 1608 "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. 1609 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. 1610 "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. 1611 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 1612 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 1613 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 1614 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. 1615 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 1616 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 1617 "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. 1618 "user": "A String", # [Output Only] User who requested the operation, for example: `[email protected]`. 1619 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 1620 { 1621 "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. 1622 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } 1623 { 1624 "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). 1625 "value": "A String", # [Output Only] A warning data value corresponding to the key. 1626 }, 1627 ], 1628 "message": "A String", # [Output Only] A human-readable description of the warning code. 1629 }, 1630 ], 1631 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 1632}</pre> 1633</div> 1634 1635</body></html>