blob: 59ea1b2920c5565559ee487018b6aa38cd67c7f9 [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>
Takashi Matsuo06694102015-09-11 13:55:40 -070088<p class="firstline">Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.</p>
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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700109 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
110 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING.
111
112The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
113
114For example, filter=name ne example-instance.
John Asmuth614db982014-04-24 15:46:26 -0400115
116Returns:
117 An object of the form:
118
119 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000120 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
121 "items": { # [Output Only] A map of scoped disk lists.
122 "a_key": { # [Output Only] Name of the scope containing this set of disks.
123 "disks": [ # [Output Only] List of disks contained in this scope.
124 { # A Disk resource.
125 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
126 "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:
127 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
128 # - projects/project/global/snapshots/snapshot
129 # - global/snapshots/snapshot
130 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Takashi Matsuo06694102015-09-11 13:55:40 -0700131 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
John Asmuth614db982014-04-24 15:46:26 -0400132 "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 +0000133 "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.
134 #
135 # 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 -0700136 "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.
137 "options": "A String", # Internal use only.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000138 "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.
139 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700140 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000141 "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.
142 #
143 # 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:
144 #
145 # global/images/my-private-image
146 #
147 # 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:
148 #
149 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
150 #
151 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
152 "licenses": [ # Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700153 "A String",
154 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700155 "users": [ # Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
156 "A String",
157 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000158 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
159 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
160 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
161 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
162 "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 -0400163 },
164 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000165 "warning": { # [Output Only] Informational warning which replaces the list of disks when the list is empty.
166 "message": "A String", # [Output Only] Optional human-readable details for this warning.
167 "code": "A String", # [Output Only] The warning type identifier for this warning.
168 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400169 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000170 "value": "A String", # [Output Only] A warning data value corresponding to the key.
171 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400172 },
173 ],
174 },
175 },
176 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000177 "kind": "compute#diskAggregatedList", # [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks.
178 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700179 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400180 }</pre>
181</div>
182
183<div class="method">
184 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
185 <pre>Retrieves the next page of results.
186
187Args:
188 previous_request: The request for the previous page. (required)
189 previous_response: The response from the request for the previous page. (required)
190
191Returns:
192 A request object that you can call 'execute()' on to request the next
193 page. Returns None if there are no more items in the collection.
194 </pre>
195</div>
196
197<div class="method">
198 <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000199 <pre>Creates a snapshot of this disk.
John Asmuth614db982014-04-24 15:46:26 -0400200
201Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000202 project: string, Project ID for this request. (required)
203 zone: string, The name of the zone for this request. (required)
204 disk: string, Name of the persistent disk to snapshot. (required)
John Asmuth614db982014-04-24 15:46:26 -0400205 body: object, The request body. (required)
206 The object takes the form of:
207
208{ # A persistent disk snapshot resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700209 "status": "A String", # [Output Only] The status of the snapshot.
210 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
211 "storageBytes": "A String", # [Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.
John Asmuth614db982014-04-24 15:46:26 -0400212 "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 -0700213 "sourceDisk": "A String", # The source disk used to create this snapshot.
Takashi Matsuo06694102015-09-11 13:55:40 -0700214 "storageBytesStatus": "A String", # [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation.
215 "sourceDiskId": "A String", # [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.
216 "diskSizeGb": "A String", # [Output Only] Size of the snapshot, specified in GB.
Craig Citro065b5302014-08-14 00:47:23 -0700217 "licenses": [ # Public visible licenses.
218 "A String",
219 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700220 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
221 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
222 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
223 "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 -0400224 }
225
226
227Returns:
228 An object of the form:
229
Takashi Matsuo06694102015-09-11 13:55:40 -0700230 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000231 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700232 "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 +0000233 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800234 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000235 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
236 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
237 "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 +0000238 "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 +0000239 "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 -0800240 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000241 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
242 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
243 "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 -0400244 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000245 "message": "A String", # [Output Only] Optional human-readable details for this warning.
246 "code": "A String", # [Output Only] The warning type identifier for this warning.
247 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400248 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000249 "value": "A String", # [Output Only] A warning data value corresponding to the key.
250 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400251 },
252 ],
253 },
254 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000255 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
256 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
257 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
258 "name": "A String", # [Output Only] Name of the resource.
259 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
260 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800261 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400262 {
Craig Citroe633be12015-03-02 13:40:36 -0800263 "message": "A String", # [Output Only] An optional, human-readable error message.
264 "code": "A String", # [Output Only] The error type identifier for this error.
265 "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 -0400266 },
267 ],
268 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000269 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700270 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000271 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400272 }</pre>
273</div>
274
275<div class="method">
276 <code class="details" id="delete">delete(project, zone, disk)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700277 <pre>Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
John Asmuth614db982014-04-24 15:46:26 -0400278
279Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000280 project: string, Project ID for this request. (required)
281 zone: string, The name of the zone for this request. (required)
282 disk: string, Name of the persistent disk to delete. (required)
John Asmuth614db982014-04-24 15:46:26 -0400283
284Returns:
285 An object of the form:
286
Takashi Matsuo06694102015-09-11 13:55:40 -0700287 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000288 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700289 "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 +0000290 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800291 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000292 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
293 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
294 "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 +0000295 "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 +0000296 "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 -0800297 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000298 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
299 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
300 "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 -0400301 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000302 "message": "A String", # [Output Only] Optional human-readable details for this warning.
303 "code": "A String", # [Output Only] The warning type identifier for this warning.
304 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400305 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000306 "value": "A String", # [Output Only] A warning data value corresponding to the key.
307 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400308 },
309 ],
310 },
311 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000312 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
313 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
314 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
315 "name": "A String", # [Output Only] Name of the resource.
316 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
317 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800318 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400319 {
Craig Citroe633be12015-03-02 13:40:36 -0800320 "message": "A String", # [Output Only] An optional, human-readable error message.
321 "code": "A String", # [Output Only] The error type identifier for this error.
322 "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 -0400323 },
324 ],
325 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000326 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700327 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000328 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400329 }</pre>
330</div>
331
332<div class="method">
333 <code class="details" id="get">get(project, zone, disk)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000334 <pre>Returns a specified persistent disk.
John Asmuth614db982014-04-24 15:46:26 -0400335
336Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000337 project: string, Project ID for this request. (required)
338 zone: string, The name of the zone for this request. (required)
339 disk: string, Name of the persistent disk to return. (required)
John Asmuth614db982014-04-24 15:46:26 -0400340
341Returns:
342 An object of the form:
343
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000344 { # A Disk resource.
345 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
346 "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:
347 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
348 # - projects/project/global/snapshots/snapshot
349 # - global/snapshots/snapshot
350 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Takashi Matsuo06694102015-09-11 13:55:40 -0700351 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
John Asmuth614db982014-04-24 15:46:26 -0400352 "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 +0000353 "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.
354 #
355 # 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 -0700356 "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.
357 "options": "A String", # Internal use only.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000358 "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.
359 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700360 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000361 "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.
362 #
363 # 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:
364 #
365 # global/images/my-private-image
366 #
367 # 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:
368 #
369 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
370 #
371 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
372 "licenses": [ # Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700373 "A String",
374 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700375 "users": [ # Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
376 "A String",
377 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000378 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
379 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
380 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
381 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
382 "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 -0400383 }</pre>
384</div>
385
386<div class="method">
387 <code class="details" id="insert">insert(project, zone, body, sourceImage=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000388 <pre>Creates a persistent disk in the specified project using the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400389
390Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000391 project: string, Project ID for this request. (required)
392 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400393 body: object, The request body. (required)
394 The object takes the form of:
395
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000396{ # A Disk resource.
397 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
398 "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:
399 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
400 # - projects/project/global/snapshots/snapshot
401 # - global/snapshots/snapshot
402 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Takashi Matsuo06694102015-09-11 13:55:40 -0700403 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
John Asmuth614db982014-04-24 15:46:26 -0400404 "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 +0000405 "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.
406 #
407 # 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 -0700408 "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.
409 "options": "A String", # Internal use only.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000410 "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.
411 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700412 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000413 "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.
414 #
415 # 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:
416 #
417 # global/images/my-private-image
418 #
419 # 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:
420 #
421 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
422 #
423 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
424 "licenses": [ # Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700425 "A String",
426 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700427 "users": [ # Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
428 "A String",
429 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000430 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
431 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
432 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
433 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
434 "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 -0400435 }
436
437 sourceImage: string, Optional. Source image to restore onto a disk.
438
439Returns:
440 An object of the form:
441
Takashi Matsuo06694102015-09-11 13:55:40 -0700442 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000443 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700444 "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 +0000445 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800446 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000447 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
448 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
449 "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 +0000450 "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 +0000451 "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 -0800452 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000453 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
454 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
455 "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 -0400456 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000457 "message": "A String", # [Output Only] Optional human-readable details for this warning.
458 "code": "A String", # [Output Only] The warning type identifier for this warning.
459 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400460 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000461 "value": "A String", # [Output Only] A warning data value corresponding to the key.
462 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400463 },
464 ],
465 },
466 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000467 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
468 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
469 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
470 "name": "A String", # [Output Only] Name of the resource.
471 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
472 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800473 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400474 {
Craig Citroe633be12015-03-02 13:40:36 -0800475 "message": "A String", # [Output Only] An optional, human-readable error message.
476 "code": "A String", # [Output Only] The error type identifier for this error.
477 "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 -0400478 },
479 ],
480 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000481 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700482 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000483 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400484 }</pre>
485</div>
486
487<div class="method">
488 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000489 <pre>Retrieves the list of persistent disks contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -0400490
491Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000492 project: string, Project ID for this request. (required)
493 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000494 maxResults: integer, Maximum count of results to be returned.
Takashi Matsuo06694102015-09-11 13:55:40 -0700495 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
496 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING.
497
498The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
499
500For example, filter=name ne example-instance.
John Asmuth614db982014-04-24 15:46:26 -0400501
502Returns:
503 An object of the form:
504
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000505 { # A list of Disk resources.
506 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
507 "items": [ # [Output Only] A list of persistent disks.
508 { # A Disk resource.
509 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
510 "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:
511 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
512 # - projects/project/global/snapshots/snapshot
513 # - global/snapshots/snapshot
514 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Takashi Matsuo06694102015-09-11 13:55:40 -0700515 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
John Asmuth614db982014-04-24 15:46:26 -0400516 "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 +0000517 "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.
518 #
519 # 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 -0700520 "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.
521 "options": "A String", # Internal use only.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000522 "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.
523 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700524 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000525 "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.
526 #
527 # 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:
528 #
529 # global/images/my-private-image
530 #
531 # 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:
532 #
533 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
534 #
535 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
536 "licenses": [ # Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700537 "A String",
538 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700539 "users": [ # Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
540 "A String",
541 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000542 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
543 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
544 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
545 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
546 "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 -0400547 },
548 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000549 "kind": "compute#diskList", # [Output Only] Type of resource. Always compute#diskList for lists of disks.
550 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700551 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400552 }</pre>
553</div>
554
555<div class="method">
556 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
557 <pre>Retrieves the next page of results.
558
559Args:
560 previous_request: The request for the previous page. (required)
561 previous_response: The response from the request for the previous page. (required)
562
563Returns:
564 A request object that you can call 'execute()' on to request the next
565 page. Returns None if there are no more items in the collection.
566 </pre>
567</div>
568
569</body></html>