blob: 6bcc0b1895ff26fc1ae25a03415834d39dbddd5c [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.regionDisks.html">regionDisks</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#createSnapshot">createSnapshot(project, region, disk, body, guestFlush=None)</a></code></p>
79<p class="firstline">Creates a snapshot of this regional disk.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(project, region, disk)</a></code></p>
82<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>
83<p class="toc_element">
84 <code><a href="#get">get(project, region, disk)</a></code></p>
85<p class="firstline">Returns a specified regional persistent disk.</p>
86<p class="toc_element">
87 <code><a href="#insert">insert(project, region, body, sourceImage=None)</a></code></p>
88<p class="firstline">Creates a persistent regional disk in the specified project using the data included in the request.</p>
89<p class="toc_element">
90 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
91<p class="firstline">Retrieves the list of persistent disks contained within the specified region.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#resize">resize(project, region, disk, body)</a></code></p>
97<p class="firstline">Resizes the specified regional persistent disk.</p>
98<p class="toc_element">
99 <code><a href="#setLabels">setLabels(project, region, resource, body)</a></code></p>
100<p class="firstline">Sets the labels on the target regional disk.</p>
101<p class="toc_element">
102 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p>
103<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="createSnapshot">createSnapshot(project, region, disk, body, guestFlush=None)</code>
107 <pre>Creates a snapshot of this regional disk.
108
109Args:
110 project: string, Project ID for this request. (required)
111 region: string, Name of the region for this request. (required)
112 disk: string, Name of the regional persistent disk to snapshot. (required)
113 body: object, The request body. (required)
114 The object takes the form of:
115
116{ # A persistent disk snapshot resource.
117 "status": "A String", # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
118 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
119 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
120 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
121 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
122 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
123 #
124 # The key must meet the following requirements before you can provide it to Compute Engine:
125 # - The key is wrapped using a RSA public key certificate provided by Google.
126 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
127 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
128 },
129 "storageBytes": "A String", # [Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.
130 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
131 "sourceDisk": "A String", # [Output Only] The source disk used to create this snapshot.
132 "snapshotEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the snapshot using a customer-supplied encryption key.
133 #
134 # After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the image later For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request.
135 #
136 # Customer-supplied encryption keys do not protect access to metadata of the disk.
137 #
138 # 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.
139 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
140 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
141 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
142 #
143 # The key must meet the following requirements before you can provide it to Compute Engine:
144 # - The key is wrapped using a RSA public key certificate provided by Google.
145 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
146 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
147 },
148 "storageBytesStatus": "A String", # [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.
149 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
150 #
151 # To see the latest fingerprint, make a get() request to retrieve a snapshot.
152 "labels": { # Labels to apply to this snapshot. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
153 "a_key": "A String",
154 },
155 "sourceDiskId": "A String", # [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.
156 "diskSizeGb": "A String", # [Output Only] Size of the snapshot, specified in GB.
157 "licenses": [ # [Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).
158 "A String",
159 ],
160 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
161 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
162 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
163 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
164 }
165
166 guestFlush: boolean, A parameter
167
168Returns:
169 An object of the form:
170
171 { # An Operation resource, used to manage asynchronous API requests.
172 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
173 "clientOperationId": "A String", # [Output Only] Reserved for future use.
174 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
175 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
176 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
177 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
178 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
179 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
180 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
181 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
182 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
183 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
184 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
185 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
186 {
187 "message": "A String", # [Output Only] A human-readable description of the warning code.
188 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
189 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
190 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
191 {
192 "value": "A String", # [Output Only] A warning data value corresponding to the key.
193 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
194 },
195 ],
196 },
197 ],
198 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
199 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
200 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
201 "name": "A String", # [Output Only] Name of the resource.
202 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
203 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
204 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
205 {
206 "message": "A String", # [Output Only] An optional, human-readable error message.
207 "code": "A String", # [Output Only] The error type identifier for this error.
208 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
209 },
210 ],
211 },
212 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
213 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800214 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700215 }</pre>
216</div>
217
218<div class="method">
219 <code class="details" id="delete">delete(project, region, disk)</code>
220 <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.
221
222Args:
223 project: string, Project ID for this request. (required)
224 region: string, Name of the region for this request. (required)
225 disk: string, Name of the regional persistent disk to delete. (required)
226
227Returns:
228 An object of the form:
229
230 { # An Operation resource, used to manage asynchronous API requests.
231 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
232 "clientOperationId": "A String", # [Output Only] Reserved for future use.
233 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
234 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
235 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
236 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
237 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
238 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
239 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
240 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
241 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
242 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
243 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
244 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
245 {
246 "message": "A String", # [Output Only] A human-readable description of the warning code.
247 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
248 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
249 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
250 {
251 "value": "A String", # [Output Only] A warning data value corresponding to the key.
252 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
253 },
254 ],
255 },
256 ],
257 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
258 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
259 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
260 "name": "A String", # [Output Only] Name of the resource.
261 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
262 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
263 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
264 {
265 "message": "A String", # [Output Only] An optional, human-readable error message.
266 "code": "A String", # [Output Only] The error type identifier for this error.
267 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
268 },
269 ],
270 },
271 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
272 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800273 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700274 }</pre>
275</div>
276
277<div class="method">
278 <code class="details" id="get">get(project, region, disk)</code>
279 <pre>Returns a specified regional persistent disk.
280
281Args:
282 project: string, Project ID for this request. (required)
283 region: string, Name of the region for this request. (required)
284 disk: string, Name of the regional persistent disk to return. (required)
285
286Returns:
287 An object of the form:
288
289 { # A Disk resource.
290 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
291 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
292 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
293 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
294 #
295 # The key must meet the following requirements before you can provide it to Compute Engine:
296 # - The key is wrapped using a RSA public key certificate provided by Google.
297 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
298 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
299 },
300 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
301 "a_key": "A String",
302 },
303 "licenses": [ # Any applicable publicly visible licenses.
304 "A String",
305 ],
306 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
307 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
308 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
309 "A String",
310 ],
311 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
312 #
313 # 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 or an image, or to attach the disk to a virtual machine).
314 #
315 # Customer-supplied encryption keys do not protect access to metadata of the disk.
316 #
317 # 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.
318 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
319 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
320 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
321 #
322 # The key must meet the following requirements before you can provide it to Compute Engine:
323 # - The key is wrapped using a RSA public key certificate provided by Google.
324 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
325 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
326 },
327 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
328 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
329 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
330 "status": "A String", # [Output Only] The status of disk creation.
331 "sourceSnapshot": "A String", # The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
332 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
333 # - projects/project/global/snapshots/snapshot
334 # - global/snapshots/snapshot
335 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
336 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
337 "storageType": "A String", # [Deprecated] Storage type of the persistent disk.
338 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
339 #
340 # To see the latest fingerprint, make a get() request to retrieve a disk.
341 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
342 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
343 "A String",
344 ],
345 "sourceSnapshotId": "A String", # [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
346 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
347 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
348 "sizeGb": "A String", # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
349 #
350 # 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.
351 "region": "A String", # [Output Only] URL of the region where the disk resides. Only applicable for regional resources.
352 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
353 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
354 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
355 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
356 #
357 # The key must meet the following requirements before you can provide it to Compute Engine:
358 # - The key is wrapped using a RSA public key certificate provided by Google.
359 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
360 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
361 },
362 "options": "A String", # Internal use only.
363 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
364 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
365 #
366 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
367 #
368 # projects/debian-cloud/global/images/family/debian-8
369 #
370 # Alternatively, use a specific version of a public operating system image:
371 #
372 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
373 #
374 # To create a disk with a private image that you created, specify the image name in the following format:
375 #
376 # global/images/my-private-image
377 #
378 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
379 #
380 # global/images/family/my-private-family
381 }</pre>
382</div>
383
384<div class="method">
385 <code class="details" id="insert">insert(project, region, body, sourceImage=None)</code>
386 <pre>Creates a persistent regional disk in the specified project using the data included in the request.
387
388Args:
389 project: string, Project ID for this request. (required)
390 region: string, Name of the region for this request. (required)
391 body: object, The request body. (required)
392 The object takes the form of:
393
394{ # A Disk resource.
395 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
396 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
397 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
398 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
399 #
400 # The key must meet the following requirements before you can provide it to Compute Engine:
401 # - The key is wrapped using a RSA public key certificate provided by Google.
402 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
403 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
404 },
405 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
406 "a_key": "A String",
407 },
408 "licenses": [ # Any applicable publicly visible licenses.
409 "A String",
410 ],
411 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
412 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
413 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
414 "A String",
415 ],
416 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
417 #
418 # 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 or an image, or to attach the disk to a virtual machine).
419 #
420 # Customer-supplied encryption keys do not protect access to metadata of the disk.
421 #
422 # 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.
423 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
424 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
425 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
426 #
427 # The key must meet the following requirements before you can provide it to Compute Engine:
428 # - The key is wrapped using a RSA public key certificate provided by Google.
429 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
430 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
431 },
432 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
433 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
434 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
435 "status": "A String", # [Output Only] The status of disk creation.
436 "sourceSnapshot": "A String", # The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
437 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
438 # - projects/project/global/snapshots/snapshot
439 # - global/snapshots/snapshot
440 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
441 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
442 "storageType": "A String", # [Deprecated] Storage type of the persistent disk.
443 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
444 #
445 # To see the latest fingerprint, make a get() request to retrieve a disk.
446 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
447 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
448 "A String",
449 ],
450 "sourceSnapshotId": "A String", # [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
451 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
452 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
453 "sizeGb": "A String", # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
454 #
455 # 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.
456 "region": "A String", # [Output Only] URL of the region where the disk resides. Only applicable for regional resources.
457 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
458 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
459 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
460 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
461 #
462 # The key must meet the following requirements before you can provide it to Compute Engine:
463 # - The key is wrapped using a RSA public key certificate provided by Google.
464 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
465 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
466 },
467 "options": "A String", # Internal use only.
468 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
469 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
470 #
471 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
472 #
473 # projects/debian-cloud/global/images/family/debian-8
474 #
475 # Alternatively, use a specific version of a public operating system image:
476 #
477 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
478 #
479 # To create a disk with a private image that you created, specify the image name in the following format:
480 #
481 # global/images/my-private-image
482 #
483 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
484 #
485 # global/images/family/my-private-family
486 }
487
488 sourceImage: string, Optional. Source image to restore onto a disk.
489
490Returns:
491 An object of the form:
492
493 { # An Operation resource, used to manage asynchronous API requests.
494 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
495 "clientOperationId": "A String", # [Output Only] Reserved for future use.
496 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
497 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
498 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
499 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
500 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
501 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
502 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
503 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
504 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
505 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
506 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
507 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
508 {
509 "message": "A String", # [Output Only] A human-readable description of the warning code.
510 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
511 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
512 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
513 {
514 "value": "A String", # [Output Only] A warning data value corresponding to the key.
515 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
516 },
517 ],
518 },
519 ],
520 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
521 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
522 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
523 "name": "A String", # [Output Only] Name of the resource.
524 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
525 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
526 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
527 {
528 "message": "A String", # [Output Only] An optional, human-readable error message.
529 "code": "A String", # [Output Only] The error type identifier for this error.
530 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
531 },
532 ],
533 },
534 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
535 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800536 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700537 }</pre>
538</div>
539
540<div class="method">
541 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
542 <pre>Retrieves the list of persistent disks contained within the specified region.
543
544Args:
545 project: string, Project ID for this request. (required)
546 region: string, Name of the region for this request. (required)
547 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
548
549You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
550
551Currently, only sorting by name or creationTimestamp desc is supported.
552 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.
553 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.
554 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
555
556The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
557
558For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
559
560You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
561
562To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
563
564Returns:
565 An object of the form:
566
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800567 { # A list of Disk resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700568 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
569 "items": [ # [Output Only] A list of persistent disks.
570 { # A Disk resource.
571 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
572 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
573 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
574 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
575 #
576 # The key must meet the following requirements before you can provide it to Compute Engine:
577 # - The key is wrapped using a RSA public key certificate provided by Google.
578 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
579 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
580 },
581 "labels": { # Labels to apply to this disk. These can be later modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
582 "a_key": "A String",
583 },
584 "licenses": [ # Any applicable publicly visible licenses.
585 "A String",
586 ],
587 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
588 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
589 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
590 "A String",
591 ],
592 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the disk using a customer-supplied encryption key.
593 #
594 # 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 or an image, or to attach the disk to a virtual machine).
595 #
596 # Customer-supplied encryption keys do not protect access to metadata of the disk.
597 #
598 # 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.
599 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
600 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
601 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
602 #
603 # The key must meet the following requirements before you can provide it to Compute Engine:
604 # - The key is wrapped using a RSA public key certificate provided by Google.
605 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
606 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
607 },
608 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
609 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
610 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
611 "status": "A String", # [Output Only] The status of disk creation.
612 "sourceSnapshot": "A String", # The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
613 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
614 # - projects/project/global/snapshots/snapshot
615 # - global/snapshots/snapshot
616 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
617 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
618 "storageType": "A String", # [Deprecated] Storage type of the persistent disk.
619 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this disk, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
620 #
621 # To see the latest fingerprint, make a get() request to retrieve a disk.
622 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
623 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
624 "A String",
625 ],
626 "sourceSnapshotId": "A String", # [Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
627 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
628 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
629 "sizeGb": "A String", # Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.
630 #
631 # 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.
632 "region": "A String", # [Output Only] URL of the region where the disk resides. Only applicable for regional resources.
633 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
634 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
635 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
636 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
637 #
638 # The key must meet the following requirements before you can provide it to Compute Engine:
639 # - The key is wrapped using a RSA public key certificate provided by Google.
640 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
641 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
642 },
643 "options": "A String", # Internal use only.
644 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
645 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
646 #
647 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
648 #
649 # projects/debian-cloud/global/images/family/debian-8
650 #
651 # Alternatively, use a specific version of a public operating system image:
652 #
653 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
654 #
655 # To create a disk with a private image that you created, specify the image name in the following format:
656 #
657 # global/images/my-private-image
658 #
659 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
660 #
661 # global/images/family/my-private-family
662 },
663 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800664 "kind": "compute#diskList", # [Output Only] Type of resource. Always compute#diskList for lists of disks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700665 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
666 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
667 }</pre>
668</div>
669
670<div class="method">
671 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
672 <pre>Retrieves the next page of results.
673
674Args:
675 previous_request: The request for the previous page. (required)
676 previous_response: The response from the request for the previous page. (required)
677
678Returns:
679 A request object that you can call 'execute()' on to request the next
680 page. Returns None if there are no more items in the collection.
681 </pre>
682</div>
683
684<div class="method">
685 <code class="details" id="resize">resize(project, region, disk, body)</code>
686 <pre>Resizes the specified regional persistent disk.
687
688Args:
689 project: string, The project ID for this request. (required)
690 region: string, Name of the region for this request. (required)
691 disk: string, Name of the regional persistent disk. (required)
692 body: object, The request body. (required)
693 The object takes the form of:
694
695{
696 "sizeGb": "A String", # The new size of the regional persistent disk, which is specified in GB.
697 }
698
699
700Returns:
701 An object of the form:
702
703 { # An Operation resource, used to manage asynchronous API requests.
704 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
705 "clientOperationId": "A String", # [Output Only] Reserved for future use.
706 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
707 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
708 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
709 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
710 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
711 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
712 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
713 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
714 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
715 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
716 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
717 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
718 {
719 "message": "A String", # [Output Only] A human-readable description of the warning code.
720 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
721 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
722 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
723 {
724 "value": "A String", # [Output Only] A warning data value corresponding to the key.
725 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
726 },
727 ],
728 },
729 ],
730 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
731 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
732 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
733 "name": "A String", # [Output Only] Name of the resource.
734 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
735 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
736 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
737 {
738 "message": "A String", # [Output Only] An optional, human-readable error message.
739 "code": "A String", # [Output Only] The error type identifier for this error.
740 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
741 },
742 ],
743 },
744 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
745 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800746 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700747 }</pre>
748</div>
749
750<div class="method">
751 <code class="details" id="setLabels">setLabels(project, region, resource, body)</code>
752 <pre>Sets the labels on the target regional disk.
753
754Args:
755 project: string, Project ID for this request. (required)
756 region: string, The region for this request. (required)
757 resource: string, Name of the resource for this request. (required)
758 body: object, The request body. (required)
759 The object takes the form of:
760
761{
762 "labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.
763 "labels": { # The labels to set for this resource.
764 "a_key": "A String",
765 },
766 }
767
768
769Returns:
770 An object of the form:
771
772 { # An Operation resource, used to manage asynchronous API requests.
773 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
774 "clientOperationId": "A String", # [Output Only] Reserved for future use.
775 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
776 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
777 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
778 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
779 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
780 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
781 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
782 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
783 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
784 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
785 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
786 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
787 {
788 "message": "A String", # [Output Only] A human-readable description of the warning code.
789 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
790 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
791 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
792 {
793 "value": "A String", # [Output Only] A warning data value corresponding to the key.
794 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
795 },
796 ],
797 },
798 ],
799 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
800 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
801 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
802 "name": "A String", # [Output Only] Name of the resource.
803 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
804 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
805 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
806 {
807 "message": "A String", # [Output Only] An optional, human-readable error message.
808 "code": "A String", # [Output Only] The error type identifier for this error.
809 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
810 },
811 ],
812 },
813 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
814 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800815 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700816 }</pre>
817</div>
818
819<div class="method">
820 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code>
821 <pre>Returns permissions that a caller has on the specified resource.
822
823Args:
824 project: string, Project ID for this request. (required)
825 region: string, The name of the region for this request. (required)
826 resource: string, Name of the resource for this request. (required)
827 body: object, The request body. (required)
828 The object takes the form of:
829
830{
831 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
832 "A String",
833 ],
834 }
835
836
837Returns:
838 An object of the form:
839
840 {
841 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
842 "A String",
843 ],
844 }</pre>
845</div>
846
847</body></html>