blob: 95c1144ca7b0d2ba434f9efb74ddad322137d396 [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.disks.html">disks</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, zone, 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 disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Retrieves an aggregated list of persistent disks.</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#close">close()</a></code></p>
88<p class="firstline">Close httplib2 connections.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#createSnapshot">createSnapshot(project, zone, disk, body=None, guestFlush=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Creates a snapshot of a specified persistent disk.</p>
92<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="#delete">delete(project, zone, disk, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.</p>
95<p class="toc_element">
96 <code><a href="#get">get(project, zone, disk)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400100<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#insert">insert(project, zone, body=None, requestId=None, sourceImage=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103<p class="firstline">Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700106<p class="firstline">Retrieves a list of persistent disks contained within the specified zone.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, disk, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Removes resource policies from a disk.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#resize">resize(project, zone, disk, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115<p class="firstline">Resizes the specified persistent disk. You can only increase the size of the disk.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400118<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setLabels">setLabels(project, zone, resource, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121<p class="firstline">Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700124<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700125<p class="toc_element">
126 <code><a href="#update">update(project, zone, disk, body=None, paths=None, requestId=None)</a></code></p>
127<p class="firstline">Update the specified disk with the data included in the request. Update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700128<h3>Method Details</h3>
129<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700130 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 <pre>Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
132
133Args:
134 project: string, Project ID for this request. (required)
135 zone: string, The name of the zone for this request. (required)
136 disk: string, The disk name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700137 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 The object takes the form of:
139
140{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800141 &quot;resourcePolicies&quot;: [ # Resource policies to be added to this disk. Currently you can only specify one policy here.
142 &quot;A String&quot;,
143 ],
144}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145
146 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
147
148For 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.
149
150The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
151
152Returns:
153 An object of the form:
154
155 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800156 #
157 # Google Compute Engine has three Operation resources:
158 #
159 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
160 #
161 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
162 #
163 # Operations can be global, regional or zonal.
164 # - For global operations, use the `globalOperations` resource.
165 # - For regional operations, use the `regionOperations` resource.
166 # - For zonal operations, use the `zonalOperations` resource.
167 #
168 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
169 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
170 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
171 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
172 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
173 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
174 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800176 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
177 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
178 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 },
180 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800181 },
182 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
183 &quot;httpErrorStatusCode&quot;: 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.
184 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
185 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
186 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
187 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800188 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800189 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
190 &quot;progress&quot;: 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.
191 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
192 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
193 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
194 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
195 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
196 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
197 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
198 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
199 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
200 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
201 {
202 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
203 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
204 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
205 {
206 &quot;key&quot;: &quot;A String&quot;, # [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).
207 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
208 },
209 ],
210 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
211 },
212 ],
213 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
214}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700215</div>
216
217<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700218 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700219 <pre>Retrieves an aggregated list of persistent disks.
220
221Args:
222 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700223 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 -0700224
Dan O'Mearadd494642020-05-01 07:42:23 -0700225For 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 -0700226
Dan O'Mearadd494642020-05-01 07:42:23 -0700227You 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 -0700228
Bu Sun Kim65020912020-05-20 12:08:20 -0700229To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 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`)
232 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
233
234You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
235
236Currently, only sorting by `name` or `creationTimestamp desc` is supported.
237 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800238 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700239
240Returns:
241 An object of the form:
242
243 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
245 &quot;items&quot;: { # A list of DisksScopedList resources.
246 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of disks.
247 &quot;disks&quot;: [ # [Output Only] A list of disks contained in this scope.
248 { # Represents a Persistent Disk resource.
249 #
250 # Google Compute Engine has two Disk resources:
251 #
252 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
253 #
254 # 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.
255 #
256 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
257 #
258 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
259 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
260 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
261 &quot;diskEncryptionKey&quot;: { # Encrypts the disk using a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800263 # 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).
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800265 # Customer-supplied encryption keys do not protect access to metadata of the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800267 # 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.
268 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
269 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
270 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
271 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800273 # The key must meet the following requirements before you can provide it to Compute Engine:
274 # - The key is wrapped using a RSA public key certificate provided by Google.
275 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
276 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
277 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700278 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800279 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
280 &quot;guestOsFeatures&quot;: [ # 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.
281 { # Guest OS features.
282 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700283 },
284 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800285 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
286 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
287 &quot;kind&quot;: &quot;compute#disk&quot;, # [Output Only] Type of the resource. Always compute#disk for disks.
288 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
289 #
290 # To see the latest fingerprint, make a get() request to retrieve a disk.
291 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the setLabels method.
292 &quot;a_key&quot;: &quot;A String&quot;,
293 },
294 &quot;lastAttachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last attach timestamp in RFC3339 text format.
295 &quot;lastDetachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last detach timestamp in RFC3339 text format.
296 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this disk.
297 &quot;A String&quot;,
298 ],
299 &quot;licenses&quot;: [ # A list of publicly visible licenses. Reserved for Google&#x27;s use.
300 &quot;A String&quot;,
301 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800302 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800303 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
304 &quot;name&quot;: &quot;A String&quot;, # 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.
305 &quot;options&quot;: &quot;A String&quot;, # Internal use only.
306 &quot;physicalBlockSizeBytes&quot;: &quot;A String&quot;, # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller&#x27;s project.
307 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
308 &quot;region&quot;: &quot;A String&quot;, # [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.
309 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
310 &quot;A String&quot;,
311 ],
312 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations.
313 &quot;A String&quot;,
314 ],
315 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
316 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
317 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource&#x27;s resource id.
318 &quot;sizeGb&quot;: &quot;A String&quot;, # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk.
319 #
320 # If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive.
321 &quot;sourceDisk&quot;: &quot;A String&quot;, # 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:
322 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800323 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800324 # - projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800325 # - projects/project/regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800326 # - zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800327 # - regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800328 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [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.
329 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image used to create this disk. If the source image is deleted, this field will not be set.
330 #
331 # 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:
332 # projects/debian-cloud/global/images/family/debian-9
333 #
334 #
335 # Alternatively, use a specific version of a public operating system image:
336 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
337 #
338 #
339 # To create a disk with a custom image that you created, specify the image name in the following format:
340 # global/images/my-custom-image
341 #
342 #
343 # 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:
344 # global/images/family/my-image-family
345 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
346 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
347 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
348 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
349 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
350 #
351 # The key must meet the following requirements before you can provide it to Compute Engine:
352 # - The key is wrapped using a RSA public key certificate provided by Google.
353 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
354 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
355 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
356 },
357 &quot;sourceImageId&quot;: &quot;A String&quot;, # [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.
358 &quot;sourceInPlaceSnapshot&quot;: &quot;A String&quot;, # [Deprecated] 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:
359 # - https://www.googleapis.com/compute/v1/projects/project/global/inPlaceSnapshots/inPlaceSnapshots
360 # - projects/project/global/inPlaceSnapshots/inPlaceSnapshots
361 # - global/inPlaceSnapshots/inPlaceSnapshots
362 &quot;sourceInPlaceSnapshotId&quot;: &quot;A String&quot;, # [Deprecated] [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.
363 &quot;sourceInstantSnapshot&quot;: &quot;A String&quot;, # The source instant 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:
364 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot
365 # - projects/project/zones/zone/instantSnapshots/instantSnapshot
366 # - zones/zone/instantSnapshots/instantSnapshot
367 &quot;sourceInstantSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used.
368 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # 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:
369 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
370 # - projects/project/global/snapshots/snapshot
371 # - global/snapshots/snapshot
372 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
373 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
374 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
375 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
376 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
377 #
378 # The key must meet the following requirements before you can provide it to Compute Engine:
379 # - The key is wrapped using a RSA public key certificate provided by Google.
380 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
381 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
382 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
383 },
384 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800385 &quot;sourceStorageObject&quot;: &quot;A String&quot;, # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
386 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of disk creation.
387 # - CREATING: Disk is provisioning.
388 # - RESTORING: Source data is being copied into the disk.
389 # - FAILED: Disk creation failed.
390 # - READY: Disk is ready for use.
391 # - DELETING: Disk is deleting.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800392 &quot;storageType&quot;: &quot;A String&quot;, # [Deprecated] Storage type of the persistent disk.
393 &quot;type&quot;: &quot;A String&quot;, # 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
394 &quot;userLicenses&quot;: [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license:
395 # https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
396 &quot;A String&quot;,
397 ],
398 &quot;users&quot;: [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
399 &quot;A String&quot;,
400 ],
401 &quot;zone&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700402 },
403 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800404 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of disks when the list is empty.
405 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
406 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
407 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
408 {
409 &quot;key&quot;: &quot;A String&quot;, # [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).
410 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
411 },
412 ],
413 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
414 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800416 },
417 &quot;kind&quot;: &quot;compute#diskAggregatedList&quot;, # [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks.
418 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
419 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
420 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
421 &quot;A String&quot;,
422 ],
423 &quot;warning&quot;: { # [Output Only] Informational warning message.
424 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
425 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
426 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
427 {
428 &quot;key&quot;: &quot;A String&quot;, # [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).
429 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
430 },
431 ],
432 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
433 },
434}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700435</div>
436
437<div class="method">
438 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
439 <pre>Retrieves the next page of results.
440
441Args:
442 previous_request: The request for the previous page. (required)
443 previous_response: The response from the request for the previous page. (required)
444
445Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700447 page. Returns None if there are no more items in the collection.
448 </pre>
449</div>
450
451<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700452 <code class="details" id="close">close()</code>
453 <pre>Close httplib2 connections.</pre>
454</div>
455
456<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body=None, guestFlush=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700458 <pre>Creates a snapshot of a specified persistent disk.
459
460Args:
461 project: string, Project ID for this request. (required)
462 zone: string, The name of the zone for this request. (required)
463 disk: string, Name of the persistent disk to snapshot. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700464 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700465 The object takes the form of:
466
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700467{ # Represents a Persistent Disk Snapshot resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800468 #
469 # 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 ==)
470 &quot;autoCreated&quot;: True or False, # [Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.
471 &quot;chainName&quot;: &quot;A String&quot;, # Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for advanced service owners who needs to create separate snapshot chains, for example, for chargeback tracking. When you describe your snapshot resource, this field is visible only if it has a non-empty value.
472 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
473 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
474 &quot;diskSizeGb&quot;: &quot;A String&quot;, # [Output Only] Size of the source disk, specified in GB.
475 &quot;downloadBytes&quot;: &quot;A String&quot;, # [Output Only] Number of bytes downloaded to restore a snapshot to a disk.
476 &quot;guestFlush&quot;: True or False, # [Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).
477 &quot;guestOsFeatures&quot;: [ # [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.
478 { # Guest OS features.
479 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
480 },
481 ],
482 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
483 &quot;kind&quot;: &quot;compute#snapshot&quot;, # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
484 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800486 # To see the latest fingerprint, make a get() request to retrieve a snapshot.
487 &quot;labels&quot;: { # Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.
488 &quot;a_key&quot;: &quot;A String&quot;,
489 },
490 &quot;licenseCodes&quot;: [ # [Output Only] Integer license codes indicating which licenses are attached to this snapshot.
491 &quot;A String&quot;,
492 ],
493 &quot;licenses&quot;: [ # [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).
494 &quot;A String&quot;,
495 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800496 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the snapshot close to other resources. This field is for use by internal tools that use the public API.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800497 &quot;name&quot;: &quot;A String&quot;, # 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.
498 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
499 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
500 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource&#x27;s resource id.
501 &quot;snapshotEncryptionKey&quot;: { # Encrypts the snapshot using a customer-supplied encryption key.
502 #
503 # 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.
504 #
505 # Customer-supplied encryption keys do not protect access to metadata of the snapshot.
506 #
507 # 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.
508 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
509 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
510 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
511 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
512 #
513 # The key must meet the following requirements before you can provide it to Compute Engine:
514 # - The key is wrapped using a RSA public key certificate provided by Google.
515 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
516 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
517 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
518 },
519 &quot;sourceDisk&quot;: &quot;A String&quot;, # The source disk used to create this snapshot.
520 &quot;sourceDiskEncryptionKey&quot;: { # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
521 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
522 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
523 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
524 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
525 #
526 # The key must meet the following requirements before you can provide it to Compute Engine:
527 # - The key is wrapped using a RSA public key certificate provided by Google.
528 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
529 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
530 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
531 },
532 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [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.
533 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
534 &quot;storageBytes&quot;: &quot;A String&quot;, # [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.
535 &quot;storageBytesStatus&quot;: &quot;A String&quot;, # [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.
536 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the snapshot (regional or multi-regional).
537 &quot;A String&quot;,
538 ],
539}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700540
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700541 guestFlush: boolean, [Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 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.
543
544For 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.
545
546The 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 -0700547
548Returns:
549 An object of the form:
550
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800552 #
553 # Google Compute Engine has three Operation resources:
554 #
555 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
556 #
557 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
558 #
559 # Operations can be global, regional or zonal.
560 # - For global operations, use the `globalOperations` resource.
561 # - For regional operations, use the `regionOperations` resource.
562 # - For zonal operations, use the `zonalOperations` resource.
563 #
564 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
565 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
566 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
567 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
568 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
569 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
570 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800572 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
573 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
574 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 },
576 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800577 },
578 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
579 &quot;httpErrorStatusCode&quot;: 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.
580 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
581 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
582 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
583 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800584 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800585 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
586 &quot;progress&quot;: 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.
587 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
588 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
589 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
590 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
591 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
592 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
593 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
594 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
595 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
596 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
597 {
598 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
599 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
600 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
601 {
602 &quot;key&quot;: &quot;A String&quot;, # [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).
603 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
604 },
605 ],
606 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
607 },
608 ],
609 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
610}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700611</div>
612
613<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400614 <code class="details" id="delete">delete(project, zone, disk, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700615 <pre>Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
616
617Args:
618 project: string, Project ID for this request. (required)
619 zone: string, The name of the zone for this request. (required)
620 disk: string, Name of the persistent disk to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700621 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.
622
623For 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.
624
625The 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 -0700626
627Returns:
628 An object of the form:
629
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800631 #
632 # Google Compute Engine has three Operation resources:
633 #
634 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
635 #
636 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
637 #
638 # Operations can be global, regional or zonal.
639 # - For global operations, use the `globalOperations` resource.
640 # - For regional operations, use the `regionOperations` resource.
641 # - For zonal operations, use the `zonalOperations` resource.
642 #
643 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
644 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
645 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
646 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
647 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
648 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
649 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800651 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
652 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
653 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 },
655 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800656 },
657 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
658 &quot;httpErrorStatusCode&quot;: 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.
659 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
660 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
661 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
662 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800663 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800664 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
665 &quot;progress&quot;: 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.
666 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
667 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
668 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
669 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
670 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
671 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
672 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
673 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
674 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
675 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
676 {
677 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
678 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
679 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
680 {
681 &quot;key&quot;: &quot;A String&quot;, # [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).
682 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
683 },
684 ],
685 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
686 },
687 ],
688 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
689}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700690</div>
691
692<div class="method">
693 <code class="details" id="get">get(project, zone, disk)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700694 <pre>Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700695
696Args:
697 project: string, Project ID for this request. (required)
698 zone: string, The name of the zone for this request. (required)
699 disk: string, Name of the persistent disk to return. (required)
700
701Returns:
702 An object of the form:
703
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700704 { # Represents a Persistent Disk resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800705 #
706 # Google Compute Engine has two Disk resources:
707 #
708 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
709 #
710 # 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.
711 #
712 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
713 #
714 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
715 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
716 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
717 &quot;diskEncryptionKey&quot;: { # Encrypts the disk using a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800719 # 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).
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800721 # Customer-supplied encryption keys do not protect access to metadata of the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800723 # 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.
724 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
725 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
726 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
727 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700728 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800729 # The key must meet the following requirements before you can provide it to Compute Engine:
730 # - The key is wrapped using a RSA public key certificate provided by Google.
731 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
732 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
733 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
734 },
735 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
736 &quot;guestOsFeatures&quot;: [ # 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.
737 { # Guest OS features.
738 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800740 ],
741 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
742 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
743 &quot;kind&quot;: &quot;compute#disk&quot;, # [Output Only] Type of the resource. Always compute#disk for disks.
744 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
745 #
746 # To see the latest fingerprint, make a get() request to retrieve a disk.
747 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the setLabels method.
748 &quot;a_key&quot;: &quot;A String&quot;,
749 },
750 &quot;lastAttachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last attach timestamp in RFC3339 text format.
751 &quot;lastDetachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last detach timestamp in RFC3339 text format.
752 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this disk.
753 &quot;A String&quot;,
754 ],
755 &quot;licenses&quot;: [ # A list of publicly visible licenses. Reserved for Google&#x27;s use.
756 &quot;A String&quot;,
757 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800758 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800759 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
760 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
761 &quot;options&quot;: &quot;A String&quot;, # Internal use only.
762 &quot;physicalBlockSizeBytes&quot;: &quot;A String&quot;, # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller&#x27;s project.
763 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
764 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
765 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
766 &quot;A String&quot;,
767 ],
768 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations.
769 &quot;A String&quot;,
770 ],
771 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
772 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
773 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource&#x27;s resource id.
774 &quot;sizeGb&quot;: &quot;A String&quot;, # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk.
775 #
776 # If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive.
777 &quot;sourceDisk&quot;: &quot;A String&quot;, # 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:
778 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800779 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800780 # - projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800781 # - projects/project/regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800782 # - zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800783 # - regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800784 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [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.
785 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image used to create this disk. If the source image is deleted, this field will not be set.
786 #
787 # 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:
788 # projects/debian-cloud/global/images/family/debian-9
789 #
790 #
791 # Alternatively, use a specific version of a public operating system image:
792 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
793 #
794 #
795 # To create a disk with a custom image that you created, specify the image name in the following format:
796 # global/images/my-custom-image
797 #
798 #
799 # 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:
800 # global/images/family/my-image-family
801 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
802 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
803 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
804 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
805 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800807 # The key must meet the following requirements before you can provide it to Compute Engine:
808 # - The key is wrapped using a RSA public key certificate provided by Google.
809 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
810 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
811 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
812 },
813 &quot;sourceImageId&quot;: &quot;A String&quot;, # [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.
814 &quot;sourceInPlaceSnapshot&quot;: &quot;A String&quot;, # [Deprecated] 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:
815 # - https://www.googleapis.com/compute/v1/projects/project/global/inPlaceSnapshots/inPlaceSnapshots
816 # - projects/project/global/inPlaceSnapshots/inPlaceSnapshots
817 # - global/inPlaceSnapshots/inPlaceSnapshots
818 &quot;sourceInPlaceSnapshotId&quot;: &quot;A String&quot;, # [Deprecated] [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.
819 &quot;sourceInstantSnapshot&quot;: &quot;A String&quot;, # The source instant 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:
820 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot
821 # - projects/project/zones/zone/instantSnapshots/instantSnapshot
822 # - zones/zone/instantSnapshots/instantSnapshot
823 &quot;sourceInstantSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used.
824 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # 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:
825 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
826 # - projects/project/global/snapshots/snapshot
827 # - global/snapshots/snapshot
828 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
829 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
830 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
831 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
832 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800834 # The key must meet the following requirements before you can provide it to Compute Engine:
835 # - The key is wrapped using a RSA public key certificate provided by Google.
836 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
837 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
838 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
839 },
840 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800841 &quot;sourceStorageObject&quot;: &quot;A String&quot;, # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
842 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of disk creation.
843 # - CREATING: Disk is provisioning.
844 # - RESTORING: Source data is being copied into the disk.
845 # - FAILED: Disk creation failed.
846 # - READY: Disk is ready for use.
847 # - DELETING: Disk is deleting.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800848 &quot;storageType&quot;: &quot;A String&quot;, # [Deprecated] Storage type of the persistent disk.
849 &quot;type&quot;: &quot;A String&quot;, # 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
850 &quot;userLicenses&quot;: [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license:
851 # https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
852 &quot;A String&quot;,
853 ],
854 &quot;users&quot;: [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
855 &quot;A String&quot;,
856 ],
857 &quot;zone&quot;: &quot;A String&quot;, # [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.
858}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700859</div>
860
861<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700862 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400863 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
864
865Args:
866 project: string, Project ID for this request. (required)
867 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700869 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400870
871Returns:
872 An object of the form:
873
Dan O'Mearadd494642020-05-01 07:42:23 -0700874 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800875 #
876 #
877 #
878 # 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.
879 #
880 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
881 #
882 # **JSON example:**
883 #
884 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
885 #
886 # **YAML example:**
887 #
888 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
889 #
890 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
891 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
892 { # 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.
893 #
894 # 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.
895 #
896 # Example Policy with multiple AuditConfigs:
897 #
898 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
899 #
900 # 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.
901 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
902 { # Provides the configuration for logging a type of permissions. Example:
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800904 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800906 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
907 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
908 &quot;A String&quot;,
909 ],
910 &quot;ignoreChildExemptions&quot;: True or False,
911 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700912 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800913 ],
914 &quot;exemptedMembers&quot;: [
915 &quot;A String&quot;,
916 ],
917 &quot;service&quot;: &quot;A String&quot;, # 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.
918 },
919 ],
920 &quot;bindings&quot;: [ # 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.
921 { # Associates `members` with a `role`.
922 &quot;bindingId&quot;: &quot;A String&quot;,
923 &quot;condition&quot;: { # 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.
924 #
925 # If the condition evaluates to `true`, then this binding applies to the current request.
926 #
927 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
928 #
929 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
930 #
931 # Example (Comparison):
932 #
933 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
934 #
935 # Example (Equality):
936 #
937 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
938 #
939 # Example (Logic):
940 #
941 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
942 #
943 # Example (Data Manipulation):
944 #
945 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
946 #
947 # 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.
948 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
949 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
950 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
951 &quot;title&quot;: &quot;A String&quot;, # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400952 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800953 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
954 #
955 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
956 #
957 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
958 #
959 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
960 #
961 #
962 #
963 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
964 #
965 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
966 #
967 # * `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.
968 #
969 # * `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.
970 #
971 # * `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.
972 #
973 #
974 #
975 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
976 &quot;A String&quot;,
977 ],
978 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
979 },
980 ],
981 &quot;etag&quot;: &quot;A String&quot;, # `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.
982 #
983 # **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.
984 &quot;iamOwned&quot;: True or False,
985 &quot;rules&quot;: [ # 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.
986 { # A rule to be applied in a Policy.
987 &quot;action&quot;: &quot;A String&quot;, # Required
988 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
989 { # A condition to be met.
990 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
991 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
992 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
993 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
994 &quot;values&quot;: [ # The objects of the condition.
995 &quot;A String&quot;,
996 ],
997 },
998 ],
999 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1000 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1001 &quot;A String&quot;,
1002 ],
1003 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1004 { # Specifies what kind of log the caller must write
1005 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1006 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1007 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1008 },
1009 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim65020912020-05-20 12:08:20 -07001010 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001011 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1012 #
1013 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1014 #
1015 # Field names correspond to IAM request parameters and field values are their respective values.
1016 #
1017 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1018 #
1019 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1020 &quot;customFields&quot;: [ # Custom fields.
1021 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1022 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1023 &quot;value&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001025 ],
1026 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1027 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
Bu Sun Kim65020912020-05-20 12:08:20 -07001028 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001029 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1030 &quot;logMode&quot;: &quot;A String&quot;,
1031 },
1032 },
1033 ],
1034 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1035 &quot;A String&quot;,
1036 ],
1037 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1038 &quot;A String&quot;,
1039 ],
1040 },
1041 ],
1042 &quot;version&quot;: 42, # Specifies the format of the policy.
1043 #
1044 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1045 #
1046 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1047 #
1048 # * 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
1049 #
1050 # **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.
1051 #
1052 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1053 #
1054 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1055}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001056</div>
1057
1058<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001059 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceImage=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001060 <pre>Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001061
1062Args:
1063 project: string, Project ID for this request. (required)
1064 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001065 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001066 The object takes the form of:
1067
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001068{ # Represents a Persistent Disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 #
1070 # Google Compute Engine has two Disk resources:
1071 #
1072 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
1073 #
1074 # 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.
1075 #
1076 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
1077 #
1078 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
1079 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1080 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001081 &quot;diskEncryptionKey&quot;: { # Encrypts the disk using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001082 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 # 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).
Dan O'Mearadd494642020-05-01 07:42:23 -07001084 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001085 # Customer-supplied encryption keys do not protect access to metadata of the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07001086 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 # 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.
1088 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1089 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1090 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1091 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1092 #
1093 # The key must meet the following requirements before you can provide it to Compute Engine:
1094 # - The key is wrapped using a RSA public key certificate provided by Google.
1095 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1096 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1097 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1098 },
1099 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
1100 &quot;guestOsFeatures&quot;: [ # 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.
1101 { # Guest OS features.
1102 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001103 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001104 ],
1105 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001106 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001107 &quot;kind&quot;: &quot;compute#disk&quot;, # [Output Only] Type of the resource. Always compute#disk for disks.
1108 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
1109 #
1110 # To see the latest fingerprint, make a get() request to retrieve a disk.
1111 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the setLabels method.
1112 &quot;a_key&quot;: &quot;A String&quot;,
1113 },
1114 &quot;lastAttachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last attach timestamp in RFC3339 text format.
1115 &quot;lastDetachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last detach timestamp in RFC3339 text format.
1116 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this disk.
1117 &quot;A String&quot;,
1118 ],
1119 &quot;licenses&quot;: [ # A list of publicly visible licenses. Reserved for Google&#x27;s use.
1120 &quot;A String&quot;,
1121 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001122 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001123 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
1124 &quot;name&quot;: &quot;A String&quot;, # 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.
1125 &quot;options&quot;: &quot;A String&quot;, # Internal use only.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001126 &quot;physicalBlockSizeBytes&quot;: &quot;A String&quot;, # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller&#x27;s project.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001127 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001128 &quot;region&quot;: &quot;A String&quot;, # [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.
1129 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1130 &quot;A String&quot;,
1131 ],
1132 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations.
1133 &quot;A String&quot;,
1134 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001135 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
1137 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource&#x27;s resource id.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001138 &quot;sizeGb&quot;: &quot;A String&quot;, # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001139 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001140 # If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive.
Bu Sun Kim65020912020-05-20 12:08:20 -07001141 &quot;sourceDisk&quot;: &quot;A String&quot;, # 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:
1142 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001143 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk
Bu Sun Kim65020912020-05-20 12:08:20 -07001144 # - projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001145 # - projects/project/regions/region/disks/disk
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 # - zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001147 # - regions/region/disks/disk
Bu Sun Kim65020912020-05-20 12:08:20 -07001148 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [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.
1149 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image used to create this disk. If the source image is deleted, this field will not be set.
1150 #
1151 # 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:
1152 # projects/debian-cloud/global/images/family/debian-9
1153 #
1154 #
1155 # Alternatively, use a specific version of a public operating system image:
1156 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1157 #
1158 #
1159 # To create a disk with a custom image that you created, specify the image name in the following format:
1160 # global/images/my-custom-image
1161 #
1162 #
1163 # 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:
1164 # global/images/family/my-image-family
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001165 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001166 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1167 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1168 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1169 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1170 #
1171 # The key must meet the following requirements before you can provide it to Compute Engine:
1172 # - The key is wrapped using a RSA public key certificate provided by Google.
1173 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1174 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1175 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1176 },
1177 &quot;sourceImageId&quot;: &quot;A String&quot;, # [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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001178 &quot;sourceInPlaceSnapshot&quot;: &quot;A String&quot;, # [Deprecated] 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:
Bu Sun Kim65020912020-05-20 12:08:20 -07001179 # - https://www.googleapis.com/compute/v1/projects/project/global/inPlaceSnapshots/inPlaceSnapshots
1180 # - projects/project/global/inPlaceSnapshots/inPlaceSnapshots
1181 # - global/inPlaceSnapshots/inPlaceSnapshots
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001182 &quot;sourceInPlaceSnapshotId&quot;: &quot;A String&quot;, # [Deprecated] [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.
1183 &quot;sourceInstantSnapshot&quot;: &quot;A String&quot;, # The source instant 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:
1184 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot
1185 # - projects/project/zones/zone/instantSnapshots/instantSnapshot
1186 # - zones/zone/instantSnapshots/instantSnapshot
1187 &quot;sourceInstantSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used.
Bu Sun Kim65020912020-05-20 12:08:20 -07001188 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # 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:
1189 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
1190 # - projects/project/global/snapshots/snapshot
1191 # - global/snapshots/snapshot
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001192 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001193 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1194 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1195 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1196 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1197 #
1198 # The key must meet the following requirements before you can provide it to Compute Engine:
1199 # - The key is wrapped using a RSA public key certificate provided by Google.
1200 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1201 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1202 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1203 },
1204 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001205 &quot;sourceStorageObject&quot;: &quot;A String&quot;, # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
1206 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of disk creation.
1207 # - CREATING: Disk is provisioning.
1208 # - RESTORING: Source data is being copied into the disk.
1209 # - FAILED: Disk creation failed.
1210 # - READY: Disk is ready for use.
1211 # - DELETING: Disk is deleting.
Bu Sun Kim65020912020-05-20 12:08:20 -07001212 &quot;storageType&quot;: &quot;A String&quot;, # [Deprecated] Storage type of the persistent disk.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001213 &quot;type&quot;: &quot;A String&quot;, # 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
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001214 &quot;userLicenses&quot;: [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license:
1215 # https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
1216 &quot;A String&quot;,
1217 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001218 &quot;users&quot;: [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
1219 &quot;A String&quot;,
1220 ],
1221 &quot;zone&quot;: &quot;A String&quot;, # [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.
1222}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001223
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001224 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.
1225
1226For 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.
1227
1228The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001229 sourceImage: string, Source image to restore onto a disk. This field is optional.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001230
1231Returns:
1232 An object of the form:
1233
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001234 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001235 #
1236 # Google Compute Engine has three Operation resources:
1237 #
1238 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1239 #
1240 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1241 #
1242 # Operations can be global, regional or zonal.
1243 # - For global operations, use the `globalOperations` resource.
1244 # - For regional operations, use the `regionOperations` resource.
1245 # - For zonal operations, use the `zonalOperations` resource.
1246 #
1247 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1248 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1249 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1250 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1251 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1252 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1253 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001254 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001255 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1256 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1257 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 },
1259 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001260 },
1261 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1262 &quot;httpErrorStatusCode&quot;: 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.
1263 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1264 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1265 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1266 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001267 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001268 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1269 &quot;progress&quot;: 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.
1270 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1271 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1272 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1273 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1274 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1275 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1276 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1277 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1278 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1279 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1280 {
1281 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1282 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1283 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1284 {
1285 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1286 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1287 },
1288 ],
1289 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1290 },
1291 ],
1292 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1293}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001294</div>
1295
1296<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001298 <pre>Retrieves a list of persistent disks contained within the specified zone.
1299
1300Args:
1301 project: string, Project ID for this request. (required)
1302 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001303 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 -07001304
Dan O'Mearadd494642020-05-01 07:42:23 -07001305For 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 -07001306
Dan O'Mearadd494642020-05-01 07:42:23 -07001307You 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 -07001308
Bu Sun Kim65020912020-05-20 12:08:20 -07001309To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1310 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`)
1311 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1312
1313You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
1314
1315Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1316 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001317 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001318
1319Returns:
1320 An object of the form:
1321
1322 { # A list of Disk resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001323 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1324 &quot;items&quot;: [ # A list of Disk resources.
1325 { # Represents a Persistent Disk resource.
1326 #
1327 # Google Compute Engine has two Disk resources:
1328 #
1329 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
1330 #
1331 # 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.
1332 #
1333 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
1334 #
1335 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
1336 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1337 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1338 &quot;diskEncryptionKey&quot;: { # Encrypts the disk using a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001339 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001340 # 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).
Bu Sun Kim65020912020-05-20 12:08:20 -07001341 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001342 # Customer-supplied encryption keys do not protect access to metadata of the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001343 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001344 # 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.
1345 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1346 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1347 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1348 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001349 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001350 # The key must meet the following requirements before you can provide it to Compute Engine:
1351 # - The key is wrapped using a RSA public key certificate provided by Google.
1352 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1353 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1354 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001355 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001356 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
1357 &quot;guestOsFeatures&quot;: [ # 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.
1358 { # Guest OS features.
1359 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001360 },
1361 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001362 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1363 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
1364 &quot;kind&quot;: &quot;compute#disk&quot;, # [Output Only] Type of the resource. Always compute#disk for disks.
1365 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
1366 #
1367 # To see the latest fingerprint, make a get() request to retrieve a disk.
1368 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the setLabels method.
1369 &quot;a_key&quot;: &quot;A String&quot;,
1370 },
1371 &quot;lastAttachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last attach timestamp in RFC3339 text format.
1372 &quot;lastDetachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last detach timestamp in RFC3339 text format.
1373 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this disk.
1374 &quot;A String&quot;,
1375 ],
1376 &quot;licenses&quot;: [ # A list of publicly visible licenses. Reserved for Google&#x27;s use.
1377 &quot;A String&quot;,
1378 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001379 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001380 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
1381 &quot;name&quot;: &quot;A String&quot;, # 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.
1382 &quot;options&quot;: &quot;A String&quot;, # Internal use only.
1383 &quot;physicalBlockSizeBytes&quot;: &quot;A String&quot;, # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller&#x27;s project.
1384 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
1385 &quot;region&quot;: &quot;A String&quot;, # [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.
1386 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1387 &quot;A String&quot;,
1388 ],
1389 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations.
1390 &quot;A String&quot;,
1391 ],
1392 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
1393 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
1394 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource&#x27;s resource id.
1395 &quot;sizeGb&quot;: &quot;A String&quot;, # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk.
1396 #
1397 # If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive.
1398 &quot;sourceDisk&quot;: &quot;A String&quot;, # 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:
1399 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001400 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001401 # - projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001402 # - projects/project/regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001403 # - zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001404 # - regions/region/disks/disk
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001405 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [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.
1406 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image used to create this disk. If the source image is deleted, this field will not be set.
1407 #
1408 # 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:
1409 # projects/debian-cloud/global/images/family/debian-9
1410 #
1411 #
1412 # Alternatively, use a specific version of a public operating system image:
1413 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1414 #
1415 #
1416 # To create a disk with a custom image that you created, specify the image name in the following format:
1417 # global/images/my-custom-image
1418 #
1419 #
1420 # 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:
1421 # global/images/family/my-image-family
1422 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1423 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1424 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1425 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1426 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1427 #
1428 # The key must meet the following requirements before you can provide it to Compute Engine:
1429 # - The key is wrapped using a RSA public key certificate provided by Google.
1430 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1431 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1432 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1433 },
1434 &quot;sourceImageId&quot;: &quot;A String&quot;, # [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.
1435 &quot;sourceInPlaceSnapshot&quot;: &quot;A String&quot;, # [Deprecated] 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:
1436 # - https://www.googleapis.com/compute/v1/projects/project/global/inPlaceSnapshots/inPlaceSnapshots
1437 # - projects/project/global/inPlaceSnapshots/inPlaceSnapshots
1438 # - global/inPlaceSnapshots/inPlaceSnapshots
1439 &quot;sourceInPlaceSnapshotId&quot;: &quot;A String&quot;, # [Deprecated] [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.
1440 &quot;sourceInstantSnapshot&quot;: &quot;A String&quot;, # The source instant 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:
1441 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot
1442 # - projects/project/zones/zone/instantSnapshots/instantSnapshot
1443 # - zones/zone/instantSnapshots/instantSnapshot
1444 &quot;sourceInstantSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used.
1445 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # 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:
1446 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
1447 # - projects/project/global/snapshots/snapshot
1448 # - global/snapshots/snapshot
1449 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
1450 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1451 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1452 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1453 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1454 #
1455 # The key must meet the following requirements before you can provide it to Compute Engine:
1456 # - The key is wrapped using a RSA public key certificate provided by Google.
1457 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1458 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1459 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1460 },
1461 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001462 &quot;sourceStorageObject&quot;: &quot;A String&quot;, # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
1463 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of disk creation.
1464 # - CREATING: Disk is provisioning.
1465 # - RESTORING: Source data is being copied into the disk.
1466 # - FAILED: Disk creation failed.
1467 # - READY: Disk is ready for use.
1468 # - DELETING: Disk is deleting.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001469 &quot;storageType&quot;: &quot;A String&quot;, # [Deprecated] Storage type of the persistent disk.
1470 &quot;type&quot;: &quot;A String&quot;, # 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
1471 &quot;userLicenses&quot;: [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license:
1472 # https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
1473 &quot;A String&quot;,
1474 ],
1475 &quot;users&quot;: [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
1476 &quot;A String&quot;,
1477 ],
1478 &quot;zone&quot;: &quot;A String&quot;, # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001479 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001480 ],
1481 &quot;kind&quot;: &quot;compute#diskList&quot;, # [Output Only] Type of resource. Always compute#diskList for lists of disks.
1482 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
1483 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1484 &quot;warning&quot;: { # [Output Only] Informational warning message.
1485 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1486 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1487 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1488 {
1489 &quot;key&quot;: &quot;A String&quot;, # [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).
1490 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1491 },
1492 ],
1493 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1494 },
1495}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001496</div>
1497
1498<div class="method">
1499 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1500 <pre>Retrieves the next page of results.
1501
1502Args:
1503 previous_request: The request for the previous page. (required)
1504 previous_response: The response from the request for the previous page. (required)
1505
1506Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001507 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001508 page. Returns None if there are no more items in the collection.
1509 </pre>
1510</div>
1511
1512<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001513 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 <pre>Removes resource policies from a disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001515
1516Args:
1517 project: string, Project ID for this request. (required)
1518 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 disk: string, The disk name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001520 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001521 The object takes the form of:
1522
1523{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001524 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this disk.
1525 &quot;A String&quot;,
1526 ],
1527}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001528
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001529 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.
1530
1531For 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.
1532
1533The 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 -07001534
1535Returns:
1536 An object of the form:
1537
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001538 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001539 #
1540 # Google Compute Engine has three Operation resources:
1541 #
1542 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1543 #
1544 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1545 #
1546 # Operations can be global, regional or zonal.
1547 # - For global operations, use the `globalOperations` resource.
1548 # - For regional operations, use the `regionOperations` resource.
1549 # - For zonal operations, use the `zonalOperations` resource.
1550 #
1551 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1552 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1553 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1554 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1555 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1556 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1557 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001558 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001559 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1560 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1561 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001562 },
1563 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001564 },
1565 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1566 &quot;httpErrorStatusCode&quot;: 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.
1567 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1568 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1569 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1570 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001571 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001572 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1573 &quot;progress&quot;: 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.
1574 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1575 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1576 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1577 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1578 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1579 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1580 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1581 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1582 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1583 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1584 {
1585 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1586 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1587 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1588 {
1589 &quot;key&quot;: &quot;A String&quot;, # [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).
1590 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1591 },
1592 ],
1593 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1594 },
1595 ],
1596 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1597}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001598</div>
1599
1600<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001601 <code class="details" id="resize">resize(project, zone, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602 <pre>Resizes the specified persistent disk. You can only increase the size of the disk.
1603
1604Args:
1605 project: string, Project ID for this request. (required)
1606 zone: string, The name of the zone for this request. (required)
1607 disk: string, The name of the persistent disk. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001608 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001609 The object takes the form of:
1610
1611{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001612 &quot;sizeGb&quot;: &quot;A String&quot;, # The new size of the persistent disk, which is specified in GB.
1613}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001614
1615 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.
1616
1617For 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.
1618
1619The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1620
1621Returns:
1622 An object of the form:
1623
1624 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001625 #
1626 # Google Compute Engine has three Operation resources:
1627 #
1628 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1629 #
1630 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1631 #
1632 # Operations can be global, regional or zonal.
1633 # - For global operations, use the `globalOperations` resource.
1634 # - For regional operations, use the `regionOperations` resource.
1635 # - For zonal operations, use the `zonalOperations` resource.
1636 #
1637 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1638 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1639 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1640 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1641 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1642 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1643 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001644 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001645 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1646 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1647 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001648 },
1649 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001650 },
1651 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1652 &quot;httpErrorStatusCode&quot;: 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.
1653 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1654 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1655 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1656 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001657 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001658 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1659 &quot;progress&quot;: 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.
1660 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1661 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1662 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1663 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1664 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1665 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1666 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1667 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1668 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1669 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1670 {
1671 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1672 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1673 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1674 {
1675 &quot;key&quot;: &quot;A String&quot;, # [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).
1676 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1677 },
1678 ],
1679 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1680 },
1681 ],
1682 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1683}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001684</div>
1685
1686<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001687 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001688 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1689
1690Args:
1691 project: string, Project ID for this request. (required)
1692 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001693 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001694 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001695 The object takes the form of:
1696
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001697{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001698 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1699 { # Associates `members` with a `role`.
1700 &quot;bindingId&quot;: &quot;A String&quot;,
1701 &quot;condition&quot;: { # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001702 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001703 # If the condition evaluates to `true`, then this binding applies to the current request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001704 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001705 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
Bu Sun Kim65020912020-05-20 12:08:20 -07001706 #
1707 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001708 #
1709 # Example (Comparison):
1710 #
1711 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1712 #
1713 # Example (Equality):
1714 #
1715 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1716 #
1717 # Example (Logic):
1718 #
1719 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1720 #
1721 # Example (Data Manipulation):
1722 #
1723 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1724 #
1725 # 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.
1726 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1727 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1728 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1729 &quot;title&quot;: &quot;A String&quot;, # 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.
1730 },
1731 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1732 #
1733 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1734 #
1735 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1736 #
1737 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1738 #
1739 #
1740 #
1741 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1742 #
1743 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1744 #
1745 # * `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.
1746 #
1747 # * `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.
1748 #
1749 # * `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.
1750 #
1751 #
1752 #
1753 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1754 &quot;A String&quot;,
1755 ],
1756 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001757 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001758 ],
1759 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
1760 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001761 #
1762 #
1763 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001764 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001765 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001766 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001767 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001768 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001769 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001770 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001771 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001772 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001773 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001774 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001775 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001776 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001777 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001778 { # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001779 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001780 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001781 #
1782 # Example Policy with multiple AuditConfigs:
1783 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001784 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001785 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001786 # 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 Kim65020912020-05-20 12:08:20 -07001787 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001788 { # Provides the configuration for logging a type of permissions. Example:
1789 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001790 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001791 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001792 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1793 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1794 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001795 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001796 &quot;ignoreChildExemptions&quot;: True or False,
1797 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001798 },
1799 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001800 &quot;exemptedMembers&quot;: [
1801 &quot;A String&quot;,
1802 ],
1803 &quot;service&quot;: &quot;A String&quot;, # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001804 },
1805 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001806 &quot;bindings&quot;: [ # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001807 { # Associates `members` with a `role`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001808 &quot;bindingId&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001809 &quot;condition&quot;: { # 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.
1810 #
1811 # If the condition evaluates to `true`, then this binding applies to the current request.
1812 #
1813 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1814 #
1815 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1816 #
1817 # Example (Comparison):
1818 #
1819 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1820 #
1821 # Example (Equality):
1822 #
1823 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1824 #
1825 # Example (Logic):
1826 #
1827 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1828 #
1829 # Example (Data Manipulation):
1830 #
1831 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1832 #
1833 # 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.
1834 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1835 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1836 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1837 &quot;title&quot;: &quot;A String&quot;, # 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.
1838 },
1839 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001840 #
1841 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1842 #
1843 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1844 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001845 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001846 #
1847 #
1848 #
1849 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1850 #
1851 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1852 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001853 # * `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.
1854 #
1855 # * `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.
1856 #
1857 # * `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.
1858 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001859 #
1860 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001861 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001862 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001863 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001864 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001865 },
1866 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001867 &quot;etag&quot;: &quot;A String&quot;, # `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.
1868 #
1869 # **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.
1870 &quot;iamOwned&quot;: True or False,
1871 &quot;rules&quot;: [ # 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.
1872 { # A rule to be applied in a Policy.
1873 &quot;action&quot;: &quot;A String&quot;, # Required
1874 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1875 { # A condition to be met.
1876 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1877 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1878 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1879 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1880 &quot;values&quot;: [ # The objects of the condition.
1881 &quot;A String&quot;,
1882 ],
1883 },
1884 ],
1885 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1886 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1887 &quot;A String&quot;,
1888 ],
1889 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1890 { # Specifies what kind of log the caller must write
1891 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1892 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1893 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1894 },
1895 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1896 },
1897 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1898 #
1899 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1900 #
1901 # Field names correspond to IAM request parameters and field values are their respective values.
1902 #
1903 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1904 #
1905 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1906 &quot;customFields&quot;: [ # Custom fields.
1907 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1908 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1909 &quot;value&quot;: &quot;A String&quot;, # 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.
1910 },
1911 ],
1912 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1913 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1914 },
1915 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1916 &quot;logMode&quot;: &quot;A String&quot;,
1917 },
1918 },
1919 ],
1920 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1921 &quot;A String&quot;,
1922 ],
1923 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1924 &quot;A String&quot;,
1925 ],
1926 },
1927 ],
1928 &quot;version&quot;: 42, # Specifies the format of the policy.
1929 #
1930 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1931 #
1932 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1933 #
1934 # * 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
1935 #
1936 # **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.
1937 #
1938 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1939 #
1940 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001941 },
1942}
1943
1944
1945Returns:
1946 An object of the form:
1947
1948 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
1949 #
1950 #
1951 #
1952 # 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.
1953 #
1954 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1955 #
1956 # **JSON example:**
1957 #
1958 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
1959 #
1960 # **YAML example:**
1961 #
1962 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
1963 #
1964 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1965 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1966 { # 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.
1967 #
1968 # 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.
1969 #
1970 # Example Policy with multiple AuditConfigs:
1971 #
1972 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
1973 #
1974 # 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.
1975 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1976 { # Provides the configuration for logging a type of permissions. Example:
1977 #
1978 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
1979 #
1980 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1981 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1982 &quot;A String&quot;,
1983 ],
1984 &quot;ignoreChildExemptions&quot;: True or False,
1985 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1986 },
1987 ],
1988 &quot;exemptedMembers&quot;: [
1989 &quot;A String&quot;,
1990 ],
1991 &quot;service&quot;: &quot;A String&quot;, # 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.
1992 },
1993 ],
1994 &quot;bindings&quot;: [ # 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.
1995 { # Associates `members` with a `role`.
1996 &quot;bindingId&quot;: &quot;A String&quot;,
1997 &quot;condition&quot;: { # 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.
1998 #
1999 # If the condition evaluates to `true`, then this binding applies to the current request.
2000 #
2001 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
2002 #
2003 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2004 #
2005 # Example (Comparison):
2006 #
2007 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
2008 #
2009 # Example (Equality):
2010 #
2011 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
2012 #
2013 # Example (Logic):
2014 #
2015 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2016 #
2017 # Example (Data Manipulation):
2018 #
2019 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2020 #
2021 # 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.
2022 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2023 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2024 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2025 &quot;title&quot;: &quot;A String&quot;, # 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.
2026 },
2027 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2028 #
2029 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2030 #
2031 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2032 #
2033 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2034 #
2035 #
2036 #
2037 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2038 #
2039 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2040 #
2041 # * `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.
2042 #
2043 # * `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.
2044 #
2045 # * `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.
2046 #
2047 #
2048 #
2049 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2050 &quot;A String&quot;,
2051 ],
2052 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2053 },
2054 ],
2055 &quot;etag&quot;: &quot;A String&quot;, # `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.
2056 #
2057 # **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.
2058 &quot;iamOwned&quot;: True or False,
2059 &quot;rules&quot;: [ # 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.
2060 { # A rule to be applied in a Policy.
2061 &quot;action&quot;: &quot;A String&quot;, # Required
2062 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2063 { # A condition to be met.
2064 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
2065 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
2066 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
2067 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2068 &quot;values&quot;: [ # The objects of the condition.
2069 &quot;A String&quot;,
2070 ],
2071 },
2072 ],
2073 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
2074 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
2075 &quot;A String&quot;,
2076 ],
2077 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2078 { # Specifies what kind of log the caller must write
2079 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
2080 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2081 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
2082 },
2083 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
2084 },
2085 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
2086 #
2087 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
2088 #
2089 # Field names correspond to IAM request parameters and field values are their respective values.
2090 #
2091 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
2092 #
2093 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
2094 &quot;customFields&quot;: [ # Custom fields.
2095 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2096 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2097 &quot;value&quot;: &quot;A String&quot;, # 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.
2098 },
2099 ],
2100 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2101 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
2102 },
2103 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2104 &quot;logMode&quot;: &quot;A String&quot;,
2105 },
2106 },
2107 ],
2108 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2109 &quot;A String&quot;,
2110 ],
2111 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
2112 &quot;A String&quot;,
2113 ],
2114 },
2115 ],
2116 &quot;version&quot;: 42, # Specifies the format of the policy.
2117 #
2118 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2119 #
2120 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2121 #
2122 # * 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
2123 #
2124 # **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.
2125 #
2126 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2127 #
2128 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2129}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002130</div>
2131
2132<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002133 <code class="details" id="setLabels">setLabels(project, zone, resource, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002134 <pre>Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002135
2136Args:
2137 project: string, Project ID for this request. (required)
2138 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002139 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002140 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002141 The object takes the form of:
2142
2143{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002144 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
2145 &quot;labels&quot;: { # The labels to set for this resource.
2146 &quot;a_key&quot;: &quot;A String&quot;,
2147 },
2148}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002149
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002150 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.
2151
2152For 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.
2153
2154The 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 -07002155
2156Returns:
2157 An object of the form:
2158
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002159 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002160 #
2161 # Google Compute Engine has three Operation resources:
2162 #
2163 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2164 #
2165 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2166 #
2167 # Operations can be global, regional or zonal.
2168 # - For global operations, use the `globalOperations` resource.
2169 # - For regional operations, use the `regionOperations` resource.
2170 # - For zonal operations, use the `zonalOperations` resource.
2171 #
2172 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2173 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2174 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2175 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2176 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2177 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2178 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002179 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002180 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2181 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2182 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002183 },
2184 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002185 },
2186 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2187 &quot;httpErrorStatusCode&quot;: 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.
2188 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2189 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2190 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2191 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002192 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002193 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2194 &quot;progress&quot;: 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.
2195 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2196 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2197 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2198 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2199 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2200 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2201 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2202 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
2203 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2204 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2205 {
2206 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2207 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2208 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2209 {
2210 &quot;key&quot;: &quot;A String&quot;, # [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).
2211 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2212 },
2213 ],
2214 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2215 },
2216 ],
2217 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2218}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002219</div>
2220
2221<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002222 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002223 <pre>Returns permissions that a caller has on the specified resource.
2224
2225Args:
2226 project: string, Project ID for this request. (required)
2227 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002228 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002229 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002230 The object takes the form of:
2231
2232{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002233 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
2234 &quot;A String&quot;,
2235 ],
2236}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002237
2238
2239Returns:
2240 An object of the form:
2241
2242 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002243 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2244 &quot;A String&quot;,
2245 ],
2246}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002247</div>
2248
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002249<div class="method">
2250 <code class="details" id="update">update(project, zone, disk, body=None, paths=None, requestId=None)</code>
2251 <pre>Update the specified disk with the data included in the request. Update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.
2252
2253Args:
2254 project: string, Project ID for this request. (required)
2255 zone: string, The name of the zone for this request. (required)
2256 disk: string, The disk name for this request. (required)
2257 body: object, The request body.
2258 The object takes the form of:
2259
2260{ # Represents a Persistent Disk resource.
2261 #
2262 # Google Compute Engine has two Disk resources:
2263 #
2264 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
2265 #
2266 # 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.
2267 #
2268 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
2269 #
2270 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
2271 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2272 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2273 &quot;diskEncryptionKey&quot;: { # Encrypts the disk using a customer-supplied encryption key.
2274 #
2275 # 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).
2276 #
2277 # Customer-supplied encryption keys do not protect access to metadata of the disk.
2278 #
2279 # 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.
2280 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2281 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2282 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2283 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2284 #
2285 # The key must meet the following requirements before you can provide it to Compute Engine:
2286 # - The key is wrapped using a RSA public key certificate provided by Google.
2287 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2288 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2289 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2290 },
2291 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
2292 &quot;guestOsFeatures&quot;: [ # 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.
2293 { # Guest OS features.
2294 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2295 },
2296 ],
2297 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2298 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
2299 &quot;kind&quot;: &quot;compute#disk&quot;, # [Output Only] Type of the resource. Always compute#disk for disks.
2300 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
2301 #
2302 # To see the latest fingerprint, make a get() request to retrieve a disk.
2303 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the setLabels method.
2304 &quot;a_key&quot;: &quot;A String&quot;,
2305 },
2306 &quot;lastAttachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last attach timestamp in RFC3339 text format.
2307 &quot;lastDetachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last detach timestamp in RFC3339 text format.
2308 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this disk.
2309 &quot;A String&quot;,
2310 ],
2311 &quot;licenses&quot;: [ # A list of publicly visible licenses. Reserved for Google&#x27;s use.
2312 &quot;A String&quot;,
2313 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002314 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the disk close to other resources. This field is for use by internal tools that use the public API.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002315 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
2316 &quot;name&quot;: &quot;A String&quot;, # 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.
2317 &quot;options&quot;: &quot;A String&quot;, # Internal use only.
2318 &quot;physicalBlockSizeBytes&quot;: &quot;A String&quot;, # Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller&#x27;s project.
2319 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
2320 &quot;region&quot;: &quot;A String&quot;, # [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.
2321 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
2322 &quot;A String&quot;,
2323 ],
2324 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations.
2325 &quot;A String&quot;,
2326 ],
2327 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
2328 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
2329 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource&#x27;s resource id.
2330 &quot;sizeGb&quot;: &quot;A String&quot;, # Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk.
2331 #
2332 # If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive.
2333 &quot;sourceDisk&quot;: &quot;A String&quot;, # 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:
2334 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002335 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/disks/disk
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002336 # - projects/project/zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002337 # - projects/project/regions/region/disks/disk
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002338 # - zones/zone/disks/disk
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002339 # - regions/region/disks/disk
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002340 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [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.
2341 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image used to create this disk. If the source image is deleted, this field will not be set.
2342 #
2343 # 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:
2344 # projects/debian-cloud/global/images/family/debian-9
2345 #
2346 #
2347 # Alternatively, use a specific version of a public operating system image:
2348 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
2349 #
2350 #
2351 # To create a disk with a custom image that you created, specify the image name in the following format:
2352 # global/images/my-custom-image
2353 #
2354 #
2355 # 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:
2356 # global/images/family/my-image-family
2357 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
2358 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2359 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2360 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2361 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2362 #
2363 # The key must meet the following requirements before you can provide it to Compute Engine:
2364 # - The key is wrapped using a RSA public key certificate provided by Google.
2365 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2366 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2367 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2368 },
2369 &quot;sourceImageId&quot;: &quot;A String&quot;, # [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.
2370 &quot;sourceInPlaceSnapshot&quot;: &quot;A String&quot;, # [Deprecated] 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:
2371 # - https://www.googleapis.com/compute/v1/projects/project/global/inPlaceSnapshots/inPlaceSnapshots
2372 # - projects/project/global/inPlaceSnapshots/inPlaceSnapshots
2373 # - global/inPlaceSnapshots/inPlaceSnapshots
2374 &quot;sourceInPlaceSnapshotId&quot;: &quot;A String&quot;, # [Deprecated] [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.
2375 &quot;sourceInstantSnapshot&quot;: &quot;A String&quot;, # The source instant 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:
2376 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instantSnapshots/instantSnapshot
2377 # - projects/project/zones/zone/instantSnapshots/instantSnapshot
2378 # - zones/zone/instantSnapshots/instantSnapshot
2379 &quot;sourceInstantSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The unique ID of the instant snapshot used to create this disk. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact version of the instant snapshot that was used.
2380 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # 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:
2381 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
2382 # - projects/project/global/snapshots/snapshot
2383 # - global/snapshots/snapshot
2384 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
2385 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2386 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2387 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2388 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2389 #
2390 # The key must meet the following requirements before you can provide it to Compute Engine:
2391 # - The key is wrapped using a RSA public key certificate provided by Google.
2392 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2393 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2394 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2395 },
2396 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002397 &quot;sourceStorageObject&quot;: &quot;A String&quot;, # The full Google Cloud Storage URI where the disk image is stored. This file must be a gzip-compressed tarball whose name ends in .tar.gz or virtual machine disk whose name ends in vmdk. Valid URIs may start with gs:// or https://storage.googleapis.com/. This flag is not optimized for creating multiple disks from a source storage object. To create many disks from a source storage object, use gcloud compute images import instead.
2398 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of disk creation.
2399 # - CREATING: Disk is provisioning.
2400 # - RESTORING: Source data is being copied into the disk.
2401 # - FAILED: Disk creation failed.
2402 # - READY: Disk is ready for use.
2403 # - DELETING: Disk is deleting.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002404 &quot;storageType&quot;: &quot;A String&quot;, # [Deprecated] Storage type of the persistent disk.
2405 &quot;type&quot;: &quot;A String&quot;, # 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
2406 &quot;userLicenses&quot;: [ # A list of publicly visible user-licenses. Unlike regular licenses, user provided licenses can be modified after the disk is created. This includes a list of URLs to the license resource. For example, to provide a debian license:
2407 # https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch
2408 &quot;A String&quot;,
2409 ],
2410 &quot;users&quot;: [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
2411 &quot;A String&quot;,
2412 ],
2413 &quot;zone&quot;: &quot;A String&quot;, # [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.
2414}
2415
2416 paths: string, The set of field mask paths. (repeated)
2417 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.
2418
2419For 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.
2420
2421The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2422
2423Returns:
2424 An object of the form:
2425
2426 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002427 #
2428 # Google Compute Engine has three Operation resources:
2429 #
2430 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2431 #
2432 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2433 #
2434 # Operations can be global, regional or zonal.
2435 # - For global operations, use the `globalOperations` resource.
2436 # - For regional operations, use the `regionOperations` resource.
2437 # - For zonal operations, use the `zonalOperations` resource.
2438 #
2439 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2440 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2441 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2442 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2443 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2444 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2445 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002446 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002447 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2448 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2449 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002450 },
2451 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002452 },
2453 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2454 &quot;httpErrorStatusCode&quot;: 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.
2455 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2456 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2457 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2458 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002459 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002460 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2461 &quot;progress&quot;: 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.
2462 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2463 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2464 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2465 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2466 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2467 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2468 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2469 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
2470 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2471 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2472 {
2473 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2474 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2475 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2476 {
2477 &quot;key&quot;: &quot;A String&quot;, # [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).
2478 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2479 },
2480 ],
2481 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2482 },
2483 ],
2484 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2485}</pre>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002486</div>
2487
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002488</body></html>