blob: 088084e846264b2a30b4fd6e339d4c37152fba0d [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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_beta.html">Compute Engine API</a> . <a href="compute_beta.regionDisks.html">regionDisks</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addResourcePolicies">addResourcePolicies(project, region, disk, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#createSnapshot">createSnapshot(project, region, disk, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Creates a snapshot of this regional disk.</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(project, region, disk, requestId=None)</a></code></p>
85<p class="firstline">Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, disk)</a></code></p>
88<p class="firstline">Returns a specified regional persistent disk.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, region, body=None, requestId=None, sourceImage=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Creates a persistent regional disk in the specified project using the data included in the request.</p>
95<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Retrieves the list of persistent disks contained within the specified region.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, region, disk, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Removes resource policies from a regional disk.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#resize">resize(project, region, disk, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Resizes the specified regional persistent disk.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#setIamPolicy">setIamPolicy(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#setLabels">setLabels(project, region, resource, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Sets the labels on the target regional disk.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<h3>Method Details</h3>
117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code class="details" id="addResourcePolicies">addResourcePolicies(project, region, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 <pre>Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
120
121Args:
122 project: string, Project ID for this request. (required)
123 region: string, The name of the region for this request. (required)
124 disk: string, The disk name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 The object takes the form of:
127
128{
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 &quot;resourcePolicies&quot;: [ # Resource policies to be added to this disk.
130 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 ],
132 }
133
134 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
135
136For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
137
138The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
139
140Returns:
141 An object of the form:
142
143 { # Represents an Operation resource.
144 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 # Google Compute Engine has three Operation resources:
146 #
147 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
148 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
150 #
151 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700152 # - For global operations, use the `globalOperations` resource.
153 # - For regional operations, use the `regionOperations` resource.
154 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
158 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
159 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
160 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
161 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
162 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
165 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
166 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 },
168 ],
169 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 &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`.
171 &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.
172 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
173 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
174 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
175 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
176 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
177 &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.
178 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
179 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
180 &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.
181 &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`.
182 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
183 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
184 &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.
185 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
186 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
187 {
188 &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.
189 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
190 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
191 {
192 &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).
193 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
194 },
195 ],
196 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
197 },
198 ],
199 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 }</pre>
201</div>
202
203<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 <code class="details" id="createSnapshot">createSnapshot(project, region, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205 <pre>Creates a snapshot of this regional disk.
206
207Args:
208 project: string, Project ID for this request. (required)
209 region: string, Name of the region for this request. (required)
210 disk: string, Name of the regional persistent disk to snapshot. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700211 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 The object takes the form of:
213
214{ # Represents a Persistent Disk Snapshot resource.
215 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700216 # You can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for {$api_version}.snapshots ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 &quot;autoCreated&quot;: True or False, # [Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.
218 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
219 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
220 &quot;diskSizeGb&quot;: &quot;A String&quot;, # [Output Only] Size of the source disk, specified in GB.
221 &quot;downloadBytes&quot;: &quot;A String&quot;, # [Output Only] Number of bytes downloaded to restore a snapshot to a disk.
222 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
223 &quot;kind&quot;: &quot;compute#snapshot&quot;, # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
224 &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.
225 #
226 # To see the latest fingerprint, make a get() request to retrieve a snapshot.
227 &quot;labels&quot;: { # Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.
228 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 &quot;licenseCodes&quot;: [ # [Output Only] Integer license codes indicating which licenses are attached to this snapshot.
231 &quot;A String&quot;,
232 ],
233 &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).
234 &quot;A String&quot;,
235 ],
236 &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.
237 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
238 &quot;snapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the snapshot using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 #
240 # 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.
241 #
242 # Customer-supplied encryption keys do not protect access to metadata of the snapshot.
243 #
244 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
246 &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.
247 &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.
248 &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 -0700249 #
250 # The key must meet the following requirements before you can provide it to Compute Engine:
251 # - The key is wrapped using a RSA public key certificate provided by Google.
252 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
253 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 &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 Kim715bd7f2019-06-14 16:50:42 -0700255 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 &quot;sourceDisk&quot;: &quot;A String&quot;, # [Output Only] The source disk used to create this snapshot.
257 &quot;sourceDiskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
258 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
259 &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.
260 &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.
261 &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.
262 #
263 # The key must meet the following requirements before you can provide it to Compute Engine:
264 # - The key is wrapped using a RSA public key certificate provided by Google.
265 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
266 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
267 &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 Kim715bd7f2019-06-14 16:50:42 -0700268 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &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.
270 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
271 &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.
272 &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.
273 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the snapshot (regional or multi-regional).
274 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 ],
276 }
277
278 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.
279
280For 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.
281
282The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
283
284Returns:
285 An object of the form:
286
287 { # Represents an Operation resource.
288 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700289 # Google Compute Engine has three Operation resources:
290 #
291 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
292 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700293 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
294 #
295 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700296 # - For global operations, use the `globalOperations` resource.
297 # - For regional operations, use the `regionOperations` resource.
298 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
302 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
303 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
304 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
305 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
306 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
309 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
310 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311 },
312 ],
313 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 &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`.
315 &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.
316 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
317 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
318 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
319 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
320 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
321 &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.
322 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
323 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
324 &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.
325 &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`.
326 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
327 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
328 &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.
329 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
330 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
331 {
332 &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.
333 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
334 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
335 {
336 &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).
337 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
338 },
339 ],
340 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
341 },
342 ],
343 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700344 }</pre>
345</div>
346
347<div class="method">
348 <code class="details" id="delete">delete(project, region, disk, requestId=None)</code>
349 <pre>Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
350
351Args:
352 project: string, Project ID for this request. (required)
353 region: string, Name of the region for this request. (required)
354 disk: string, Name of the regional persistent disk to delete. (required)
355 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.
356
357For 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.
358
359The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
360
361Returns:
362 An object of the form:
363
364 { # Represents an Operation resource.
365 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 # Google Compute Engine has three Operation resources:
367 #
368 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
369 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
371 #
372 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700373 # - For global operations, use the `globalOperations` resource.
374 # - For regional operations, use the `regionOperations` resource.
375 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700377 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
379 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
380 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
381 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
382 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
383 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700385 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
386 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
387 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 },
389 ],
390 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 &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`.
392 &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.
393 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
394 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
395 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
396 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
397 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
398 &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.
399 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
400 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
401 &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.
402 &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`.
403 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
404 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
405 &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.
406 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
407 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
408 {
409 &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.
410 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
411 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
412 {
413 &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).
414 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
415 },
416 ],
417 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
418 },
419 ],
420 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700421 }</pre>
422</div>
423
424<div class="method">
425 <code class="details" id="get">get(project, region, disk)</code>
426 <pre>Returns a specified regional persistent disk.
427
428Args:
429 project: string, Project ID for this request. (required)
430 region: string, Name of the region for this request. (required)
431 disk: string, Name of the regional persistent disk to return. (required)
432
433Returns:
434 An object of the form:
435
436 { # Represents a Persistent Disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 #
438 # Google Compute Engine has two Disk resources:
439 #
440 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
441 #
442 # 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.
443 #
444 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
445 #
446 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
447 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
448 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
449 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 # 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 -0700452 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700453 # Customer-supplied encryption keys do not protect access to metadata of the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -0700454 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 # 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.
456 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
457 &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.
458 &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.
459 &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.
460 #
461 # The key must meet the following requirements before you can provide it to Compute Engine:
462 # - The key is wrapped using a RSA public key certificate provided by Google.
463 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
464 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
465 &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.
466 },
467 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
468 &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.
469 { # Guest OS features.
470 &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 -0700471 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 ],
473 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
474 &quot;kind&quot;: &quot;compute#disk&quot;, # [Output Only] Type of the resource. Always compute#disk for disks.
475 &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.
476 #
477 # To see the latest fingerprint, make a get() request to retrieve a disk.
478 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the setLabels method.
479 &quot;a_key&quot;: &quot;A String&quot;,
480 },
481 &quot;lastAttachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last attach timestamp in RFC3339 text format.
482 &quot;lastDetachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last detach timestamp in RFC3339 text format.
483 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this disk.
484 &quot;A String&quot;,
485 ],
486 &quot;licenses&quot;: [ # A list of publicly visible licenses. Reserved for Google&#x27;s use.
487 &quot;A String&quot;,
488 ],
489 &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.
490 &quot;options&quot;: &quot;A String&quot;, # Internal use only.
491 &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. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller&#x27;s project.
492 &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.
493 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
494 &quot;A String&quot;,
495 ],
496 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations.
497 &quot;A String&quot;,
498 ],
499 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
500 &quot;sizeGb&quot;: &quot;A String&quot;, # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
501 #
502 # If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.
503 &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.
504 #
505 # 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:
506 # projects/debian-cloud/global/images/family/debian-9
507 #
508 #
509 # Alternatively, use a specific version of a public operating system image:
510 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
511 #
512 #
513 # To create a disk with a custom image that you created, specify the image name in the following format:
514 # global/images/my-custom-image
515 #
516 #
517 # 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:
518 # global/images/family/my-image-family
519 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
520 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
521 &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.
522 &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.
523 &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 -0700524 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700525 # The key must meet the following requirements before you can provide it to Compute Engine:
526 # - The key is wrapped using a RSA public key certificate provided by Google.
527 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
528 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
529 &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.
530 },
531 &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.
532 &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:
533 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
534 # - projects/project/global/snapshots/snapshot
535 # - global/snapshots/snapshot
536 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
537 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
538 &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.
539 &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.
540 &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 -0700541 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700542 # The key must meet the following requirements before you can provide it to Compute Engine:
543 # - The key is wrapped using a RSA public key certificate provided by Google.
544 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
545 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
546 &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.
547 },
548 &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.
549 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.
550 &quot;storageType&quot;: &quot;A String&quot;, # [Deprecated] Storage type of the persistent disk.
551 &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
552 &quot;users&quot;: [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
553 &quot;A String&quot;,
554 ],
555 &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.
556 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557</div>
558
559<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 <code class="details" id="getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
562
563Args:
564 project: string, Project ID for this request. (required)
565 region: string, The name of the region for this request. (required)
566 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700567 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700568
569Returns:
570 An object of the form:
571
Dan O'Mearadd494642020-05-01 07:42:23 -0700572 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 #
574 #
575 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700576 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700577 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 # 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700579 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700580 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700581 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700582 # { &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 -0700583 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700584 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700586 # 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 -0700587 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700588 # 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 -0700589 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700590 { # 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.
591 #
592 # 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.
593 #
594 # Example Policy with multiple AuditConfigs:
595 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 # { &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; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700598 # 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 -0700599 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 { # Provides the configuration for logging a type of permissions. Example:
601 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 # { &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 Kim715bd7f2019-06-14 16:50:42 -0700603 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
605 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
606 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700608 &quot;ignoreChildExemptions&quot;: True or False,
609 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 },
611 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700612 &quot;exemptedMembers&quot;: [
613 &quot;A String&quot;,
614 ],
615 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 },
617 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700620 &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.
621 #
622 # If the condition evaluates to `true`, then this binding applies to the current request.
623 #
624 # 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.
625 #
626 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
627 #
628 # Example (Comparison):
629 #
630 # 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;
631 #
632 # Example (Equality):
633 #
634 # 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;
635 #
636 # Example (Logic):
637 #
638 # 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;
639 #
640 # Example (Data Manipulation):
641 #
642 # 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;
643 #
644 # 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.
645 &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.
646 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
647 &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.
648 &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.
649 },
650 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700651 #
652 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
653 #
654 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
655 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 #
658 #
659 #
660 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
661 #
662 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
663 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700664 # * `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.
665 #
666 # * `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.
667 #
668 # * `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.
669 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 #
671 #
672 # * `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 -0700673 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 },
677 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700678 &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.
679 #
680 # **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.
681 &quot;iamOwned&quot;: True or False,
682 &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.
683 { # A rule to be applied in a Policy.
684 &quot;action&quot;: &quot;A String&quot;, # Required
685 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
686 { # A condition to be met.
687 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
688 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
689 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
690 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
691 &quot;values&quot;: [ # The objects of the condition.
692 &quot;A String&quot;,
693 ],
694 },
695 ],
696 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
697 &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.
698 &quot;A String&quot;,
699 ],
700 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
701 { # Specifies what kind of log the caller must write
702 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
703 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
704 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
705 },
706 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
707 },
708 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
709 #
710 # 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.
711 #
712 # Field names correspond to IAM request parameters and field values are their respective values.
713 #
714 # 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.
715 #
716 # 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]}
717 &quot;customFields&quot;: [ # Custom fields.
718 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
719 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
720 &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.
721 },
722 ],
723 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
724 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
725 },
726 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
727 &quot;logMode&quot;: &quot;A String&quot;,
728 },
729 },
730 ],
731 &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.
732 &quot;A String&quot;,
733 ],
734 &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.
735 &quot;A String&quot;,
736 ],
737 },
738 ],
739 &quot;version&quot;: 42, # Specifies the format of the policy.
740 #
741 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
742 #
743 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
744 #
745 # * 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
746 #
747 # **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.
748 #
749 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
750 #
751 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700752 }</pre>
753</div>
754
755<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700756 <code class="details" id="insert">insert(project, region, body=None, requestId=None, sourceImage=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700757 <pre>Creates a persistent regional disk in the specified project using the data included in the request.
758
759Args:
760 project: string, Project ID for this request. (required)
761 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700762 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 The object takes the form of:
764
765{ # Represents a Persistent Disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 #
767 # Google Compute Engine has two Disk resources:
768 #
769 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
770 #
771 # 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.
772 #
773 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
774 #
775 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
776 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
777 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
778 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700780 # 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 -0700781 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700782 # Customer-supplied encryption keys do not protect access to metadata of the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -0700783 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 # 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.
785 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
786 &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.
787 &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.
788 &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.
789 #
790 # The key must meet the following requirements before you can provide it to Compute Engine:
791 # - The key is wrapped using a RSA public key certificate provided by Google.
792 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
793 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
794 &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.
795 },
796 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
797 &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.
798 { # Guest OS features.
799 &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 -0700800 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 ],
802 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
803 &quot;kind&quot;: &quot;compute#disk&quot;, # [Output Only] Type of the resource. Always compute#disk for disks.
804 &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.
805 #
806 # To see the latest fingerprint, make a get() request to retrieve a disk.
807 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the setLabels method.
808 &quot;a_key&quot;: &quot;A String&quot;,
809 },
810 &quot;lastAttachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last attach timestamp in RFC3339 text format.
811 &quot;lastDetachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last detach timestamp in RFC3339 text format.
812 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this disk.
813 &quot;A String&quot;,
814 ],
815 &quot;licenses&quot;: [ # A list of publicly visible licenses. Reserved for Google&#x27;s use.
816 &quot;A String&quot;,
817 ],
818 &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.
819 &quot;options&quot;: &quot;A String&quot;, # Internal use only.
820 &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. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller&#x27;s project.
821 &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.
822 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
823 &quot;A String&quot;,
824 ],
825 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations.
826 &quot;A String&quot;,
827 ],
828 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
829 &quot;sizeGb&quot;: &quot;A String&quot;, # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
830 #
831 # If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.
832 &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.
833 #
834 # 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:
835 # projects/debian-cloud/global/images/family/debian-9
836 #
837 #
838 # Alternatively, use a specific version of a public operating system image:
839 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
840 #
841 #
842 # To create a disk with a custom image that you created, specify the image name in the following format:
843 # global/images/my-custom-image
844 #
845 #
846 # 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:
847 # global/images/family/my-image-family
848 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
849 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
850 &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.
851 &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.
852 &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.
853 #
854 # The key must meet the following requirements before you can provide it to Compute Engine:
855 # - The key is wrapped using a RSA public key certificate provided by Google.
856 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
857 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
858 &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.
859 },
860 &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.
861 &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:
862 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
863 # - projects/project/global/snapshots/snapshot
864 # - global/snapshots/snapshot
865 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
866 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
867 &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.
868 &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.
869 &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.
870 #
871 # The key must meet the following requirements before you can provide it to Compute Engine:
872 # - The key is wrapped using a RSA public key certificate provided by Google.
873 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
874 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
875 &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.
876 },
877 &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.
878 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.
879 &quot;storageType&quot;: &quot;A String&quot;, # [Deprecated] Storage type of the persistent disk.
880 &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
881 &quot;users&quot;: [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
882 &quot;A String&quot;,
883 ],
884 &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.
885}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886
887 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.
888
889For 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.
890
891The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
892 sourceImage: string, Optional. Source image to restore onto a disk.
893
894Returns:
895 An object of the form:
896
897 { # Represents an Operation resource.
898 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700899 # Google Compute Engine has three Operation resources:
900 #
901 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
902 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700903 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
904 #
905 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700906 # - For global operations, use the `globalOperations` resource.
907 # - For regional operations, use the `regionOperations` resource.
908 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
912 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
913 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
914 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
915 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
916 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700917 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
919 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
920 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700921 },
922 ],
923 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700924 &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`.
925 &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.
926 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
927 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
928 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
929 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
930 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
931 &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.
932 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
933 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
934 &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.
935 &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`.
936 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
937 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
938 &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.
939 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
940 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
941 {
942 &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.
943 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
944 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
945 {
946 &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).
947 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
948 },
949 ],
950 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
951 },
952 ],
953 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700954 }</pre>
955</div>
956
957<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 <pre>Retrieves the list of persistent disks contained within the specified region.
960
961Args:
962 project: string, Project ID for this request. (required)
963 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 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;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700965
Dan O'Mearadd494642020-05-01 07:42:23 -0700966For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967
Dan O'Mearadd494642020-05-01 07:42:23 -0700968You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700969
Bu Sun Kim65020912020-05-20 12:08:20 -0700970To 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) ```
971 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`)
972 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
973
974You 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.
975
976Currently, only sorting by `name` or `creationTimestamp desc` is supported.
977 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978
979Returns:
980 An object of the form:
981
982 { # A list of Disk resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700983 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
984 &quot;items&quot;: [ # A list of Disk resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 { # Represents a Persistent Disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 #
987 # Google Compute Engine has two Disk resources:
988 #
989 # * [Zonal](/compute/docs/reference/rest/{$api_version}/disks) * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks)
990 #
991 # 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.
992 #
993 # The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.
994 #
995 # The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for {$api_version}.disks ==) (== resource_for {$api_version}.regionDisks ==)
996 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
997 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
998 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700999 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001000 # 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 -07001001 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001002 # Customer-supplied encryption keys do not protect access to metadata of the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001004 # 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.
1005 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1006 &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.
1007 &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.
1008 &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 -07001009 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001010 # The key must meet the following requirements before you can provide it to Compute Engine:
1011 # - The key is wrapped using a RSA public key certificate provided by Google.
1012 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1013 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1014 &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 Kim715bd7f2019-06-14 16:50:42 -07001015 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.
1017 &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.
1018 { # Guest OS features.
1019 &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.
1020 },
1021 ],
1022 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1023 &quot;kind&quot;: &quot;compute#disk&quot;, # [Output Only] Type of the resource. Always compute#disk for disks.
1024 &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.
1025 #
1026 # To see the latest fingerprint, make a get() request to retrieve a disk.
1027 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the setLabels method.
1028 &quot;a_key&quot;: &quot;A String&quot;,
1029 },
1030 &quot;lastAttachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last attach timestamp in RFC3339 text format.
1031 &quot;lastDetachTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last detach timestamp in RFC3339 text format.
1032 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this disk.
1033 &quot;A String&quot;,
1034 ],
1035 &quot;licenses&quot;: [ # A list of publicly visible licenses. Reserved for Google&#x27;s use.
1036 &quot;A String&quot;,
1037 ],
1038 &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.
1039 &quot;options&quot;: &quot;A String&quot;, # Internal use only.
1040 &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. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller&#x27;s project.
1041 &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.
1042 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1043 &quot;A String&quot;,
1044 ],
1045 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations.
1046 &quot;A String&quot;,
1047 ],
1048 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
1049 &quot;sizeGb&quot;: &quot;A String&quot;, # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
1050 #
1051 # If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.
1052 &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.
1053 #
1054 # 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:
1055 # projects/debian-cloud/global/images/family/debian-9
1056 #
1057 #
1058 # Alternatively, use a specific version of a public operating system image:
1059 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1060 #
1061 #
1062 # To create a disk with a custom image that you created, specify the image name in the following format:
1063 # global/images/my-custom-image
1064 #
1065 #
1066 # 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:
1067 # global/images/family/my-image-family
1068 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1069 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1070 &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.
1071 &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.
1072 &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.
1073 #
1074 # The key must meet the following requirements before you can provide it to Compute Engine:
1075 # - The key is wrapped using a RSA public key certificate provided by Google.
1076 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1077 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1078 &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.
1079 },
1080 &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.
1081 &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:
1082 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
1083 # - projects/project/global/snapshots/snapshot
1084 # - global/snapshots/snapshot
1085 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
1086 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1087 &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.
1088 &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.
1089 &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.
1090 #
1091 # The key must meet the following requirements before you can provide it to Compute Engine:
1092 # - The key is wrapped using a RSA public key certificate provided by Google.
1093 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1094 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1095 &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.
1096 },
1097 &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.
1098 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.
1099 &quot;storageType&quot;: &quot;A String&quot;, # [Deprecated] Storage type of the persistent disk.
1100 &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
1101 &quot;users&quot;: [ # [Output Only] Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
1102 &quot;A String&quot;,
1103 ],
1104 &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.
1105 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001106 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001107 &quot;kind&quot;: &quot;compute#diskList&quot;, # [Output Only] Type of resource. Always compute#diskList for lists of disks.
1108 &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.
1109 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1110 &quot;warning&quot;: { # [Output Only] Informational warning message.
1111 &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.
1112 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1113 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001114 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001115 &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).
1116 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001117 },
1118 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001119 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001120 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001121 }</pre>
1122</div>
1123
1124<div class="method">
1125 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1126 <pre>Retrieves the next page of results.
1127
1128Args:
1129 previous_request: The request for the previous page. (required)
1130 previous_response: The response from the request for the previous page. (required)
1131
1132Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001133 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001134 page. Returns None if there are no more items in the collection.
1135 </pre>
1136</div>
1137
1138<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001139 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, region, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001140 <pre>Removes resource policies from a regional disk.
1141
1142Args:
1143 project: string, Project ID for this request. (required)
1144 region: string, The name of the region for this request. (required)
1145 disk: string, The disk name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001146 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001147 The object takes the form of:
1148
1149{
Bu Sun Kim65020912020-05-20 12:08:20 -07001150 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this disk.
1151 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001152 ],
1153 }
1154
1155 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.
1156
1157For 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.
1158
1159The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1160
1161Returns:
1162 An object of the form:
1163
1164 { # Represents an Operation resource.
1165 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 # Google Compute Engine has three Operation resources:
1167 #
1168 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1169 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1171 #
1172 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 # - For global operations, use the `globalOperations` resource.
1174 # - For regional operations, use the `regionOperations` resource.
1175 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001176 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001177 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001178 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1179 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1180 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1181 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1182 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1183 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001184 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001185 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1186 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1187 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001188 },
1189 ],
1190 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001191 &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`.
1192 &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.
1193 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1194 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1195 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1196 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1197 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1198 &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.
1199 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1200 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1201 &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.
1202 &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`.
1203 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1204 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1205 &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.
1206 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1207 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1208 {
1209 &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.
1210 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1211 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1212 {
1213 &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).
1214 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1215 },
1216 ],
1217 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1218 },
1219 ],
1220 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001221 }</pre>
1222</div>
1223
1224<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001225 <code class="details" id="resize">resize(project, region, disk, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001226 <pre>Resizes the specified regional persistent disk.
1227
1228Args:
1229 project: string, The project ID for this request. (required)
1230 region: string, Name of the region for this request. (required)
1231 disk: string, Name of the regional persistent disk. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001233 The object takes the form of:
1234
1235{
Bu Sun Kim65020912020-05-20 12:08:20 -07001236 &quot;sizeGb&quot;: &quot;A String&quot;, # The new size of the regional persistent disk, which is specified in GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001237 }
1238
1239 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.
1240
1241For 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.
1242
1243The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1244
1245Returns:
1246 An object of the form:
1247
1248 { # Represents an Operation resource.
1249 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001250 # Google Compute Engine has three Operation resources:
1251 #
1252 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1253 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001254 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1255 #
1256 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001257 # - For global operations, use the `globalOperations` resource.
1258 # - For regional operations, use the `regionOperations` resource.
1259 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001260 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001261 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001262 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1263 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1264 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1265 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1266 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1267 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001268 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001269 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1270 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1271 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001272 },
1273 ],
1274 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001275 &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`.
1276 &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.
1277 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1278 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1279 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1280 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1281 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1282 &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.
1283 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1284 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1285 &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.
1286 &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`.
1287 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1288 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1289 &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.
1290 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1291 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1292 {
1293 &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.
1294 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1295 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1296 {
1297 &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).
1298 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1299 },
1300 ],
1301 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1302 },
1303 ],
1304 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001305 }</pre>
1306</div>
1307
1308<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001309 <code class="details" id="setIamPolicy">setIamPolicy(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1311
1312Args:
1313 project: string, Project ID for this request. (required)
1314 region: string, The name of the region for this request. (required)
1315 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001316 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001317 The object takes the form of:
1318
1319{
Bu Sun Kim65020912020-05-20 12:08:20 -07001320 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1321 { # Associates `members` with a `role`.
1322 &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.
1323 #
1324 # If the condition evaluates to `true`, then this binding applies to the current request.
1325 #
1326 # 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.
1327 #
1328 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1329 #
1330 # Example (Comparison):
1331 #
1332 # 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;
1333 #
1334 # Example (Equality):
1335 #
1336 # 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;
1337 #
1338 # Example (Logic):
1339 #
1340 # 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;
1341 #
1342 # Example (Data Manipulation):
1343 #
1344 # 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;
1345 #
1346 # 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.
1347 &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.
1348 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1349 &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.
1350 &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.
1351 },
1352 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1353 #
1354 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1355 #
1356 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1357 #
1358 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1359 #
1360 #
1361 #
1362 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1363 #
1364 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1365 #
1366 # * `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.
1367 #
1368 # * `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.
1369 #
1370 # * `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.
1371 #
1372 #
1373 #
1374 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1375 &quot;A String&quot;,
1376 ],
1377 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1378 },
1379 ],
1380 &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.
1381 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001382 #
1383 #
1384 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001385 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001386 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001387 # 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001388 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001389 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001390 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001391 # { &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 -07001392 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001393 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001394 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001395 # 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 -07001396 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001397 # 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 -07001398 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001399 { # 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.
1400 #
1401 # 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.
1402 #
1403 # Example Policy with multiple AuditConfigs:
1404 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001405 # { &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; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001406 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001407 # 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 -07001408 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001409 { # Provides the configuration for logging a type of permissions. Example:
1410 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001411 # { &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 Kim715bd7f2019-06-14 16:50:42 -07001412 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001413 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1414 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1415 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001416 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001417 &quot;ignoreChildExemptions&quot;: True or False,
1418 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001419 },
1420 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001421 &quot;exemptedMembers&quot;: [
1422 &quot;A String&quot;,
1423 ],
1424 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001425 },
1426 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001427 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001428 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001429 &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.
1430 #
1431 # If the condition evaluates to `true`, then this binding applies to the current request.
1432 #
1433 # 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.
1434 #
1435 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1436 #
1437 # Example (Comparison):
1438 #
1439 # 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;
1440 #
1441 # Example (Equality):
1442 #
1443 # 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;
1444 #
1445 # Example (Logic):
1446 #
1447 # 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;
1448 #
1449 # Example (Data Manipulation):
1450 #
1451 # 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;
1452 #
1453 # 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.
1454 &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.
1455 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1456 &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.
1457 &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.
1458 },
1459 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 #
1461 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1462 #
1463 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1464 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001465 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001466 #
1467 #
1468 #
1469 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1470 #
1471 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1472 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001473 # * `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.
1474 #
1475 # * `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.
1476 #
1477 # * `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.
1478 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001479 #
1480 #
1481 # * `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 -07001482 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001483 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001484 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001485 },
1486 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001487 &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.
1488 #
1489 # **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.
1490 &quot;iamOwned&quot;: True or False,
1491 &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.
1492 { # A rule to be applied in a Policy.
1493 &quot;action&quot;: &quot;A String&quot;, # Required
1494 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1495 { # A condition to be met.
1496 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1497 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1498 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1499 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1500 &quot;values&quot;: [ # The objects of the condition.
1501 &quot;A String&quot;,
1502 ],
1503 },
1504 ],
1505 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1506 &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.
1507 &quot;A String&quot;,
1508 ],
1509 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1510 { # Specifies what kind of log the caller must write
1511 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1512 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1513 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1514 },
1515 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1516 },
1517 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1518 #
1519 # 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.
1520 #
1521 # Field names correspond to IAM request parameters and field values are their respective values.
1522 #
1523 # 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.
1524 #
1525 # 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]}
1526 &quot;customFields&quot;: [ # Custom fields.
1527 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1528 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1529 &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.
1530 },
1531 ],
1532 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1533 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1534 },
1535 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1536 &quot;logMode&quot;: &quot;A String&quot;,
1537 },
1538 },
1539 ],
1540 &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.
1541 &quot;A String&quot;,
1542 ],
1543 &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.
1544 &quot;A String&quot;,
1545 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001546 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001547 ],
1548 &quot;version&quot;: 42, # Specifies the format of the policy.
1549 #
1550 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1551 #
1552 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1553 #
1554 # * 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
1555 #
1556 # **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.
1557 #
1558 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1559 #
1560 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1561 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001562 }
1563
1564
1565Returns:
1566 An object of the form:
1567
Dan O'Mearadd494642020-05-01 07:42:23 -07001568 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001569 #
1570 #
1571 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001572 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001573 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001574 # 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001576 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001577 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001578 # { &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 -07001579 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001580 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001581 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001582 # 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 -07001583 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001584 # 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 -07001585 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001586 { # 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.
1587 #
1588 # 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.
1589 #
1590 # Example Policy with multiple AuditConfigs:
1591 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001592 # { &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; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001593 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001594 # 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 -07001595 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001596 { # Provides the configuration for logging a type of permissions. Example:
1597 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001598 # { &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 Kim715bd7f2019-06-14 16:50:42 -07001599 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001600 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1601 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1602 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001603 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001604 &quot;ignoreChildExemptions&quot;: True or False,
1605 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001606 },
1607 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001608 &quot;exemptedMembers&quot;: [
1609 &quot;A String&quot;,
1610 ],
1611 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001612 },
1613 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001614 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001615 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001616 &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.
1617 #
1618 # If the condition evaluates to `true`, then this binding applies to the current request.
1619 #
1620 # 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.
1621 #
1622 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1623 #
1624 # Example (Comparison):
1625 #
1626 # 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;
1627 #
1628 # Example (Equality):
1629 #
1630 # 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;
1631 #
1632 # Example (Logic):
1633 #
1634 # 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;
1635 #
1636 # Example (Data Manipulation):
1637 #
1638 # 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;
1639 #
1640 # 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.
1641 &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.
1642 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1643 &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.
1644 &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.
1645 },
1646 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001647 #
1648 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1649 #
1650 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1651 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001652 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001653 #
1654 #
1655 #
1656 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1657 #
1658 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1659 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001660 # * `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.
1661 #
1662 # * `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.
1663 #
1664 # * `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.
1665 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001666 #
1667 #
1668 # * `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 -07001669 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001670 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001671 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001672 },
1673 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001674 &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.
1675 #
1676 # **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.
1677 &quot;iamOwned&quot;: True or False,
1678 &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.
1679 { # A rule to be applied in a Policy.
1680 &quot;action&quot;: &quot;A String&quot;, # Required
1681 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1682 { # A condition to be met.
1683 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1684 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1685 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1686 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1687 &quot;values&quot;: [ # The objects of the condition.
1688 &quot;A String&quot;,
1689 ],
1690 },
1691 ],
1692 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1693 &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.
1694 &quot;A String&quot;,
1695 ],
1696 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1697 { # Specifies what kind of log the caller must write
1698 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1699 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1700 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1701 },
1702 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1703 },
1704 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1705 #
1706 # 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.
1707 #
1708 # Field names correspond to IAM request parameters and field values are their respective values.
1709 #
1710 # 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.
1711 #
1712 # 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]}
1713 &quot;customFields&quot;: [ # Custom fields.
1714 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1715 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1716 &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.
1717 },
1718 ],
1719 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1720 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1721 },
1722 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1723 &quot;logMode&quot;: &quot;A String&quot;,
1724 },
1725 },
1726 ],
1727 &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.
1728 &quot;A String&quot;,
1729 ],
1730 &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.
1731 &quot;A String&quot;,
1732 ],
1733 },
1734 ],
1735 &quot;version&quot;: 42, # Specifies the format of the policy.
1736 #
1737 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1738 #
1739 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1740 #
1741 # * 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
1742 #
1743 # **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.
1744 #
1745 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1746 #
1747 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001748 }</pre>
1749</div>
1750
1751<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001752 <code class="details" id="setLabels">setLabels(project, region, resource, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001753 <pre>Sets the labels on the target regional disk.
1754
1755Args:
1756 project: string, Project ID for this request. (required)
1757 region: string, The region for this request. (required)
1758 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001759 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001760 The object takes the form of:
1761
1762{
Bu Sun Kim65020912020-05-20 12:08:20 -07001763 &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.
1764 &quot;labels&quot;: { # The labels to set for this resource.
1765 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001766 },
1767 }
1768
1769 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.
1770
1771For 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.
1772
1773The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1774
1775Returns:
1776 An object of the form:
1777
1778 { # Represents an Operation resource.
1779 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001780 # Google Compute Engine has three Operation resources:
1781 #
1782 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1783 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001784 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1785 #
1786 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001787 # - For global operations, use the `globalOperations` resource.
1788 # - For regional operations, use the `regionOperations` resource.
1789 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001790 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001791 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001792 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1793 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1794 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1795 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1796 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1797 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001798 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001799 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1800 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1801 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001802 },
1803 ],
1804 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001805 &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`.
1806 &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.
1807 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1808 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1809 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1810 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1811 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1812 &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.
1813 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1814 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1815 &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.
1816 &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`.
1817 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1818 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1819 &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.
1820 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1821 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1822 {
1823 &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.
1824 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1825 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1826 {
1827 &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).
1828 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1829 },
1830 ],
1831 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1832 },
1833 ],
1834 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001835 }</pre>
1836</div>
1837
1838<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001839 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001840 <pre>Returns permissions that a caller has on the specified resource.
1841
1842Args:
1843 project: string, Project ID for this request. (required)
1844 region: string, The name of the region for this request. (required)
1845 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001846 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001847 The object takes the form of:
1848
1849{
Bu Sun Kim65020912020-05-20 12:08:20 -07001850 &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.
1851 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001852 ],
1853 }
1854
1855
1856Returns:
1857 An object of the form:
1858
1859 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001860 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1861 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001862 ],
1863 }</pre>
1864</div>
1865
1866</body></html>