blob: 0e477f8ddf9a9627f817647d28c6ea23f4d70e27 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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_v1.html">Compute Engine API</a> . <a href="compute_v1.disks.html">disks</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
79<p class="firstline">Retrieves the list of disks grouped by scope.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
84 <code><a href="#createSnapshot">createSnapshot(project, zone, disk, body)</a></code></p>
85<p class="firstline">A description of how to use this function</p>
86<p class="toc_element">
87 <code><a href="#delete">delete(project, zone, disk)</a></code></p>
88<p class="firstline">Deletes the specified persistent disk resource.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, zone, disk)</a></code></p>
91<p class="firstline">Returns the specified persistent disk resource.</p>
92<p class="toc_element">
93 <code><a href="#insert">insert(project, zone, body, sourceImage=None)</a></code></p>
94<p class="firstline">Creates a persistent disk resource in the specified project using the data included in the request.</p>
95<p class="toc_element">
96 <code><a href="#list">list(project, zone, maxResults=None, pageToken=None, filter=None)</a></code></p>
97<p class="firstline">Retrieves the list of persistent disk resources contained within the specified zone.</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<h3>Method Details</h3>
102<div class="method">
103 <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code>
104 <pre>Retrieves the list of disks grouped by scope.
105
106Args:
107 project: string, Name of the project scoping this request. (required)
108 maxResults: integer, Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.
109 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
110 filter: string, Optional. Filter expression for filtering listed resources.
111
112Returns:
113 An object of the form:
114
115 {
116 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
117 "items": { # A map of scoped disk lists.
118 "a_key": { # Name of the scope containing this set of disks.
119 "disks": [ # List of disks contained in this scope.
120 { # A persistent disk resource.
121 "status": "A String", # The status of disk creation (output only).
122 "sourceSnapshot": "A String", # The source snapshot used to create this disk. Once the source snapshot has been deleted from the system, this field will be cleared, and will not be set even if a snapshot with the same name has been re-created.
123 "kind": "compute#disk", # Type of the resource.
124 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
125 "sizeGb": "A String", # Size of the persistent disk, specified in GB. This parameter is optional when creating a disk from a disk image or a snapshot, otherwise it is required.
126 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
127 "sourceImageId": "A String", # The 'id' value of the image used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given image.
128 "sourceImage": "A String", # The source image used to create this disk. Once the source image has been deleted from the system, this field will not be set, even if an image with the same name has been re-created.
129 "sourceSnapshotId": "A String", # The 'id' value of the snapshot used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given disk snapshot.
130 "zone": "A String", # URL of the zone where the disk resides (output only).
131 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
132 "options": "A String", # Internal use only.
133 "selfLink": "A String", # Server defined URL for the resource (output only).
134 "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.
135 },
136 ],
137 "warning": { # Informational warning which replaces the list of disks when the list is empty.
138 "message": "A String", # Optional human-readable details for this warning.
139 "code": "A String", # The warning type identifier for this warning.
140 "data": [ # Metadata for this warning in 'key: value' format.
141 {
142 "value": "A String", # A warning data value corresponding to the key.
143 "key": "A String", # A key for the warning data.
144 },
145 ],
146 },
147 },
148 },
149 "kind": "compute#diskAggregatedList", # Type of resource.
150 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
151 "selfLink": "A String", # Server defined URL for this resource (output only).
152 }</pre>
153</div>
154
155<div class="method">
156 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
157 <pre>Retrieves the next page of results.
158
159Args:
160 previous_request: The request for the previous page. (required)
161 previous_response: The response from the request for the previous page. (required)
162
163Returns:
164 A request object that you can call 'execute()' on to request the next
165 page. Returns None if there are no more items in the collection.
166 </pre>
167</div>
168
169<div class="method">
170 <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body)</code>
171 <pre>A description of how to use this function
172
173Args:
174 project: string, Name of the project scoping this request. (required)
175 zone: string, Name of the zone scoping this request. (required)
176 disk: string, Name of the persistent disk resource to snapshot. (required)
177 body: object, The request body. (required)
178 The object takes the form of:
179
180{ # A persistent disk snapshot resource.
181 "status": "A String", # The status of the persistent disk snapshot (output only).
182 "kind": "compute#snapshot", # Type of the resource.
183 "storageBytes": "A String", # A size of the the storage used by the snapshot. As snapshots share storage this number is expected to change with snapshot creation/deletion.
184 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
185 "sourceDisk": "A String", # The source disk used to create this snapshot. Once the source disk has been deleted from the system, this field will be cleared, and will not be set even if a disk with the same name has been re-created (output only).
186 "storageBytesStatus": "A String", # An indicator whether storageBytes is in a stable state, or it is being adjusted as a result of shared storage reallocation.
187 "sourceDiskId": "A String", # 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.
188 "diskSizeGb": "A String", # Size of the persistent disk snapshot, specified in GB (output only).
189 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
190 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
191 "selfLink": "A String", # Server defined URL for the resource (output only).
192 "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.
193 }
194
195
196Returns:
197 An object of the form:
198
199 { # An operation resource, used to manage asynchronous API requests.
200 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
201 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
202 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
203 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
204 "zone": "A String", # URL of the zone where the operation resides (output only).
205 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
206 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
207 "progress": 42, # 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 at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
208 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
209 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
210 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
211 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
212 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
213 {
214 "message": "A String", # Optional human-readable details for this warning.
215 "code": "A String", # The warning type identifier for this warning.
216 "data": [ # Metadata for this warning in 'key: value' format.
217 {
218 "value": "A String", # A warning data value corresponding to the key.
219 "key": "A String", # A key for the warning data.
220 },
221 ],
222 },
223 ],
224 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
225 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
226 "kind": "compute#operation", # Type of the resource.
227 "name": "A String", # Name of the resource (output only).
228 "region": "A String", # URL of the region where the operation resides (output only).
229 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
230 "errors": [ # The array of errors encountered while processing this operation.
231 {
232 "message": "A String", # An optional, human-readable error message.
233 "code": "A String", # The error type identifier for this error.
234 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
235 },
236 ],
237 },
238 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
239 "selfLink": "A String", # Server defined URL for the resource (output only).
240 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
241 }</pre>
242</div>
243
244<div class="method">
245 <code class="details" id="delete">delete(project, zone, disk)</code>
246 <pre>Deletes the specified persistent disk resource.
247
248Args:
249 project: string, Name of the project scoping this request. (required)
250 zone: string, Name of the zone scoping this request. (required)
251 disk: string, Name of the persistent disk resource to delete. (required)
252
253Returns:
254 An object of the form:
255
256 { # An operation resource, used to manage asynchronous API requests.
257 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
258 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
259 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
260 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
261 "zone": "A String", # URL of the zone where the operation resides (output only).
262 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
263 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
264 "progress": 42, # 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 at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
265 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
266 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
267 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
268 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
269 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
270 {
271 "message": "A String", # Optional human-readable details for this warning.
272 "code": "A String", # The warning type identifier for this warning.
273 "data": [ # Metadata for this warning in 'key: value' format.
274 {
275 "value": "A String", # A warning data value corresponding to the key.
276 "key": "A String", # A key for the warning data.
277 },
278 ],
279 },
280 ],
281 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
282 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
283 "kind": "compute#operation", # Type of the resource.
284 "name": "A String", # Name of the resource (output only).
285 "region": "A String", # URL of the region where the operation resides (output only).
286 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
287 "errors": [ # The array of errors encountered while processing this operation.
288 {
289 "message": "A String", # An optional, human-readable error message.
290 "code": "A String", # The error type identifier for this error.
291 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
292 },
293 ],
294 },
295 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
296 "selfLink": "A String", # Server defined URL for the resource (output only).
297 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
298 }</pre>
299</div>
300
301<div class="method">
302 <code class="details" id="get">get(project, zone, disk)</code>
303 <pre>Returns the specified persistent disk resource.
304
305Args:
306 project: string, Name of the project scoping this request. (required)
307 zone: string, Name of the zone scoping this request. (required)
308 disk: string, Name of the persistent disk resource to return. (required)
309
310Returns:
311 An object of the form:
312
313 { # A persistent disk resource.
314 "status": "A String", # The status of disk creation (output only).
315 "sourceSnapshot": "A String", # The source snapshot used to create this disk. Once the source snapshot has been deleted from the system, this field will be cleared, and will not be set even if a snapshot with the same name has been re-created.
316 "kind": "compute#disk", # Type of the resource.
317 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
318 "sizeGb": "A String", # Size of the persistent disk, specified in GB. This parameter is optional when creating a disk from a disk image or a snapshot, otherwise it is required.
319 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
320 "sourceImageId": "A String", # The 'id' value of the image used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given image.
321 "sourceImage": "A String", # The source image used to create this disk. Once the source image has been deleted from the system, this field will not be set, even if an image with the same name has been re-created.
322 "sourceSnapshotId": "A String", # The 'id' value of the snapshot used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given disk snapshot.
323 "zone": "A String", # URL of the zone where the disk resides (output only).
324 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
325 "options": "A String", # Internal use only.
326 "selfLink": "A String", # Server defined URL for the resource (output only).
327 "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.
328 }</pre>
329</div>
330
331<div class="method">
332 <code class="details" id="insert">insert(project, zone, body, sourceImage=None)</code>
333 <pre>Creates a persistent disk resource in the specified project using the data included in the request.
334
335Args:
336 project: string, Name of the project scoping this request. (required)
337 zone: string, Name of the zone scoping this request. (required)
338 body: object, The request body. (required)
339 The object takes the form of:
340
341{ # A persistent disk resource.
342 "status": "A String", # The status of disk creation (output only).
343 "sourceSnapshot": "A String", # The source snapshot used to create this disk. Once the source snapshot has been deleted from the system, this field will be cleared, and will not be set even if a snapshot with the same name has been re-created.
344 "kind": "compute#disk", # Type of the resource.
345 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
346 "sizeGb": "A String", # Size of the persistent disk, specified in GB. This parameter is optional when creating a disk from a disk image or a snapshot, otherwise it is required.
347 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
348 "sourceImageId": "A String", # The 'id' value of the image used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given image.
349 "sourceImage": "A String", # The source image used to create this disk. Once the source image has been deleted from the system, this field will not be set, even if an image with the same name has been re-created.
350 "sourceSnapshotId": "A String", # The 'id' value of the snapshot used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given disk snapshot.
351 "zone": "A String", # URL of the zone where the disk resides (output only).
352 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
353 "options": "A String", # Internal use only.
354 "selfLink": "A String", # Server defined URL for the resource (output only).
355 "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.
356 }
357
358 sourceImage: string, Optional. Source image to restore onto a disk.
359
360Returns:
361 An object of the form:
362
363 { # An operation resource, used to manage asynchronous API requests.
364 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
365 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
366 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
367 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
368 "zone": "A String", # URL of the zone where the operation resides (output only).
369 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
370 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
371 "progress": 42, # 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 at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
372 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
373 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
374 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
375 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
376 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
377 {
378 "message": "A String", # Optional human-readable details for this warning.
379 "code": "A String", # The warning type identifier for this warning.
380 "data": [ # Metadata for this warning in 'key: value' format.
381 {
382 "value": "A String", # A warning data value corresponding to the key.
383 "key": "A String", # A key for the warning data.
384 },
385 ],
386 },
387 ],
388 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
389 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
390 "kind": "compute#operation", # Type of the resource.
391 "name": "A String", # Name of the resource (output only).
392 "region": "A String", # URL of the region where the operation resides (output only).
393 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
394 "errors": [ # The array of errors encountered while processing this operation.
395 {
396 "message": "A String", # An optional, human-readable error message.
397 "code": "A String", # The error type identifier for this error.
398 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
399 },
400 ],
401 },
402 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
403 "selfLink": "A String", # Server defined URL for the resource (output only).
404 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
405 }</pre>
406</div>
407
408<div class="method">
409 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
410 <pre>Retrieves the list of persistent disk resources contained within the specified zone.
411
412Args:
413 project: string, Name of the project scoping this request. (required)
414 zone: string, Name of the zone scoping this request. (required)
415 maxResults: integer, Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.
416 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
417 filter: string, Optional. Filter expression for filtering listed resources.
418
419Returns:
420 An object of the form:
421
422 { # Contains a list of persistent disk resources.
423 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
424 "items": [ # The persistent disk resources.
425 { # A persistent disk resource.
426 "status": "A String", # The status of disk creation (output only).
427 "sourceSnapshot": "A String", # The source snapshot used to create this disk. Once the source snapshot has been deleted from the system, this field will be cleared, and will not be set even if a snapshot with the same name has been re-created.
428 "kind": "compute#disk", # Type of the resource.
429 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
430 "sizeGb": "A String", # Size of the persistent disk, specified in GB. This parameter is optional when creating a disk from a disk image or a snapshot, otherwise it is required.
431 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
432 "sourceImageId": "A String", # The 'id' value of the image used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given image.
433 "sourceImage": "A String", # The source image used to create this disk. Once the source image has been deleted from the system, this field will not be set, even if an image with the same name has been re-created.
434 "sourceSnapshotId": "A String", # The 'id' value of the snapshot used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given disk snapshot.
435 "zone": "A String", # URL of the zone where the disk resides (output only).
436 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
437 "options": "A String", # Internal use only.
438 "selfLink": "A String", # Server defined URL for the resource (output only).
439 "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.
440 },
441 ],
442 "kind": "compute#diskList", # Type of resource.
443 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
444 "selfLink": "A String", # Server defined URL for this resource (output only).
445 }</pre>
446</div>
447
448<div class="method">
449 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
450 <pre>Retrieves the next page of results.
451
452Args:
453 previous_request: The request for the previous page. (required)
454 previous_response: The response from the request for the previous page. (required)
455
456Returns:
457 A request object that you can call 'execute()' on to request the next
458 page. Returns None if there are no more items in the collection.
459 </pre>
460</div>
461
462</body></html>