blob: 18d8b5995443cf6ce9b56664e1f1d0b8f7736bd2 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.regionDisks.html">regionDisks</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addResourcePolicies">addResourcePolicies(project, region, disk, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#createSnapshot">createSnapshot(project, region, disk, body=None, guestFlush=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Creates a snapshot of this regional disk.</p>
83<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#delete">delete(project, region, disk, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of 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>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, disk)</a></code></p>
88<p class="firstline">Returns a specified regional persistent disk.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, region, body=None, requestId=None, sourceImage=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Creates a persistent regional disk in the specified project using the data included in the request.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Retrieves the list of persistent disks contained within the specified region.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, region, disk, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Removes resource policies from a regional disk.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#resize">resize(project, region, disk, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700106<p class="firstline">Resizes the specified regional persistent disk.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#setIamPolicy">setIamPolicy(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#setLabels">setLabels(project, region, resource, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Sets the labels on the target regional disk.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<h3>Method Details</h3>
117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code class="details" id="addResourcePolicies">addResourcePolicies(project, region, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 <pre>Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700120
121Args:
122 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 region: string, The name of the region for this request. (required)
124 disk: string, The disk name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700126 The object takes the form of:
127
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128{
129 "resourcePolicies": [ # Resource policies to be added to this disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130 "A String",
131 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700132 }
133
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 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.
135
136For 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.
137
138The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700139
140Returns:
141 An object of the form:
142
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 { # Represents an Operation resource.
144 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 # Google Compute Engine has three Operation resources:
146 #
147 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
148 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
150 #
151 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700152 # - For global operations, use the `globalOperations` resource.
153 # - For regional operations, use the `regionOperations` resource.
154 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400159 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700160 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700161 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700162 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700163 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
164 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700165 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700166 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700167 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
170 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
171 {
172 "message": "A String", # [Output Only] A human-readable description of the warning code.
173 "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.
174 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
175 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
176 {
177 "value": "A String", # [Output Only] A warning data value corresponding to the key.
178 "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).
179 },
180 ],
181 },
182 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700184 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700185 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
187 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
189 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
190 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
191 {
192 "message": "A String", # [Output Only] An optional, human-readable error message.
193 "code": "A String", # [Output Only] The error type identifier for this error.
194 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
195 },
196 ],
197 },
198 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
199 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
200 "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.
201 }</pre>
202</div>
203
204<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 <code class="details" id="createSnapshot">createSnapshot(project, region, disk, body=None, guestFlush=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206 <pre>Creates a snapshot of this regional disk.
207
208Args:
209 project: string, Project ID for this request. (required)
210 region: string, Name of the region for this request. (required)
211 disk: string, Name of the regional persistent disk to snapshot. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 The object takes the form of:
214
215{ # Represents a Persistent Disk Snapshot resource.
216 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700217 # You can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for {$api_version}.snapshots ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
219 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700220 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700221 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
222 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
223 #
224 # The key must meet the following requirements before you can provide it to Compute Engine:
225 # - The key is wrapped using a RSA public key certificate provided by Google.
226 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
227 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
228 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
229 },
230 "labels": { # Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.
231 "a_key": "A String",
232 },
233 "guestOsFeatures": [ # [Output Only] 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.
234 { # Guest OS features.
235 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
236 },
237 ],
238 "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).
239 "A String",
240 ],
241 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
242 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
243 "licenseCodes": [ # [Output Only] Integer license codes indicating which licenses are attached to this snapshot.
244 "A String",
245 ],
246 "sourceDisk": "A String", # [Output Only] The source disk used to create this snapshot.
Dan O'Mearadd494642020-05-01 07:42:23 -0700247 "diskSizeGb": "A String", # [Output Only] Size of the source disk, specified in GB.
248 "storageLocations": [ # Cloud Storage bucket storage location of the snapshot (regional or multi-regional).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 "A String",
250 ],
251 "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.
252 "status": "A String", # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
253 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
254 "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.
255 #
256 # To see the latest fingerprint, make a get() request to retrieve a snapshot.
257 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 "downloadBytes": "A String", # [Output Only] Number of bytes downloaded to restore a snapshot to a disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 "autoCreated": True or False, # [Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700261 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
262 "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.
263 "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.
264 "snapshotEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the snapshot using a customer-supplied encryption key.
265 #
266 # 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.
267 #
268 # Customer-supplied encryption keys do not protect access to metadata of the snapshot.
269 #
270 # 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.
271 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700272 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
274 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
275 #
276 # The key must meet the following requirements before you can provide it to Compute Engine:
277 # - The key is wrapped using a RSA public key certificate provided by Google.
278 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
279 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
280 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
281 },
282 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
283 }
284
285 guestFlush: boolean, [Input Only] Specifies to create 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).
286 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.
287
288For 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.
289
290The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
291
292Returns:
293 An object of the form:
294
295 { # Represents an Operation resource.
296 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 # Google Compute Engine has three Operation resources:
298 #
299 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
300 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
302 #
303 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700304 # - For global operations, use the `globalOperations` resource.
305 # - For regional operations, use the `regionOperations` resource.
306 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700308 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
310 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
311 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
314 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700315 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
316 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700318 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700321 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
322 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
323 {
324 "message": "A String", # [Output Only] A human-readable description of the warning code.
325 "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.
326 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
327 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
328 {
329 "value": "A String", # [Output Only] A warning data value corresponding to the key.
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 },
332 ],
333 },
334 ],
335 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700336 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700338 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
339 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700341 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
342 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
343 {
344 "message": "A String", # [Output Only] An optional, human-readable error message.
345 "code": "A String", # [Output Only] The error type identifier for this error.
346 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
347 },
348 ],
349 },
350 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
351 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800352 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700353 }</pre>
354</div>
355
356<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400357 <code class="details" id="delete">delete(project, region, disk, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700358 <pre>Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of 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.
359
360Args:
361 project: string, Project ID for this request. (required)
362 region: string, Name of the region for this request. (required)
363 disk: string, Name of the regional persistent disk to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700364 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.
365
366For 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.
367
368The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700369
370Returns:
371 An object of the form:
372
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373 { # Represents an Operation resource.
374 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700375 # Google Compute Engine has three Operation resources:
376 #
377 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
378 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
380 #
381 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 # - For global operations, use the `globalOperations` resource.
383 # - For regional operations, use the `regionOperations` resource.
384 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700386 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700387 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400389 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700390 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700391 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700392 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700393 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
394 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700395 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700396 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700397 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700398 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700399 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
400 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
401 {
402 "message": "A String", # [Output Only] A human-readable description of the warning code.
403 "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.
404 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
405 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
406 {
407 "value": "A String", # [Output Only] A warning data value corresponding to the key.
408 "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).
409 },
410 ],
411 },
412 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700414 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700415 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700416 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
417 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700419 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
420 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
421 {
422 "message": "A String", # [Output Only] An optional, human-readable error message.
423 "code": "A String", # [Output Only] The error type identifier for this error.
424 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
425 },
426 ],
427 },
428 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
429 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800430 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700431 }</pre>
432</div>
433
434<div class="method">
435 <code class="details" id="get">get(project, region, disk)</code>
436 <pre>Returns a specified regional persistent disk.
437
438Args:
439 project: string, Project ID for this request. (required)
440 region: string, Name of the region for this request. (required)
441 disk: string, Name of the regional persistent disk to return. (required)
442
443Returns:
444 An object of the form:
445
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 { # Represents a Persistent Disk resource.
447 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700448 # Google Compute Engine has two Disk resources:
449 #
450 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
451 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452 # 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.
453 #
454 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
455 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700456 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700457 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
458 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700460 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
461 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
462 #
463 # The key must meet the following requirements before you can provide it to Compute Engine:
464 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700466 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400467 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700468 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400469 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700470 "a_key": "A String",
471 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700472 "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.
473 { # Guest OS features.
474 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
475 },
476 ],
477 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700478 "A String",
479 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700480 "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/.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700481 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
482 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700484 "A String",
485 ],
486 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
487 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700488 # After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700489 #
490 # Customer-supplied encryption keys do not protect access to metadata of the disk.
491 #
492 # If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
493 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700495 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
496 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
497 #
498 # The key must meet the following requirements before you can provide it to Compute Engine:
499 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700500 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700501 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400502 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700503 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504 "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:
505 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
506 # - projects/project/zones/zone/disks/disk
507 # - zones/zone/disks/disk
Dan O'Mearadd494642020-05-01 07:42:23 -0700508 "sourceInPlaceSnapshotId": "A String", # [Output Only] The unique ID of the in-place snapshot used to create this disk. This value identifies the exact in-place snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an in-place snapshot that was later deleted and recreated under the same name, the source in-place snapshot ID would identify the exact version of the in-place snapshot that was used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509 "physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700510 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511 "multiWriter": True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
512 "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.
513 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
Dan O'Mearadd494642020-05-01 07:42:23 -0700514 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700515 "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:
516 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
517 # - projects/project/global/snapshots/snapshot
518 # - global/snapshots/snapshot
519 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
520 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
521 "storageType": "A String", # [Deprecated] Storage type of the persistent disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700522 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700523 #
524 # To see the latest fingerprint, make a get() request to retrieve a disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700525 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700526 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700527 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations.
528 "A String",
529 ],
530 "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700531 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
532 "A String",
533 ],
534 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
536 "A String",
537 ],
538 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700539 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700540 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700541 "sizeGb": "A String", # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
542 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 # If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.
544 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700545 "sourceInPlaceSnapshot": "A String", # The source in-place 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:
546 # - https://www.googleapis.com/compute/v1/projects/project/global/inPlaceSnapshots/inPlaceSnapshots
547 # - projects/project/global/inPlaceSnapshots/inPlaceSnapshots
548 # - global/inPlaceSnapshots/inPlaceSnapshots
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700549 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
550 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700551 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700552 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
553 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
554 #
555 # The key must meet the following requirements before you can provide it to Compute Engine:
556 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700558 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400559 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700560 },
561 "options": "A String", # Internal use only.
562 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
563 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
564 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 # 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:
566 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700567 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700568 #
569 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700571 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700572 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 # To create a disk with a custom image that you created, specify the image name in the following format:
574 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700575 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700576 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700577 # 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:
578 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700579 }</pre>
580</div>
581
582<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700583 <code class="details" id="getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
585
586Args:
587 project: string, Project ID for this request. (required)
588 region: string, The name of the region for this request. (required)
589 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591
592Returns:
593 An object of the form:
594
Dan O'Mearadd494642020-05-01 07:42:23 -0700595 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 #
597 #
598 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700599 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700601 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700605 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700607 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700609 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700611 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700612 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
613 { # 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.
614 #
615 # 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.
616 #
617 # Example Policy with multiple AuditConfigs:
618 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700619 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700620 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700621 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 "exemptedMembers": [
623 "A String",
624 ],
625 "auditLogConfigs": [ # The configuration for logging of each type of permission.
626 { # Provides the configuration for logging a type of permissions. Example:
627 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700628 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700630 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
632 "A String",
633 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700634 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 "logType": "A String", # The log type that this config enables.
636 },
637 ],
638 "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.
639 },
640 ],
641 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
642 { # A rule to be applied in a Policy.
643 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
644 { # Specifies what kind of log the caller must write
645 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
646 #
647 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
648 #
649 # Field names correspond to IAM request parameters and field values are their respective values.
650 #
651 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
652 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700653 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -0700655 "customFields": [ # Custom fields.
656 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
657 "name": "A String", # Name is the field name.
658 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
659 },
660 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700661 "metric": "A String", # The metric to update.
662 },
663 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -0700664 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 },
666 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
667 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
668 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
669 "permissionType": "A String", # The type of the permission that was checked.
670 },
671 },
672 },
673 ],
674 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
675 "A String",
676 ],
677 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
678 "A String",
679 ],
680 "action": "A String", # Required
681 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
682 "A String",
683 ],
684 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
685 { # A condition to be met.
686 "iam": "A String", # Trusted attributes supplied by the IAM system.
687 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
688 "values": [ # The objects of the condition.
689 "A String",
690 ],
691 "svc": "A String", # Trusted attributes discharged by the service.
692 "op": "A String", # An operator to apply the subject with.
693 },
694 ],
695 "description": "A String", # Human-readable description of the rule.
696 },
697 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700698 "version": 42, # Specifies the format of the policy.
699 #
700 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
701 #
702 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
703 #
704 # * 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
705 #
706 # **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.
707 #
708 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 "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.
710 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700711 # **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.
712 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 { # Associates `members` with a `role`.
714 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
715 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
716 #
717 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
718 #
719 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
720 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 #
723 #
724 #
725 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
726 #
727 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
728 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700729 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
730 #
731 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
732 #
733 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
734 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700735 #
736 #
737 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
738 "A String",
739 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700740 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700741 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700742 # Example (Comparison):
743 #
744 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
745 #
746 # Example (Equality):
747 #
748 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
749 #
750 # Example (Logic):
751 #
752 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
753 #
754 # Example (Data Manipulation):
755 #
756 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
757 #
758 # 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.
759 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700760 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 "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.
762 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 },
764 },
765 ],
766 "iamOwned": True or False,
767 }</pre>
768</div>
769
770<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700771 <code class="details" id="insert">insert(project, region, body=None, requestId=None, sourceImage=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700772 <pre>Creates a persistent regional disk in the specified project using the data included in the request.
773
774Args:
775 project: string, Project ID for this request. (required)
776 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700777 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700778 The object takes the form of:
779
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780{ # Represents a Persistent Disk resource.
781 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700782 # Google Compute Engine has two Disk resources:
783 #
784 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
785 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 # 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.
787 #
788 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
789 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700790 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700791 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
792 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700793 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700794 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
795 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
796 #
797 # The key must meet the following requirements before you can provide it to Compute Engine:
798 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700799 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700800 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400801 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700802 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400803 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700804 "a_key": "A String",
805 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700806 "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.
807 { # Guest OS features.
808 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
809 },
810 ],
811 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700812 "A String",
813 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700814 "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/.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700815 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
816 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700818 "A String",
819 ],
820 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
821 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700822 # After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700823 #
824 # Customer-supplied encryption keys do not protect access to metadata of the disk.
825 #
826 # If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
827 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700828 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700829 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
830 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
831 #
832 # The key must meet the following requirements before you can provide it to Compute Engine:
833 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700834 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700835 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400836 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700837 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700838 "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:
839 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
840 # - projects/project/zones/zone/disks/disk
841 # - zones/zone/disks/disk
Dan O'Mearadd494642020-05-01 07:42:23 -0700842 "sourceInPlaceSnapshotId": "A String", # [Output Only] The unique ID of the in-place snapshot used to create this disk. This value identifies the exact in-place snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an in-place snapshot that was later deleted and recreated under the same name, the source in-place snapshot ID would identify the exact version of the in-place snapshot that was used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700843 "physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700844 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 "multiWriter": True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
846 "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.
847 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
Dan O'Mearadd494642020-05-01 07:42:23 -0700848 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700849 "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:
850 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
851 # - projects/project/global/snapshots/snapshot
852 # - global/snapshots/snapshot
853 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
854 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
855 "storageType": "A String", # [Deprecated] Storage type of the persistent disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700857 #
858 # To see the latest fingerprint, make a get() request to retrieve a disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700859 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700860 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations.
862 "A String",
863 ],
864 "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700865 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
866 "A String",
867 ],
868 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700869 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
870 "A String",
871 ],
872 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700873 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700874 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700875 "sizeGb": "A String", # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
876 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700877 # If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.
878 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700879 "sourceInPlaceSnapshot": "A String", # The source in-place 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:
880 # - https://www.googleapis.com/compute/v1/projects/project/global/inPlaceSnapshots/inPlaceSnapshots
881 # - projects/project/global/inPlaceSnapshots/inPlaceSnapshots
882 # - global/inPlaceSnapshots/inPlaceSnapshots
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700883 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
884 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700885 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700886 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
887 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
888 #
889 # The key must meet the following requirements before you can provide it to Compute Engine:
890 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700892 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400893 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700894 },
895 "options": "A String", # Internal use only.
896 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
897 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
898 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700899 # 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:
900 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700901 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700902 #
903 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700905 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700906 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 # To create a disk with a custom image that you created, specify the image name in the following format:
908 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700909 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700910 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700911 # 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:
912 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700913 }
914
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 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.
916
917For 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.
918
919The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700920 sourceImage: string, Optional. Source image to restore onto a disk.
921
922Returns:
923 An object of the form:
924
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 { # Represents an Operation resource.
926 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700927 # Google Compute Engine has three Operation resources:
928 #
929 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
930 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
932 #
933 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700934 # - For global operations, use the `globalOperations` resource.
935 # - For regional operations, use the `regionOperations` resource.
936 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700937 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700938 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700939 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700940 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400941 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700942 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700943 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700944 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700945 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
946 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700947 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700948 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700949 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700950 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700951 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
952 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
953 {
954 "message": "A String", # [Output Only] A human-readable description of the warning code.
955 "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.
956 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
957 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
958 {
959 "value": "A String", # [Output Only] A warning data value corresponding to the key.
960 "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).
961 },
962 ],
963 },
964 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700965 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700966 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700967 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700968 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
969 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700971 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
972 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
973 {
974 "message": "A String", # [Output Only] An optional, human-readable error message.
975 "code": "A String", # [Output Only] The error type identifier for this error.
976 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
977 },
978 ],
979 },
980 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
981 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800982 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700983 }</pre>
984</div>
985
986<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700987 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700988 <pre>Retrieves the list of persistent disks contained within the specified region.
989
990Args:
991 project: string, Project ID for this request. (required)
992 region: string, Name of the region for this request. (required)
993 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
994
Dan O'Mearadd494642020-05-01 07:42:23 -0700995You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700996
Dan O'Mearadd494642020-05-01 07:42:23 -0700997Currently, only sorting by `name` or `creationTimestamp desc` is supported.
998 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`)
999 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.
1000 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
1001 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001002
Dan O'Mearadd494642020-05-01 07:42:23 -07001003For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001004
Dan O'Mearadd494642020-05-01 07:42:23 -07001005You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001006
Dan O'Mearadd494642020-05-01 07:42:23 -07001007To 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) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001008
1009Returns:
1010 An object of the form:
1011
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001012 { # A list of Disk resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001013 "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.
1014 "kind": "compute#diskList", # [Output Only] Type of resource. Always compute#diskList for lists of disks.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001015 "items": [ # A list of Disk resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 { # Represents a Persistent Disk resource.
1017 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001018 # Google Compute Engine has two Disk resources:
1019 #
1020 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
1021 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001022 # 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.
1023 #
1024 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
1025 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001027 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1028 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001029 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001030 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1031 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1032 #
1033 # The key must meet the following requirements before you can provide it to Compute Engine:
1034 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001035 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001036 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001037 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001038 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001039 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001040 "a_key": "A String",
1041 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001042 "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.
1043 { # Guest OS features.
1044 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1045 },
1046 ],
1047 "licenses": [ # A list of publicly visible licenses. Reserved for Google's use.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001048 "A String",
1049 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001050 "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/.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001051 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1052 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001053 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001054 "A String",
1055 ],
1056 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
1057 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 # After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001059 #
1060 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1061 #
1062 # If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
1063 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001064 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001065 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1066 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1067 #
1068 # The key must meet the following requirements before you can provide it to Compute Engine:
1069 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001070 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001071 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001072 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001073 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001074 "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:
1075 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1076 # - projects/project/zones/zone/disks/disk
1077 # - zones/zone/disks/disk
Dan O'Mearadd494642020-05-01 07:42:23 -07001078 "sourceInPlaceSnapshotId": "A String", # [Output Only] The unique ID of the in-place snapshot used to create this disk. This value identifies the exact in-place snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an in-place snapshot that was later deleted and recreated under the same name, the source in-place snapshot ID would identify the exact version of the in-place snapshot that was used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 "physicalBlockSizeBytes": "A String", # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001080 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001081 "multiWriter": True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
1082 "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.
1083 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
Dan O'Mearadd494642020-05-01 07:42:23 -07001084 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001085 "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:
1086 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
1087 # - projects/project/global/snapshots/snapshot
1088 # - global/snapshots/snapshot
1089 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
1090 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1091 "storageType": "A String", # [Deprecated] Storage type of the persistent disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001092 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001093 #
1094 # To see the latest fingerprint, make a get() request to retrieve a disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001096 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001097 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations.
1098 "A String",
1099 ],
1100 "eraseWindowsVssSignature": True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001101 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1102 "A String",
1103 ],
1104 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001105 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
1106 "A String",
1107 ],
1108 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001109 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001110 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001111 "sizeGb": "A String", # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
1112 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001113 # If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.
1114 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001115 "sourceInPlaceSnapshot": "A String", # The source in-place 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:
1116 # - https://www.googleapis.com/compute/v1/projects/project/global/inPlaceSnapshots/inPlaceSnapshots
1117 # - projects/project/global/inPlaceSnapshots/inPlaceSnapshots
1118 # - global/inPlaceSnapshots/inPlaceSnapshots
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001119 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
1120 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001121 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001122 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1123 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1124 #
1125 # The key must meet the following requirements before you can provide it to Compute Engine:
1126 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001127 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001128 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001129 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001130 },
1131 "options": "A String", # Internal use only.
1132 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
1133 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
1134 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001135 # 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:
1136 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001137 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001138 #
1139 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001140 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001141 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001142 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001143 # To create a disk with a custom image that you created, specify the image name in the following format:
1144 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001145 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001146 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001147 # 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:
1148 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001149 },
1150 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001151 "warning": { # [Output Only] Informational warning message.
1152 "message": "A String", # [Output Only] A human-readable description of the warning code.
1153 "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.
1154 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1155 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1156 {
1157 "value": "A String", # [Output Only] A warning data value corresponding to the key.
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 },
1160 ],
1161 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001162 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001163 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1164 }</pre>
1165</div>
1166
1167<div class="method">
1168 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1169 <pre>Retrieves the next page of results.
1170
1171Args:
1172 previous_request: The request for the previous page. (required)
1173 previous_response: The response from the request for the previous page. (required)
1174
1175Returns:
1176 A request object that you can call 'execute()' on to request the next
1177 page. Returns None if there are no more items in the collection.
1178 </pre>
1179</div>
1180
1181<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001182 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, region, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001183 <pre>Removes resource policies from a regional disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001184
1185Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 project: string, Project ID for this request. (required)
1187 region: string, The name of the region for this request. (required)
1188 disk: string, The disk name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001189 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001190 The object takes the form of:
1191
1192{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001193 "resourcePolicies": [ # Resource policies to be removed from this disk.
1194 "A String",
1195 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001196 }
1197
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001198 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.
1199
1200For 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.
1201
1202The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001203
1204Returns:
1205 An object of the form:
1206
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 { # Represents an Operation resource.
1208 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001209 # Google Compute Engine has three Operation resources:
1210 #
1211 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1212 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001213 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1214 #
1215 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001216 # - For global operations, use the `globalOperations` resource.
1217 # - For regional operations, use the `regionOperations` resource.
1218 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001219 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001220 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001221 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001222 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001223 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001224 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001225 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001226 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001227 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1228 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001229 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001230 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001231 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001233 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1234 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1235 {
1236 "message": "A String", # [Output Only] A human-readable description of the warning code.
1237 "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.
1238 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1239 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1240 {
1241 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1242 "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).
1243 },
1244 ],
1245 },
1246 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001247 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001248 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001249 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001250 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1251 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001252 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001253 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1254 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1255 {
1256 "message": "A String", # [Output Only] An optional, human-readable error message.
1257 "code": "A String", # [Output Only] The error type identifier for this error.
1258 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1259 },
1260 ],
1261 },
1262 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1263 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001264 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001265 }</pre>
1266</div>
1267
1268<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001269 <code class="details" id="resize">resize(project, region, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001270 <pre>Resizes the specified regional persistent disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001271
1272Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001273 project: string, The project ID for this request. (required)
1274 region: string, Name of the region for this request. (required)
1275 disk: string, Name of the regional persistent disk. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001276 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001277 The object takes the form of:
1278
1279{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001280 "sizeGb": "A String", # The new size of the regional persistent disk, which is specified in GB.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001281 }
1282
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001283 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.
1284
1285For 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.
1286
1287The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001288
1289Returns:
1290 An object of the form:
1291
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001292 { # Represents an Operation resource.
1293 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001294 # Google Compute Engine has three Operation resources:
1295 #
1296 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1297 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1299 #
1300 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001301 # - For global operations, use the `globalOperations` resource.
1302 # - For regional operations, use the `regionOperations` resource.
1303 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001304 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001305 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001306 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001307 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001308 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001309 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001311 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001312 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1313 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001314 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001315 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001316 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001317 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001318 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1319 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1320 {
1321 "message": "A String", # [Output Only] A human-readable description of the warning code.
1322 "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.
1323 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1324 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1325 {
1326 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1327 "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).
1328 },
1329 ],
1330 },
1331 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001332 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001333 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001334 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001335 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1336 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001337 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1338 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1339 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1340 {
1341 "message": "A String", # [Output Only] An optional, human-readable error message.
1342 "code": "A String", # [Output Only] The error type identifier for this error.
1343 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1344 },
1345 ],
1346 },
1347 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1348 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1349 "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.
1350 }</pre>
1351</div>
1352
1353<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001354 <code class="details" id="setIamPolicy">setIamPolicy(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001355 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1356
1357Args:
1358 project: string, Project ID for this request. (required)
1359 region: string, The name of the region for this request. (required)
1360 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001362 The object takes the form of:
1363
1364{
Dan O'Mearadd494642020-05-01 07:42:23 -07001365 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001366 #
1367 #
1368 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001369 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001370 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001371 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001372 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001373 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001374 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001375 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001376 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001377 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001378 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001379 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001380 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001381 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001382 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1383 { # 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.
1384 #
1385 # 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.
1386 #
1387 # Example Policy with multiple AuditConfigs:
1388 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001389 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001390 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001391 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001392 "exemptedMembers": [
1393 "A String",
1394 ],
1395 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1396 { # Provides the configuration for logging a type of permissions. Example:
1397 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001398 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001399 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001400 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001401 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1402 "A String",
1403 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001404 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001405 "logType": "A String", # The log type that this config enables.
1406 },
1407 ],
1408 "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.
1409 },
1410 ],
1411 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1412 { # A rule to be applied in a Policy.
1413 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1414 { # Specifies what kind of log the caller must write
1415 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1416 #
1417 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
1418 #
1419 # Field names correspond to IAM request parameters and field values are their respective values.
1420 #
1421 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
1422 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001423 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001424 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001425 "customFields": [ # Custom fields.
1426 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1427 "name": "A String", # Name is the field name.
1428 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1429 },
1430 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001431 "metric": "A String", # The metric to update.
1432 },
1433 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001434 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001435 },
1436 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1437 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1438 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1439 "permissionType": "A String", # The type of the permission that was checked.
1440 },
1441 },
1442 },
1443 ],
1444 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1445 "A String",
1446 ],
1447 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1448 "A String",
1449 ],
1450 "action": "A String", # Required
1451 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1452 "A String",
1453 ],
1454 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1455 { # A condition to be met.
1456 "iam": "A String", # Trusted attributes supplied by the IAM system.
1457 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1458 "values": [ # The objects of the condition.
1459 "A String",
1460 ],
1461 "svc": "A String", # Trusted attributes discharged by the service.
1462 "op": "A String", # An operator to apply the subject with.
1463 },
1464 ],
1465 "description": "A String", # Human-readable description of the rule.
1466 },
1467 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001468 "version": 42, # Specifies the format of the policy.
1469 #
1470 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1471 #
1472 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1473 #
1474 # * 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
1475 #
1476 # **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.
1477 #
1478 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001479 "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.
1480 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001481 # **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.
1482 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001483 { # Associates `members` with a `role`.
1484 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1485 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1486 #
1487 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1488 #
1489 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1490 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001491 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 #
1493 #
1494 #
1495 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1496 #
1497 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1498 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001499 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1500 #
1501 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1502 #
1503 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1504 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001505 #
1506 #
1507 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1508 "A String",
1509 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001510 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001511 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001512 # Example (Comparison):
1513 #
1514 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1515 #
1516 # Example (Equality):
1517 #
1518 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1519 #
1520 # Example (Logic):
1521 #
1522 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1523 #
1524 # Example (Data Manipulation):
1525 #
1526 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1527 #
1528 # 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.
1529 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001530 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001531 "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.
1532 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001533 },
1534 },
1535 ],
1536 "iamOwned": True or False,
1537 },
1538 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.
1539 { # Associates `members` with a `role`.
1540 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1541 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1542 #
1543 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1544 #
1545 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1546 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001547 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001548 #
1549 #
1550 #
1551 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1552 #
1553 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1554 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001555 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1556 #
1557 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1558 #
1559 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1560 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001561 #
1562 #
1563 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1564 "A String",
1565 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001566 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001567 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001568 # Example (Comparison):
1569 #
1570 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1571 #
1572 # Example (Equality):
1573 #
1574 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1575 #
1576 # Example (Logic):
1577 #
1578 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1579 #
1580 # Example (Data Manipulation):
1581 #
1582 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1583 #
1584 # 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.
1585 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001586 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001587 "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.
1588 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001589 },
1590 },
1591 ],
1592 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
1593 }
1594
1595
1596Returns:
1597 An object of the form:
1598
Dan O'Mearadd494642020-05-01 07:42:23 -07001599 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001600 #
1601 #
1602 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001603 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001604 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001605 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001606 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001607 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001608 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001609 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001610 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001611 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001612 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001613 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001614 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001615 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001616 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1617 { # 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.
1618 #
1619 # 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.
1620 #
1621 # Example Policy with multiple AuditConfigs:
1622 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001623 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001624 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001625 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001626 "exemptedMembers": [
1627 "A String",
1628 ],
1629 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1630 { # Provides the configuration for logging a type of permissions. Example:
1631 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001632 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001633 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001634 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001635 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1636 "A String",
1637 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001638 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001639 "logType": "A String", # The log type that this config enables.
1640 },
1641 ],
1642 "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.
1643 },
1644 ],
1645 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1646 { # A rule to be applied in a Policy.
1647 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1648 { # Specifies what kind of log the caller must write
1649 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1650 #
1651 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
1652 #
1653 # Field names correspond to IAM request parameters and field values are their respective values.
1654 #
1655 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
1656 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001657 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001658 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001659 "customFields": [ # Custom fields.
1660 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1661 "name": "A String", # Name is the field name.
1662 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1663 },
1664 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001665 "metric": "A String", # The metric to update.
1666 },
1667 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001668 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001669 },
1670 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1671 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1672 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1673 "permissionType": "A String", # The type of the permission that was checked.
1674 },
1675 },
1676 },
1677 ],
1678 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1679 "A String",
1680 ],
1681 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1682 "A String",
1683 ],
1684 "action": "A String", # Required
1685 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1686 "A String",
1687 ],
1688 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1689 { # A condition to be met.
1690 "iam": "A String", # Trusted attributes supplied by the IAM system.
1691 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1692 "values": [ # The objects of the condition.
1693 "A String",
1694 ],
1695 "svc": "A String", # Trusted attributes discharged by the service.
1696 "op": "A String", # An operator to apply the subject with.
1697 },
1698 ],
1699 "description": "A String", # Human-readable description of the rule.
1700 },
1701 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001702 "version": 42, # Specifies the format of the policy.
1703 #
1704 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1705 #
1706 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1707 #
1708 # * 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
1709 #
1710 # **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.
1711 #
1712 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001713 "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.
1714 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001715 # **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.
1716 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001717 { # Associates `members` with a `role`.
1718 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1719 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1720 #
1721 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1722 #
1723 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1724 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001725 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001726 #
1727 #
1728 #
1729 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1730 #
1731 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1732 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001733 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1734 #
1735 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1736 #
1737 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1738 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001739 #
1740 #
1741 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1742 "A String",
1743 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001744 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001745 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001746 # Example (Comparison):
1747 #
1748 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1749 #
1750 # Example (Equality):
1751 #
1752 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1753 #
1754 # Example (Logic):
1755 #
1756 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1757 #
1758 # Example (Data Manipulation):
1759 #
1760 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1761 #
1762 # 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.
1763 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001764 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001765 "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.
1766 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001767 },
1768 },
1769 ],
1770 "iamOwned": True or False,
1771 }</pre>
1772</div>
1773
1774<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001775 <code class="details" id="setLabels">setLabels(project, region, resource, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001776 <pre>Sets the labels on the target regional disk.
1777
1778Args:
1779 project: string, Project ID for this request. (required)
1780 region: string, The region for this request. (required)
1781 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001782 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001783 The object takes the form of:
1784
1785{
1786 "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.
1787 "labels": { # The labels to set for this resource.
1788 "a_key": "A String",
1789 },
1790 }
1791
1792 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.
1793
1794For 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.
1795
1796The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1797
1798Returns:
1799 An object of the form:
1800
1801 { # Represents an Operation resource.
1802 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001803 # Google Compute Engine has three Operation resources:
1804 #
1805 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1806 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001807 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1808 #
1809 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001810 # - For global operations, use the `globalOperations` resource.
1811 # - For regional operations, use the `regionOperations` resource.
1812 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001813 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001814 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001815 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1816 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1817 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001818 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001819 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1820 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001821 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1822 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001823 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001824 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001825 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001826 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001827 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1828 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1829 {
1830 "message": "A String", # [Output Only] A human-readable description of the warning code.
1831 "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.
1832 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1833 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1834 {
1835 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1836 "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).
1837 },
1838 ],
1839 },
1840 ],
1841 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001842 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001843 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001844 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1845 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001846 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001847 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1848 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1849 {
1850 "message": "A String", # [Output Only] An optional, human-readable error message.
1851 "code": "A String", # [Output Only] The error type identifier for this error.
1852 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1853 },
1854 ],
1855 },
1856 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1857 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001858 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001859 }</pre>
1860</div>
1861
1862<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001863 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001864 <pre>Returns permissions that a caller has on the specified resource.
1865
1866Args:
1867 project: string, Project ID for this request. (required)
1868 region: string, The name of the region for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001869 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001870 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001871 The object takes the form of:
1872
1873{
1874 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1875 "A String",
1876 ],
1877 }
1878
1879
1880Returns:
1881 An object of the form:
1882
1883 {
1884 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1885 "A String",
1886 ],
1887 }</pre>
1888</div>
1889
1890</body></html>