blob: d22becb519e44dac8bbd2fceb6360ffa245ba466 [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.images.html">images</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(project, image)</a></code></p>
79<p class="firstline">Deletes the specified image resource.</p>
80<p class="toc_element">
81 <code><a href="#deprecate">deprecate(project, image, body)</a></code></p>
82<p class="firstline">Sets the deprecation status of an image. If no message body is given, clears the deprecation status instead.</p>
83<p class="toc_element">
84 <code><a href="#get">get(project, image)</a></code></p>
85<p class="firstline">Returns the specified image resource.</p>
86<p class="toc_element">
87 <code><a href="#insert">insert(project, body)</a></code></p>
88<p class="firstline">Creates an image resource in the specified project using the data included in the request.</p>
89<p class="toc_element">
90 <code><a href="#list">list(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
91<p class="firstline">Retrieves the list of image resources available to the specified project.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="delete">delete(project, image)</code>
98 <pre>Deletes the specified image resource.
99
100Args:
101 project: string, Name of the project scoping this request. (required)
102 image: string, Name of the image resource to delete. (required)
103
104Returns:
105 An object of the form:
106
107 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800108 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
109 "clientOperationId": "A String",
110 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
111 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
112 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
113 "operationType": "A String",
114 "httpErrorMessage": "A String",
115 "progress": 42,
116 "httpErrorStatusCode": 42,
117 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
118 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
119 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
120 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400121 {
122 "message": "A String", # Optional human-readable details for this warning.
123 "code": "A String", # The warning type identifier for this warning.
124 "data": [ # Metadata for this warning in 'key: value' format.
125 {
126 "value": "A String", # A warning data value corresponding to the key.
127 "key": "A String", # A key for the warning data.
128 },
129 ],
130 },
131 ],
Craig Citroe633be12015-03-02 13:40:36 -0800132 "user": "A String",
133 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
134 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
135 "name": "A String", # [Output Only] Name of the resource (output only).
136 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
137 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
138 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400139 {
Craig Citroe633be12015-03-02 13:40:36 -0800140 "message": "A String", # [Output Only] An optional, human-readable error message.
141 "code": "A String", # [Output Only] The error type identifier for this error.
142 "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 -0400143 },
144 ],
145 },
Craig Citroe633be12015-03-02 13:40:36 -0800146 "endTime": "A String",
147 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
148 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400149 }</pre>
150</div>
151
152<div class="method">
153 <code class="details" id="deprecate">deprecate(project, image, body)</code>
154 <pre>Sets the deprecation status of an image. If no message body is given, clears the deprecation status instead.
155
156Args:
157 project: string, Name of the project scoping this request. (required)
158 image: string, Image name. (required)
159 body: object, The request body. (required)
160 The object takes the form of:
161
162{ # Deprecation status for a public resource.
163 "deleted": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED.
164 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED.
165 "state": "A String", # The deprecation state. Can be "DEPRECATED", "OBSOLETE", or "DELETED". Operations which create a new resource using a "DEPRECATED" resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. New uses of "OBSOLETE" or "DELETED" resources will result in an error.
166 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE.
167 "replacement": "A String", # A URL of the suggested replacement for the deprecated resource. The deprecated resource and its replacement must be resources of the same kind.
168}
169
170
171Returns:
172 An object of the form:
173
174 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800175 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
176 "clientOperationId": "A String",
177 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
178 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
179 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
180 "operationType": "A String",
181 "httpErrorMessage": "A String",
182 "progress": 42,
183 "httpErrorStatusCode": 42,
184 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
185 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
186 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
187 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400188 {
189 "message": "A String", # Optional human-readable details for this warning.
190 "code": "A String", # The warning type identifier for this warning.
191 "data": [ # Metadata for this warning in 'key: value' format.
192 {
193 "value": "A String", # A warning data value corresponding to the key.
194 "key": "A String", # A key for the warning data.
195 },
196 ],
197 },
198 ],
Craig Citroe633be12015-03-02 13:40:36 -0800199 "user": "A String",
200 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
201 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
202 "name": "A String", # [Output Only] Name of the resource (output only).
203 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
204 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
205 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400206 {
Craig Citroe633be12015-03-02 13:40:36 -0800207 "message": "A String", # [Output Only] An optional, human-readable error message.
208 "code": "A String", # [Output Only] The error type identifier for this error.
209 "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 -0400210 },
211 ],
212 },
Craig Citroe633be12015-03-02 13:40:36 -0800213 "endTime": "A String",
214 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
215 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400216 }</pre>
217</div>
218
219<div class="method">
220 <code class="details" id="get">get(project, image)</code>
221 <pre>Returns the specified image resource.
222
223Args:
224 project: string, Name of the project scoping this request. (required)
225 image: string, Name of the image resource to return. (required)
226
227Returns:
228 An object of the form:
229
230 { # A disk image resource.
231 "status": "A String", # Status of the image (output only). It will be one of the following READY - after image has been successfully created and is ready for use FAILED - if creating the image fails for some reason PENDING - the image creation is in progress An image can be used to create other resources suck as instances only after the image has been successfully created and the status is set to READY.
232 "kind": "compute#image", # Type of the resource.
233 "description": "A String", # Textual description of the resource; provided by the client when the resource is created.
234 "rawDisk": { # The raw disk image parameters.
Craig Citro065b5302014-08-14 00:47:23 -0700235 "containerType": "A String", # The format used to encode and transmit the block device. Should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
John Asmuth614db982014-04-24 15:46:26 -0400236 "source": "A String", # The full Google Cloud Storage URL where the disk image is stored; provided by the client when the disk image is created.
237 "sha1Checksum": "A String", # An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.
238 },
239 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
240 "deleted": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED.
241 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED.
242 "state": "A String", # The deprecation state. Can be "DEPRECATED", "OBSOLETE", or "DELETED". Operations which create a new resource using a "DEPRECATED" resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. New uses of "OBSOLETE" or "DELETED" resources will result in an error.
243 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE.
244 "replacement": "A String", # A URL of the suggested replacement for the deprecated resource. The deprecated resource and its replacement must be resources of the same kind.
245 },
246 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Craig Citro065b5302014-08-14 00:47:23 -0700247 "sourceDiskId": "A String", # The 'id' value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
248 "diskSizeGb": "A String", # Size of the image when restored onto a disk (in GiB).
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700249 "sourceDisk": "A String", # The source disk used to create this image.
Craig Citro065b5302014-08-14 00:47:23 -0700250 "licenses": [ # Public visible licenses.
251 "A String",
252 ],
John Asmuth614db982014-04-24 15:46:26 -0400253 "sourceType": "RAW", # Must be "RAW"; provided by the client when the disk image is created.
254 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
255 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
256 "selfLink": "A String", # Server defined URL for the resource (output only).
257 "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.
258 }</pre>
259</div>
260
261<div class="method">
262 <code class="details" id="insert">insert(project, body)</code>
263 <pre>Creates an image resource in the specified project using the data included in the request.
264
265Args:
266 project: string, Name of the project scoping this request. (required)
267 body: object, The request body. (required)
268 The object takes the form of:
269
270{ # A disk image resource.
271 "status": "A String", # Status of the image (output only). It will be one of the following READY - after image has been successfully created and is ready for use FAILED - if creating the image fails for some reason PENDING - the image creation is in progress An image can be used to create other resources suck as instances only after the image has been successfully created and the status is set to READY.
272 "kind": "compute#image", # Type of the resource.
273 "description": "A String", # Textual description of the resource; provided by the client when the resource is created.
274 "rawDisk": { # The raw disk image parameters.
Craig Citro065b5302014-08-14 00:47:23 -0700275 "containerType": "A String", # The format used to encode and transmit the block device. Should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
John Asmuth614db982014-04-24 15:46:26 -0400276 "source": "A String", # The full Google Cloud Storage URL where the disk image is stored; provided by the client when the disk image is created.
277 "sha1Checksum": "A String", # An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.
278 },
279 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
280 "deleted": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED.
281 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED.
282 "state": "A String", # The deprecation state. Can be "DEPRECATED", "OBSOLETE", or "DELETED". Operations which create a new resource using a "DEPRECATED" resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. New uses of "OBSOLETE" or "DELETED" resources will result in an error.
283 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE.
284 "replacement": "A String", # A URL of the suggested replacement for the deprecated resource. The deprecated resource and its replacement must be resources of the same kind.
285 },
286 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Craig Citro065b5302014-08-14 00:47:23 -0700287 "sourceDiskId": "A String", # The 'id' value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
288 "diskSizeGb": "A String", # Size of the image when restored onto a disk (in GiB).
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700289 "sourceDisk": "A String", # The source disk used to create this image.
Craig Citro065b5302014-08-14 00:47:23 -0700290 "licenses": [ # Public visible licenses.
291 "A String",
292 ],
John Asmuth614db982014-04-24 15:46:26 -0400293 "sourceType": "RAW", # Must be "RAW"; provided by the client when the disk image is created.
294 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
295 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
296 "selfLink": "A String", # Server defined URL for the resource (output only).
297 "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.
298 }
299
300
301Returns:
302 An object of the form:
303
304 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800305 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
306 "clientOperationId": "A String",
307 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
308 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
309 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
310 "operationType": "A String",
311 "httpErrorMessage": "A String",
312 "progress": 42,
313 "httpErrorStatusCode": 42,
314 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
315 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
316 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
317 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400318 {
319 "message": "A String", # Optional human-readable details for this warning.
320 "code": "A String", # The warning type identifier for this warning.
321 "data": [ # Metadata for this warning in 'key: value' format.
322 {
323 "value": "A String", # A warning data value corresponding to the key.
324 "key": "A String", # A key for the warning data.
325 },
326 ],
327 },
328 ],
Craig Citroe633be12015-03-02 13:40:36 -0800329 "user": "A String",
330 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
331 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
332 "name": "A String", # [Output Only] Name of the resource (output only).
333 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
334 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
335 "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 },
Craig Citroe633be12015-03-02 13:40:36 -0800343 "endTime": "A String",
344 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
345 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400346 }</pre>
347</div>
348
349<div class="method">
350 <code class="details" id="list">list(project, maxResults=None, pageToken=None, filter=None)</code>
351 <pre>Retrieves the list of image resources available to the specified project.
352
353Args:
354 project: string, Name of the project scoping this request. (required)
355 maxResults: integer, Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.
356 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
357 filter: string, Optional. Filter expression for filtering listed resources.
358
359Returns:
360 An object of the form:
361
362 { # Contains a list of disk image resources.
363 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
Craig Citroe633be12015-03-02 13:40:36 -0800364 "items": [ # A list of Image resources.
John Asmuth614db982014-04-24 15:46:26 -0400365 { # A disk image resource.
366 "status": "A String", # Status of the image (output only). It will be one of the following READY - after image has been successfully created and is ready for use FAILED - if creating the image fails for some reason PENDING - the image creation is in progress An image can be used to create other resources suck as instances only after the image has been successfully created and the status is set to READY.
367 "kind": "compute#image", # Type of the resource.
368 "description": "A String", # Textual description of the resource; provided by the client when the resource is created.
369 "rawDisk": { # The raw disk image parameters.
Craig Citro065b5302014-08-14 00:47:23 -0700370 "containerType": "A String", # The format used to encode and transmit the block device. Should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
John Asmuth614db982014-04-24 15:46:26 -0400371 "source": "A String", # The full Google Cloud Storage URL where the disk image is stored; provided by the client when the disk image is created.
372 "sha1Checksum": "A String", # An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.
373 },
374 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
375 "deleted": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED.
376 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED.
377 "state": "A String", # The deprecation state. Can be "DEPRECATED", "OBSOLETE", or "DELETED". Operations which create a new resource using a "DEPRECATED" resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. New uses of "OBSOLETE" or "DELETED" resources will result in an error.
378 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE.
379 "replacement": "A String", # A URL of the suggested replacement for the deprecated resource. The deprecated resource and its replacement must be resources of the same kind.
380 },
381 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Craig Citro065b5302014-08-14 00:47:23 -0700382 "sourceDiskId": "A String", # The 'id' value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
383 "diskSizeGb": "A String", # Size of the image when restored onto a disk (in GiB).
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700384 "sourceDisk": "A String", # The source disk used to create this image.
Craig Citro065b5302014-08-14 00:47:23 -0700385 "licenses": [ # Public visible licenses.
386 "A String",
387 ],
John Asmuth614db982014-04-24 15:46:26 -0400388 "sourceType": "RAW", # Must be "RAW"; provided by the client when the disk image is created.
389 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
390 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
391 "selfLink": "A String", # Server defined URL for the resource (output only).
392 "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.
393 },
394 ],
395 "kind": "compute#imageList", # Type of resource.
396 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
397 "selfLink": "A String", # Server defined URL for this resource (output only).
398 }</pre>
399</div>
400
401<div class="method">
402 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
403 <pre>Retrieves the next page of results.
404
405Args:
406 previous_request: The request for the previous page. (required)
407 previous_response: The response from the request for the previous page. (required)
408
409Returns:
410 A request object that you can call 'execute()' on to request the next
411 page. Returns None if there are no more items in the collection.
412 </pre>
413</div>
414
415</body></html>