blob: 47cb29c25d973fcd8d51b8c9dacc4f78f54a5a7f [file] [log] [blame]
Joe Gregorio37802c32013-08-06 12:24:05 -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_v1beta15.html">Compute Engine API</a> . <a href="compute_v1beta15.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 and default value is 100.
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 "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.
128 "zone": "A String", # URL of the zone where the disk resides (output only).
129 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
130 "options": "A String", # Internal use only.
131 "selfLink": "A String", # Server defined URL for the resource (output only).
132 "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.
133 },
134 ],
135 "warning": { # Informational warning which replaces the list of disks when the list is empty.
136 "message": "A String", # Optional human-readable details for this warning.
137 "code": "A String", # The warning type identifier for this warning.
138 "data": [ # Metadata for this warning in 'key: value' format.
139 {
140 "value": "A String", # A warning data value corresponding to the key.
141 "key": "A String", # A key for the warning data.
142 },
143 ],
144 },
145 },
146 },
147 "kind": "compute#diskAggregatedList", # Type of resource.
148 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
149 "selfLink": "A String", # Server defined URL for this resource (output only).
150 }</pre>
151</div>
152
153<div class="method">
154 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
155 <pre>Retrieves the next page of results.
156
157Args:
158 previous_request: The request for the previous page. (required)
159 previous_response: The response from the request for the previous page. (required)
160
161Returns:
162 A request object that you can call 'execute()' on to request the next
163 page. Returns None if there are no more items in the collection.
164 </pre>
165</div>
166
167<div class="method">
168 <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body)</code>
169 <pre>A description of how to use this function
170
171Args:
172 project: string, Name of the project scoping this request. (required)
173 zone: string, Name of the zone scoping this request. (required)
174 disk: string, Name of the persistent disk resource to delete. (required)
175 body: object, The request body. (required)
176 The object takes the form of:
177
178{ # A persistent disk snapshot resource.
179 "status": "A String", # The status of the persistent disk snapshot (output only).
180 "kind": "compute#snapshot", # Type of the resource.
181 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
182 "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).
183 "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.
184 "diskSizeGb": "A String", # Size of the persistent disk snapshot, specified in GB (output only).
185 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
186 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
187 "selfLink": "A String", # Server defined URL for the resource (output only).
188 "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.
189 }
190
191
192Returns:
193 An object of the form:
194
195 { # An operation resource, used to manage asynchronous API requests.
196 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
197 "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).
198 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
199 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
200 "zone": "A String", # URL of the zone where the operation resides (output only).
201 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
202 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
203 "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).
204 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
205 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
206 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
207 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
208 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
209 {
210 "message": "A String", # Optional human-readable details for this warning.
211 "code": "A String", # The warning type identifier for this warning.
212 "data": [ # Metadata for this warning in 'key: value' format.
213 {
214 "value": "A String", # A warning data value corresponding to the key.
215 "key": "A String", # A key for the warning data.
216 },
217 ],
218 },
219 ],
220 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
221 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
222 "kind": "compute#operation", # Type of the resource.
223 "name": "A String", # Name of the resource (output only).
224 "region": "A String", # URL of the region where the operation resides (output only).
225 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
226 "errors": [ # The array of errors encountered while processing this operation.
227 {
228 "message": "A String", # An optional, human-readable error message.
229 "code": "A String", # The error type identifier for this error.
230 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
231 },
232 ],
233 },
234 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
235 "selfLink": "A String", # Server defined URL for the resource (output only).
236 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
237 }</pre>
238</div>
239
240<div class="method">
241 <code class="details" id="delete">delete(project, zone, disk)</code>
242 <pre>Deletes the specified persistent disk resource.
243
244Args:
245 project: string, Name of the project scoping this request. (required)
246 zone: string, Name of the zone scoping this request. (required)
247 disk: string, Name of the persistent disk resource to delete. (required)
248
249Returns:
250 An object of the form:
251
252 { # An operation resource, used to manage asynchronous API requests.
253 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
254 "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).
255 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
256 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
257 "zone": "A String", # URL of the zone where the operation resides (output only).
258 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
259 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
260 "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).
261 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
262 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
263 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
264 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
265 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
266 {
267 "message": "A String", # Optional human-readable details for this warning.
268 "code": "A String", # The warning type identifier for this warning.
269 "data": [ # Metadata for this warning in 'key: value' format.
270 {
271 "value": "A String", # A warning data value corresponding to the key.
272 "key": "A String", # A key for the warning data.
273 },
274 ],
275 },
276 ],
277 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
278 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
279 "kind": "compute#operation", # Type of the resource.
280 "name": "A String", # Name of the resource (output only).
281 "region": "A String", # URL of the region where the operation resides (output only).
282 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
283 "errors": [ # The array of errors encountered while processing this operation.
284 {
285 "message": "A String", # An optional, human-readable error message.
286 "code": "A String", # The error type identifier for this error.
287 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
288 },
289 ],
290 },
291 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
292 "selfLink": "A String", # Server defined URL for the resource (output only).
293 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
294 }</pre>
295</div>
296
297<div class="method">
298 <code class="details" id="get">get(project, zone, disk)</code>
299 <pre>Returns the specified persistent disk resource.
300
301Args:
302 project: string, Name of the project scoping this request. (required)
303 zone: string, Name of the zone scoping this request. (required)
304 disk: string, Name of the persistent disk resource to return. (required)
305
306Returns:
307 An object of the form:
308
309 { # A persistent disk resource.
310 "status": "A String", # The status of disk creation (output only).
311 "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.
312 "kind": "compute#disk", # Type of the resource.
313 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
314 "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.
315 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
316 "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.
317 "zone": "A String", # URL of the zone where the disk resides (output only).
318 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
319 "options": "A String", # Internal use only.
320 "selfLink": "A String", # Server defined URL for the resource (output only).
321 "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.
322 }</pre>
323</div>
324
325<div class="method">
326 <code class="details" id="insert">insert(project, zone, body, sourceImage=None)</code>
327 <pre>Creates a persistent disk resource in the specified project using the data included in the request.
328
329Args:
330 project: string, Name of the project scoping this request. (required)
331 zone: string, Name of the zone scoping this request. (required)
332 body: object, The request body. (required)
333 The object takes the form of:
334
335{ # A persistent disk resource.
336 "status": "A String", # The status of disk creation (output only).
337 "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.
338 "kind": "compute#disk", # Type of the resource.
339 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
340 "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.
341 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
342 "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.
343 "zone": "A String", # URL of the zone where the disk resides (output only).
344 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
345 "options": "A String", # Internal use only.
346 "selfLink": "A String", # Server defined URL for the resource (output only).
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.
348 }
349
350 sourceImage: string, Optional. Source image to restore onto a disk.
351
352Returns:
353 An object of the form:
354
355 { # An operation resource, used to manage asynchronous API requests.
356 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
357 "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).
358 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
359 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
360 "zone": "A String", # URL of the zone where the operation resides (output only).
361 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
362 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
363 "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).
364 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
365 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
366 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
367 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
368 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
369 {
370 "message": "A String", # Optional human-readable details for this warning.
371 "code": "A String", # The warning type identifier for this warning.
372 "data": [ # Metadata for this warning in 'key: value' format.
373 {
374 "value": "A String", # A warning data value corresponding to the key.
375 "key": "A String", # A key for the warning data.
376 },
377 ],
378 },
379 ],
380 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
381 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
382 "kind": "compute#operation", # Type of the resource.
383 "name": "A String", # Name of the resource (output only).
384 "region": "A String", # URL of the region where the operation resides (output only).
385 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
386 "errors": [ # The array of errors encountered while processing this operation.
387 {
388 "message": "A String", # An optional, human-readable error message.
389 "code": "A String", # The error type identifier for this error.
390 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
391 },
392 ],
393 },
394 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
395 "selfLink": "A String", # Server defined URL for the resource (output only).
396 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
397 }</pre>
398</div>
399
400<div class="method">
401 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
402 <pre>Retrieves the list of persistent disk resources contained within the specified zone.
403
404Args:
405 project: string, Name of the project scoping this request. (required)
406 zone: string, Name of the zone scoping this request. (required)
407 maxResults: integer, Optional. Maximum count of results to be returned. Maximum and default value is 100.
408 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
409 filter: string, Optional. Filter expression for filtering listed resources.
410
411Returns:
412 An object of the form:
413
414 { # Contains a list of persistent disk resources.
415 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
416 "items": [ # The persistent disk resources.
417 { # A persistent disk resource.
418 "status": "A String", # The status of disk creation (output only).
419 "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.
420 "kind": "compute#disk", # Type of the resource.
421 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
422 "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.
423 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
424 "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.
425 "zone": "A String", # URL of the zone where the disk resides (output only).
426 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
427 "options": "A String", # Internal use only.
428 "selfLink": "A String", # Server defined URL for the resource (output only).
429 "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.
430 },
431 ],
432 "kind": "compute#diskList", # Type of resource.
433 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
434 "selfLink": "A String", # Server defined URL for this resource (output only).
435 }</pre>
436</div>
437
438<div class="method">
439 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
440 <pre>Retrieves the next page of results.
441
442Args:
443 previous_request: The request for the previous page. (required)
444 previous_response: The response from the request for the previous page. (required)
445
446Returns:
447 A request object that you can call 'execute()' on to request the next
448 page. Returns None if there are no more items in the collection.
449 </pre>
450</div>
451
452</body></html>