blob: 158f79ccc7e69c073096dadfb4536b2a03d188f3 [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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Retrieves an aggregated list of persistent disks.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<p class="firstline">Creates a snapshot of a specified persistent 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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 200 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.</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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Retrieves a 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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800104 <pre>Retrieves an aggregated list of persistent disks.
John Asmuth614db982014-04-24 15:46:26 -0400105
106Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000107 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800108 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.
109 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700111
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800112The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -0700113
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800114For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance.
115
116Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.
117
118The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions meaning that resources must match all expressions to pass the filters.
John Asmuth614db982014-04-24 15:46:26 -0400119
120Returns:
121 An object of the form:
122
123 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800124 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000125 "items": { # [Output Only] A map of scoped disk lists.
126 "a_key": { # [Output Only] Name of the scope containing this set of disks.
127 "disks": [ # [Output Only] List of disks contained in this scope.
128 { # A Disk resource.
129 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
130 "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:
131 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
132 # - projects/project/global/snapshots/snapshot
133 # - global/snapshots/snapshot
134 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Takashi Matsuo06694102015-09-11 13:55:40 -0700135 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800136 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000137 "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.
138 #
139 # 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800140 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
Craig Citro065b5302014-08-14 00:47:23 -0700141 "options": "A String", # Internal use only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800142 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000143 "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 -0700144 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000145 "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.
146 #
147 # 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:
148 #
149 # global/images/my-private-image
150 #
151 # 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:
152 #
153 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
154 #
155 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800156 #
157 # You can also specify the latest image for a private image family by replacing the image name suffix with family/family-name. For example:
158 #
159 # global/images/family/my-private-family
160 #
161 # Or you can specify an image family from a publicly-available project. For example, to use the latest Debian 7 from the debian-cloud project, make sure to include the project in the URL:
162 #
163 # projects/debian-cloud/global/images/family/debian-7
164 "licenses": [ # [Output Only] Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700165 "A String",
166 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800167 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
Takashi Matsuo06694102015-09-11 13:55:40 -0700168 "A String",
169 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000170 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
171 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800172 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000173 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
174 "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 -0400175 },
176 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000177 "warning": { # [Output Only] Informational warning which replaces the list of disks when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800178 "message": "A String", # [Output Only] A human-readable description of the warning code.
179 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
180 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
181 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400182 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000183 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800184 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400185 },
186 ],
187 },
188 },
189 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000190 "kind": "compute#diskAggregatedList", # [Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800191 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700192 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400193 }</pre>
194</div>
195
196<div class="method">
197 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
198 <pre>Retrieves the next page of results.
199
200Args:
201 previous_request: The request for the previous page. (required)
202 previous_response: The response from the request for the previous page. (required)
203
204Returns:
205 A request object that you can call 'execute()' on to request the next
206 page. Returns None if there are no more items in the collection.
207 </pre>
208</div>
209
210<div class="method">
211 <code class="details" id="createSnapshot">createSnapshot(project, zone, disk, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800212 <pre>Creates a snapshot of a specified persistent disk.
John Asmuth614db982014-04-24 15:46:26 -0400213
214Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000215 project: string, Project ID for this request. (required)
216 zone: string, The name of the zone for this request. (required)
217 disk: string, Name of the persistent disk to snapshot. (required)
John Asmuth614db982014-04-24 15:46:26 -0400218 body: object, The request body. (required)
219 The object takes the form of:
220
221{ # A persistent disk snapshot resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800222 "status": "A String", # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
Takashi Matsuo06694102015-09-11 13:55:40 -0700223 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
224 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800225 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
226 "sourceDisk": "A String", # [Output Only] The source disk used to create this snapshot.
227 "storageBytesStatus": "A String", # [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.
Takashi Matsuo06694102015-09-11 13:55:40 -0700228 "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.
229 "diskSizeGb": "A String", # [Output Only] Size of the snapshot, specified in GB.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800230 "licenses": [ # [Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).
Craig Citro065b5302014-08-14 00:47:23 -0700231 "A String",
232 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700233 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800234 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700235 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
236 "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 -0400237 }
238
239
240Returns:
241 An object of the form:
242
Takashi Matsuo06694102015-09-11 13:55:40 -0700243 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800244 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
245 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000246 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800247 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
248 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
249 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
250 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000251 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800252 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
253 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800254 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800255 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
256 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000257 "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 -0400258 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800259 "message": "A String", # [Output Only] A human-readable description of the warning code.
260 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
261 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
262 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400263 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000264 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400266 },
267 ],
268 },
269 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000270 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800271 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
272 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000273 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800274 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000275 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800276 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400277 {
Craig Citroe633be12015-03-02 13:40:36 -0800278 "message": "A String", # [Output Only] An optional, human-readable error message.
279 "code": "A String", # [Output Only] The error type identifier for this error.
280 "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 -0400281 },
282 ],
283 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800284 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700285 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800286 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400287 }</pre>
288</div>
289
290<div class="method">
291 <code class="details" id="delete">delete(project, zone, disk)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -0700292 <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 -0400293
294Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000295 project: string, Project ID for this request. (required)
296 zone: string, The name of the zone for this request. (required)
297 disk: string, Name of the persistent disk to delete. (required)
John Asmuth614db982014-04-24 15:46:26 -0400298
299Returns:
300 An object of the form:
301
Takashi Matsuo06694102015-09-11 13:55:40 -0700302 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800303 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
304 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000305 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800306 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
307 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
308 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
309 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000310 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800311 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
312 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800313 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800314 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
315 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000316 "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 -0400317 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800318 "message": "A String", # [Output Only] A human-readable description of the warning code.
319 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
320 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
321 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400322 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000323 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800324 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400325 },
326 ],
327 },
328 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000329 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800330 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
331 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000332 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800333 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000334 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800335 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400336 {
Craig Citroe633be12015-03-02 13:40:36 -0800337 "message": "A String", # [Output Only] An optional, human-readable error message.
338 "code": "A String", # [Output Only] The error type identifier for this error.
339 "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 -0400340 },
341 ],
342 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800343 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700344 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800345 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400346 }</pre>
347</div>
348
349<div class="method">
350 <code class="details" id="get">get(project, zone, disk)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000351 <pre>Returns a specified persistent disk.
John Asmuth614db982014-04-24 15:46:26 -0400352
353Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000354 project: string, Project ID for this request. (required)
355 zone: string, The name of the zone for this request. (required)
356 disk: string, Name of the persistent disk to return. (required)
John Asmuth614db982014-04-24 15:46:26 -0400357
358Returns:
359 An object of the form:
360
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000361 { # A Disk resource.
362 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
363 "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:
364 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
365 # - projects/project/global/snapshots/snapshot
366 # - global/snapshots/snapshot
367 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Takashi Matsuo06694102015-09-11 13:55:40 -0700368 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800369 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000370 "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.
371 #
372 # 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800373 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
Craig Citro065b5302014-08-14 00:47:23 -0700374 "options": "A String", # Internal use only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800375 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000376 "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 -0700377 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000378 "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.
379 #
380 # 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:
381 #
382 # global/images/my-private-image
383 #
384 # 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:
385 #
386 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
387 #
388 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800389 #
390 # You can also specify the latest image for a private image family by replacing the image name suffix with family/family-name. For example:
391 #
392 # global/images/family/my-private-family
393 #
394 # Or you can specify an image family from a publicly-available project. For example, to use the latest Debian 7 from the debian-cloud project, make sure to include the project in the URL:
395 #
396 # projects/debian-cloud/global/images/family/debian-7
397 "licenses": [ # [Output Only] Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700398 "A String",
399 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800400 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
Takashi Matsuo06694102015-09-11 13:55:40 -0700401 "A String",
402 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000403 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
404 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800405 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000406 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
407 "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 -0400408 }</pre>
409</div>
410
411<div class="method">
412 <code class="details" id="insert">insert(project, zone, body, sourceImage=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800413 <pre>Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 200 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.
John Asmuth614db982014-04-24 15:46:26 -0400414
415Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000416 project: string, Project ID for this request. (required)
417 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400418 body: object, The request body. (required)
419 The object takes the form of:
420
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000421{ # A Disk resource.
422 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
423 "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:
424 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
425 # - projects/project/global/snapshots/snapshot
426 # - global/snapshots/snapshot
427 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Takashi Matsuo06694102015-09-11 13:55:40 -0700428 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800429 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000430 "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.
431 #
432 # 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800433 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
Craig Citro065b5302014-08-14 00:47:23 -0700434 "options": "A String", # Internal use only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800435 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000436 "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 -0700437 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000438 "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.
439 #
440 # 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:
441 #
442 # global/images/my-private-image
443 #
444 # 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:
445 #
446 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
447 #
448 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800449 #
450 # You can also specify the latest image for a private image family by replacing the image name suffix with family/family-name. For example:
451 #
452 # global/images/family/my-private-family
453 #
454 # Or you can specify an image family from a publicly-available project. For example, to use the latest Debian 7 from the debian-cloud project, make sure to include the project in the URL:
455 #
456 # projects/debian-cloud/global/images/family/debian-7
457 "licenses": [ # [Output Only] Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700458 "A String",
459 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800460 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
Takashi Matsuo06694102015-09-11 13:55:40 -0700461 "A String",
462 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000463 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
464 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800465 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000466 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
467 "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 -0400468 }
469
470 sourceImage: string, Optional. Source image to restore onto a disk.
471
472Returns:
473 An object of the form:
474
Takashi Matsuo06694102015-09-11 13:55:40 -0700475 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800476 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
477 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000478 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800479 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
480 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
481 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
482 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000483 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800484 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
485 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800486 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800487 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
488 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000489 "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 -0400490 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800491 "message": "A String", # [Output Only] A human-readable description of the warning code.
492 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
493 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
494 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400495 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000496 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800497 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400498 },
499 ],
500 },
501 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000502 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800503 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
504 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000505 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800506 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000507 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800508 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400509 {
Craig Citroe633be12015-03-02 13:40:36 -0800510 "message": "A String", # [Output Only] An optional, human-readable error message.
511 "code": "A String", # [Output Only] The error type identifier for this error.
512 "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 -0400513 },
514 ],
515 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800516 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700517 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800518 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400519 }</pre>
520</div>
521
522<div class="method">
523 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800524 <pre>Retrieves a list of persistent disks contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -0400525
526Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000527 project: string, Project ID for this request. (required)
528 zone: string, The name of the zone for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800529 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.
530 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
531 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700532
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800533The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -0700534
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800535For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance.
536
537Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.
538
539The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions meaning that resources must match all expressions to pass the filters.
John Asmuth614db982014-04-24 15:46:26 -0400540
541Returns:
542 An object of the form:
543
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000544 { # A list of Disk resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800545 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000546 "items": [ # [Output Only] A list of persistent disks.
547 { # A Disk resource.
548 "status": "A String", # [Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.
549 "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:
550 # - https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
551 # - projects/project/global/snapshots/snapshot
552 # - global/snapshots/snapshot
553 "kind": "compute#disk", # [Output Only] Type of the resource. Always compute#disk for disks.
Takashi Matsuo06694102015-09-11 13:55:40 -0700554 "lastDetachTimestamp": "A String", # [Output Only] Last detach timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800555 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000556 "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.
557 #
558 # 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800559 "type": "A String", # URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
Craig Citro065b5302014-08-14 00:47:23 -0700560 "options": "A String", # Internal use only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800561 "sourceImageId": "A String", # [Output Only] The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000562 "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 -0700563 "lastAttachTimestamp": "A String", # [Output Only] Last attach timestamp in RFC3339 text format.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000564 "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.
565 #
566 # 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:
567 #
568 # global/images/my-private-image
569 #
570 # 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:
571 #
572 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
573 #
574 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800575 #
576 # You can also specify the latest image for a private image family by replacing the image name suffix with family/family-name. For example:
577 #
578 # global/images/family/my-private-family
579 #
580 # Or you can specify an image family from a publicly-available project. For example, to use the latest Debian 7 from the debian-cloud project, make sure to include the project in the URL:
581 #
582 # projects/debian-cloud/global/images/family/debian-7
583 "licenses": [ # [Output Only] Any applicable publicly visible licenses.
Craig Citro065b5302014-08-14 00:47:23 -0700584 "A String",
585 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800586 "users": [ # [Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
Takashi Matsuo06694102015-09-11 13:55:40 -0700587 "A String",
588 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000589 "zone": "A String", # [Output Only] URL of the zone where the disk resides.
590 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800591 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000592 "selfLink": "A String", # [Output Only] Server-defined fully-qualified URL for this resource.
593 "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 -0400594 },
595 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000596 "kind": "compute#diskList", # [Output Only] Type of resource. Always compute#diskList for lists of disks.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800597 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700598 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400599 }</pre>
600</div>
601
602<div class="method">
603 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
604 <pre>Retrieves the next page of results.
605
606Args:
607 previous_request: The request for the previous page. (required)
608 previous_response: The response from the request for the previous page. (required)
609
610Returns:
611 A request object that you can call 'execute()' on to request the next
612 page. Returns None if there are no more items in the collection.
613 </pre>
614</div>
615
616</body></html>