blob: 648f72ec8d1930e820bb11052dc73b1b2f3237c5 [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>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000085<p class="firstline">Creates a snapshot of this disk.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
87 <code><a href="#delete">delete(project, zone, disk)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000088<p class="firstline">Deletes the specified persistent disk.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#get">get(project, zone, disk)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000091<p class="firstline">Returns a specified persistent disk.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
93 <code><a href="#insert">insert(project, zone, body, sourceImage=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000094<p class="firstline">Creates a persistent disk in the specified project using the data included in the request.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
96 <code><a href="#list">list(project, zone, maxResults=None, pageToken=None, filter=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000097<p class="firstline">Retrieves the list of persistent disks contained within the specified zone.</p>
John Asmuth614db982014-04-24 15:46:26 -040098<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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000107 project: string, Project ID for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000108 maxResults: integer, Maximum count of results to be returned.
109 pageToken: string, Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.
110 filter: string, Filter expression for filtering listed resources.
John Asmuth614db982014-04-24 15:46:26 -0400111
112Returns:
113 An object of the form:
114
115 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000116 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
117 "items": { # [Output Only] A map of scoped disk lists.
118 "a_key": { # [Output Only] Name of the scope containing this set of disks.
119 "disks": [ # [Output Only] List of disks contained in this scope.
120 { # A Disk resource.
121 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
122 "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:
123 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
124 # - projects/project/global/snapshots/snapshot
125 # - global/snapshots/snapshot
126 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
John Asmuth614db982014-04-24 15:46:26 -0400127 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000128 "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.
129 #
130 # 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.
Craig Citro065b5302014-08-14 00:47:23 -0700131 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
132 "options": "A String", # Internal use only.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000133 "sourceImageId": "A String", # 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.
134 "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.
135 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created.
136 #
137 # When creating a disk, you can provide a private (custom) image using the following input, and Compute Engine will use the corresponding image from your project. For example:
138 #
139 # global/images/my-private-image
140 #
141 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
142 #
143 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
144 #
145 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
146 "licenses": [ # Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700147 "A String",
148 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000149 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
150 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
151 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
152 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
153 "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.
John Asmuth614db982014-04-24 15:46:26 -0400154 },
155 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000156 "warning": { # [Output Only] Informational warning which replaces the list of disks when the list is empty.
157 "message": "A String", # [Output Only] Optional human-readable details for this warning.
158 "code": "A String", # [Output Only] The warning type identifier for this warning.
159 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400160 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000161 "value": "A String", # [Output Only] A warning data value corresponding to the key.
162 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400163 },
164 ],
165 },
166 },
167 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000168 "kind": "compute#diskAggregatedList", # [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks.
169 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
170 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400171 }</pre>
172</div>
173
174<div class="method">
175 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
176 <pre>Retrieves the next page of results.
177
178Args:
179 previous_request: The request for the previous page. (required)
180 previous_response: The response from the request for the previous page. (required)
181
182Returns:
183 A request object that you can call 'execute()' on to request the next
184 page. Returns None if there are no more items in the collection.
185 </pre>
186</div>
187
188<div class="method">
189 <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000190 <pre>Creates a snapshot of this disk.
John Asmuth614db982014-04-24 15:46:26 -0400191
192Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000193 project: string, Project ID for this request. (required)
194 zone: string, The name of the zone for this request. (required)
195 disk: string, Name of the persistent disk to snapshot. (required)
John Asmuth614db982014-04-24 15:46:26 -0400196 body: object, The request body. (required)
197 The object takes the form of:
198
199{ # A persistent disk snapshot resource.
200 "status": "A String", # The status of the persistent disk snapshot (output only).
201 "kind": "compute#snapshot", # Type of the resource.
202 "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.
203 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700204 "sourceDisk": "A String", # The source disk used to create this snapshot.
John Asmuth614db982014-04-24 15:46:26 -0400205 "storageBytesStatus": "A String", # An indicator whether storageBytes is in a stable state, or it is being adjusted as a result of shared storage reallocation.
206 "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.
207 "diskSizeGb": "A String", # Size of the persistent disk snapshot, specified in GB (output only).
Craig Citro065b5302014-08-14 00:47:23 -0700208 "licenses": [ # Public visible licenses.
209 "A String",
210 ],
John Asmuth614db982014-04-24 15:46:26 -0400211 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
212 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
213 "selfLink": "A String", # Server defined URL for the resource (output only).
214 "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.
215 }
216
217
218Returns:
219 An object of the form:
220
221 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000222 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000223 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000224 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800225 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000226 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
227 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
228 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000229 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000230 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800231 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000232 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
233 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
234 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400235 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000236 "message": "A String", # [Output Only] Optional human-readable details for this warning.
237 "code": "A String", # [Output Only] The warning type identifier for this warning.
238 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400239 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000240 "value": "A String", # [Output Only] A warning data value corresponding to the key.
241 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400242 },
243 ],
244 },
245 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000246 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
247 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
248 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
249 "name": "A String", # [Output Only] Name of the resource.
250 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
251 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800252 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400253 {
Craig Citroe633be12015-03-02 13:40:36 -0800254 "message": "A String", # [Output Only] An optional, human-readable error message.
255 "code": "A String", # [Output Only] The error type identifier for this error.
256 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400257 },
258 ],
259 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000260 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800261 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000262 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400263 }</pre>
264</div>
265
266<div class="method">
267 <code class="details" id="delete">delete(project, zone, disk)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000268 <pre>Deletes the specified persistent disk.
John Asmuth614db982014-04-24 15:46:26 -0400269
270Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000271 project: string, Project ID for this request. (required)
272 zone: string, The name of the zone for this request. (required)
273 disk: string, Name of the persistent disk to delete. (required)
John Asmuth614db982014-04-24 15:46:26 -0400274
275Returns:
276 An object of the form:
277
278 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000279 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000280 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000281 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800282 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000283 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
284 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
285 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000286 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000287 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800288 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000289 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
290 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
291 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400292 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000293 "message": "A String", # [Output Only] Optional human-readable details for this warning.
294 "code": "A String", # [Output Only] The warning type identifier for this warning.
295 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400296 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000297 "value": "A String", # [Output Only] A warning data value corresponding to the key.
298 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400299 },
300 ],
301 },
302 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000303 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
304 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
305 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
306 "name": "A String", # [Output Only] Name of the resource.
307 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
308 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800309 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400310 {
Craig Citroe633be12015-03-02 13:40:36 -0800311 "message": "A String", # [Output Only] An optional, human-readable error message.
312 "code": "A String", # [Output Only] The error type identifier for this error.
313 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400314 },
315 ],
316 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000317 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800318 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000319 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400320 }</pre>
321</div>
322
323<div class="method">
324 <code class="details" id="get">get(project, zone, disk)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000325 <pre>Returns a specified persistent disk.
John Asmuth614db982014-04-24 15:46:26 -0400326
327Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000328 project: string, Project ID for this request. (required)
329 zone: string, The name of the zone for this request. (required)
330 disk: string, Name of the persistent disk to return. (required)
John Asmuth614db982014-04-24 15:46:26 -0400331
332Returns:
333 An object of the form:
334
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000335 { # A Disk resource.
336 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
337 "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:
338 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
339 # - projects/project/global/snapshots/snapshot
340 # - global/snapshots/snapshot
341 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
John Asmuth614db982014-04-24 15:46:26 -0400342 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000343 "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.
344 #
345 # 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.
Craig Citro065b5302014-08-14 00:47:23 -0700346 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
347 "options": "A String", # Internal use only.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000348 "sourceImageId": "A String", # 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.
349 "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.
350 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created.
351 #
352 # When creating a disk, you can provide a private (custom) image using the following input, and Compute Engine will use the corresponding image from your project. For example:
353 #
354 # global/images/my-private-image
355 #
356 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
357 #
358 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
359 #
360 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
361 "licenses": [ # Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700362 "A String",
363 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000364 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
365 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
366 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
367 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
368 "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.
John Asmuth614db982014-04-24 15:46:26 -0400369 }</pre>
370</div>
371
372<div class="method">
373 <code class="details" id="insert">insert(project, zone, body, sourceImage=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000374 <pre>Creates a persistent disk in the specified project using the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400375
376Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000377 project: string, Project ID for this request. (required)
378 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400379 body: object, The request body. (required)
380 The object takes the form of:
381
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000382{ # A Disk resource.
383 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
384 "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:
385 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
386 # - projects/project/global/snapshots/snapshot
387 # - global/snapshots/snapshot
388 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
John Asmuth614db982014-04-24 15:46:26 -0400389 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000390 "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.
391 #
392 # 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.
Craig Citro065b5302014-08-14 00:47:23 -0700393 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
394 "options": "A String", # Internal use only.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000395 "sourceImageId": "A String", # 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.
396 "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.
397 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created.
398 #
399 # When creating a disk, you can provide a private (custom) image using the following input, and Compute Engine will use the corresponding image from your project. For example:
400 #
401 # global/images/my-private-image
402 #
403 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
404 #
405 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
406 #
407 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
408 "licenses": [ # Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700409 "A String",
410 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000411 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
412 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
413 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
414 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
415 "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.
John Asmuth614db982014-04-24 15:46:26 -0400416 }
417
418 sourceImage: string, Optional. Source image to restore onto a disk.
419
420Returns:
421 An object of the form:
422
423 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000424 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000425 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000426 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800427 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000428 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
429 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
430 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000431 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000432 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800433 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000434 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
435 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
436 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400437 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000438 "message": "A String", # [Output Only] Optional human-readable details for this warning.
439 "code": "A String", # [Output Only] The warning type identifier for this warning.
440 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400441 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000442 "value": "A String", # [Output Only] A warning data value corresponding to the key.
443 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400444 },
445 ],
446 },
447 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000448 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
449 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
450 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
451 "name": "A String", # [Output Only] Name of the resource.
452 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
453 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800454 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400455 {
Craig Citroe633be12015-03-02 13:40:36 -0800456 "message": "A String", # [Output Only] An optional, human-readable error message.
457 "code": "A String", # [Output Only] The error type identifier for this error.
458 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400459 },
460 ],
461 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000462 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800463 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000464 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400465 }</pre>
466</div>
467
468<div class="method">
469 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000470 <pre>Retrieves the list of persistent disks contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -0400471
472Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000473 project: string, Project ID for this request. (required)
474 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000475 maxResults: integer, Maximum count of results to be returned.
476 pageToken: string, Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.
477 filter: string, Filter expression for filtering listed resources.
John Asmuth614db982014-04-24 15:46:26 -0400478
479Returns:
480 An object of the form:
481
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000482 { # A list of Disk resources.
483 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
484 "items": [ # [Output Only] A list of persistent disks.
485 { # A Disk resource.
486 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
487 "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:
488 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
489 # - projects/project/global/snapshots/snapshot
490 # - global/snapshots/snapshot
491 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
John Asmuth614db982014-04-24 15:46:26 -0400492 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000493 "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.
494 #
495 # 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.
Craig Citro065b5302014-08-14 00:47:23 -0700496 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
497 "options": "A String", # Internal use only.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000498 "sourceImageId": "A String", # 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.
499 "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.
500 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created.
501 #
502 # When creating a disk, you can provide a private (custom) image using the following input, and Compute Engine will use the corresponding image from your project. For example:
503 #
504 # global/images/my-private-image
505 #
506 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
507 #
508 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
509 #
510 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
511 "licenses": [ # Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700512 "A String",
513 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000514 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
515 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
516 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
517 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
518 "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.
John Asmuth614db982014-04-24 15:46:26 -0400519 },
520 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000521 "kind": "compute#diskList", # [Output Only] Type of resource. Always compute#diskList for lists of disks.
522 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
523 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400524 }</pre>
525</div>
526
527<div class="method">
528 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
529 <pre>Retrieves the next page of results.
530
531Args:
532 previous_request: The request for the previous page. (required)
533 previous_response: The response from the request for the previous page. (required)
534
535Returns:
536 A request object that you can call 'execute()' on to request the next
537 page. Returns None if there are no more items in the collection.
538 </pre>
539</div>
540
541</body></html>