blob: 1098676fc0311ae068305441e4d13fa6f6a137fd [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>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Deletes the specified image.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
81 <code><a href="#deprecate">deprecate(project, image, body)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000082<p class="firstline">Sets the deprecation status of an image.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
84 <code><a href="#get">get(project, image)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070085<p class="firstline">Returns the specified image. Get a list of available images by making a list() request.</p>
86<p class="toc_element">
87 <code><a href="#getFromFamily">getFromFamily(project, family)</a></code></p>
88<p class="firstline">Returns the latest image that is part of an image family and is not deprecated.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#insert">insert(project, body)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Creates an image in the specified project using the data included in the request.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070093 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070094<p class="firstline">Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040098<p class="toc_element">
99 <code><a href="#setLabels">setLabels(project, resource, body)</a></code></p>
100<p class="firstline">Sets the labels on an image. To learn more about labels, read the Labeling or Tagging Resources documentation.</p>
John Asmuth614db982014-04-24 15:46:26 -0400101<h3>Method Details</h3>
102<div class="method">
103 <code class="details" id="delete">delete(project, image)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800104 <pre>Deletes the specified image.
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)
John Asmuth614db982014-04-24 15:46:26 -0400108 image: string, Name of the image resource to delete. (required)
109
110Returns:
111 An object of the form:
112
Takashi Matsuo06694102015-09-11 13:55:40 -0700113 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800114 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
115 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400116 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800117 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
118 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
119 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
120 "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 +0000121 "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 -0800122 "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.
123 "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 -0800124 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800125 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
126 "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 +0000127 "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 -0400128 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800129 "message": "A String", # [Output Only] A human-readable description of the warning code.
130 "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.
131 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
132 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400133 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000134 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700135 "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 -0400136 },
137 ],
138 },
139 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000140 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800141 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
142 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000143 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800144 "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 +0000145 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800146 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400147 {
Craig Citroe633be12015-03-02 13:40:36 -0800148 "message": "A String", # [Output Only] An optional, human-readable error message.
149 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700150 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400151 },
152 ],
153 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800154 "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 -0700155 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800156 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400157 }</pre>
158</div>
159
160<div class="method">
161 <code class="details" id="deprecate">deprecate(project, image, body)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000162 <pre>Sets the deprecation status of an image.
163
164If an empty request body is given, clears the deprecation status instead.
John Asmuth614db982014-04-24 15:46:26 -0400165
166Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000167 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400168 image: string, Image name. (required)
169 body: object, The request body. (required)
170 The object takes the form of:
171
172{ # Deprecation status for a public resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800173 "deleted": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
174 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000175 "state": "A String", # The deprecation state of this resource. This 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. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800176 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000177 "replacement": "A String", # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
John Asmuth614db982014-04-24 15:46:26 -0400178}
179
180
181Returns:
182 An object of the form:
183
Takashi Matsuo06694102015-09-11 13:55:40 -0700184 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800185 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
186 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400187 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800188 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
189 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
190 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
191 "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 +0000192 "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 -0800193 "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.
194 "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 -0800195 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800196 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
197 "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 +0000198 "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 -0400199 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800200 "message": "A String", # [Output Only] A human-readable description of the warning code.
201 "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.
202 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
203 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400204 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000205 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700206 "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 -0400207 },
208 ],
209 },
210 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000211 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800212 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
213 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000214 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800215 "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 +0000216 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800217 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400218 {
Craig Citroe633be12015-03-02 13:40:36 -0800219 "message": "A String", # [Output Only] An optional, human-readable error message.
220 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700221 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400222 },
223 ],
224 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800225 "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 -0700226 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800227 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400228 }</pre>
229</div>
230
231<div class="method">
232 <code class="details" id="get">get(project, image)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700233 <pre>Returns the specified image. Get a list of available images by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -0400234
235Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000236 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400237 image: string, Name of the image resource to return. (required)
238
239Returns:
240 An object of the form:
241
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000242 { # An Image resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800243 "sourceDisk": "A String", # URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700244 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
245 # - projects/project/zones/zone/disks/disk
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700246 # - zones/zone/disks/disk
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000247 "status": "A String", # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
248 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700249 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
250 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
251 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
252 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800253 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700254 "family": "A String", # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
John Asmuth614db982014-04-24 15:46:26 -0400255 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800256 "deleted": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
257 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000258 "state": "A String", # The deprecation state of this resource. This 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. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800259 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000260 "replacement": "A String", # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
John Asmuth614db982014-04-24 15:46:26 -0400261 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400262 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
263 #
264 # To see the latest fingerprint, make a get() request to retrieve an image.
265 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
266 "a_key": "A String",
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700267 },
268 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
269 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400270 "guestOsFeatures": [ # A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800271 #
272 # For new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.
273 { # Guest OS features.
274 "type": "A String", # The type of supported feature. Currenty only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.
275 },
276 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700277 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700278 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
279 #
280 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
281 #
282 # Customer-supplied encryption keys do not protect access to metadata of the disk.
283 #
284 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
285 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
286 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
287 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400288 "rawDisk": { # The parameters of the raw disk image.
289 "containerType": "A String", # The format used to encode and transmit the block device, which 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.
290 "source": "A String", # The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
291 "sha1Checksum": "A String", # An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.
292 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700293 "licenses": [ # Any applicable license URI.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700294 "A String",
295 ],
296 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
297 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
298 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
299 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
300 "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.
301 }</pre>
302</div>
303
304<div class="method">
305 <code class="details" id="getFromFamily">getFromFamily(project, family)</code>
306 <pre>Returns the latest image that is part of an image family and is not deprecated.
307
308Args:
309 project: string, Project ID for this request. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700310 family: string, Name of the image family to search for. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700311
312Returns:
313 An object of the form:
314
315 { # An Image resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800316 "sourceDisk": "A String", # URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700317 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
318 # - projects/project/zones/zone/disks/disk
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700319 # - zones/zone/disks/disk
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700320 "status": "A String", # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
321 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700322 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
323 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
324 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
325 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700326 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700327 "family": "A String", # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700328 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800329 "deleted": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
330 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700331 "state": "A String", # The deprecation state of this resource. This 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. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800332 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700333 "replacement": "A String", # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
334 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400335 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
336 #
337 # To see the latest fingerprint, make a get() request to retrieve an image.
338 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
339 "a_key": "A String",
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700340 },
John Asmuth614db982014-04-24 15:46:26 -0400341 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000342 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400343 "guestOsFeatures": [ # A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800344 #
345 # For new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.
346 { # Guest OS features.
347 "type": "A String", # The type of supported feature. Currenty only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.
348 },
349 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000350 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700351 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
352 #
353 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
354 #
355 # Customer-supplied encryption keys do not protect access to metadata of the disk.
356 #
357 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
358 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
359 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
360 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400361 "rawDisk": { # The parameters of the raw disk image.
362 "containerType": "A String", # The format used to encode and transmit the block device, which 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.
363 "source": "A String", # The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
364 "sha1Checksum": "A String", # An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.
365 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700366 "licenses": [ # Any applicable license URI.
Craig Citro065b5302014-08-14 00:47:23 -0700367 "A String",
368 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000369 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
370 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800371 "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 -0700372 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000373 "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 -0400374 }</pre>
375</div>
376
377<div class="method">
378 <code class="details" id="insert">insert(project, body)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800379 <pre>Creates an image in the specified project using the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400380
381Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000382 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400383 body: object, The request body. (required)
384 The object takes the form of:
385
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000386{ # An Image resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800387 "sourceDisk": "A String", # URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700388 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
389 # - projects/project/zones/zone/disks/disk
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700390 # - zones/zone/disks/disk
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000391 "status": "A String", # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
392 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700393 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
394 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
395 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
396 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800397 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700398 "family": "A String", # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
John Asmuth614db982014-04-24 15:46:26 -0400399 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800400 "deleted": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
401 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000402 "state": "A String", # The deprecation state of this resource. This 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. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800403 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000404 "replacement": "A String", # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
John Asmuth614db982014-04-24 15:46:26 -0400405 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400406 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
407 #
408 # To see the latest fingerprint, make a get() request to retrieve an image.
409 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
410 "a_key": "A String",
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700411 },
John Asmuth614db982014-04-24 15:46:26 -0400412 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000413 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400414 "guestOsFeatures": [ # A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800415 #
416 # For new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.
417 { # Guest OS features.
418 "type": "A String", # The type of supported feature. Currenty only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.
419 },
420 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000421 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700422 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
423 #
424 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
425 #
426 # Customer-supplied encryption keys do not protect access to metadata of the disk.
427 #
428 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
429 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
430 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
431 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400432 "rawDisk": { # The parameters of the raw disk image.
433 "containerType": "A String", # The format used to encode and transmit the block device, which 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.
434 "source": "A String", # The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
435 "sha1Checksum": "A String", # An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.
436 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700437 "licenses": [ # Any applicable license URI.
Craig Citro065b5302014-08-14 00:47:23 -0700438 "A String",
439 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000440 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
441 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800442 "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 -0700443 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000444 "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 -0400445 }
446
447
448Returns:
449 An object of the form:
450
Takashi Matsuo06694102015-09-11 13:55:40 -0700451 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800452 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
453 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400454 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800455 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
456 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
457 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
458 "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 +0000459 "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 -0800460 "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.
461 "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 -0800462 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800463 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
464 "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 +0000465 "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 -0400466 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800467 "message": "A String", # [Output Only] A human-readable description of the warning code.
468 "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.
469 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
470 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400471 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000472 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700473 "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 -0400474 },
475 ],
476 },
477 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000478 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800479 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
480 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000481 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800482 "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 +0000483 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800484 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400485 {
Craig Citroe633be12015-03-02 13:40:36 -0800486 "message": "A String", # [Output Only] An optional, human-readable error message.
487 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700488 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400489 },
490 ],
491 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800492 "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 -0700493 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800494 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400495 }</pre>
496</div>
497
498<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700499 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700500 <pre>Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
John Asmuth614db982014-04-24 15:46:26 -0400501
502Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000503 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700504 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
505
506You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
507
508Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400509 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. Acceptable values are 0 to 500, inclusive. (Default: 500)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800510 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.
511 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 -0700512
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800513The 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 -0700514
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700515For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800516
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700517You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800518
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700519To filter on multiple expressions, provide 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 -0400520
521Returns:
522 An object of the form:
523
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800524 { # Contains a list of images.
525 "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.
526 "items": [ # [Output Only] A list of Image resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000527 { # An Image resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800528 "sourceDisk": "A String", # URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700529 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
530 # - projects/project/zones/zone/disks/disk
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700531 # - zones/zone/disks/disk
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000532 "status": "A String", # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
533 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700534 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
535 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
536 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
537 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800538 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700539 "family": "A String", # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
John Asmuth614db982014-04-24 15:46:26 -0400540 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800541 "deleted": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
542 "deprecated": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000543 "state": "A String", # The deprecation state of this resource. This 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. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800544 "obsolete": "A String", # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000545 "replacement": "A String", # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
John Asmuth614db982014-04-24 15:46:26 -0400546 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400547 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
548 #
549 # To see the latest fingerprint, make a get() request to retrieve an image.
550 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
551 "a_key": "A String",
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700552 },
John Asmuth614db982014-04-24 15:46:26 -0400553 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000554 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400555 "guestOsFeatures": [ # A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800556 #
557 # For new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.
558 { # Guest OS features.
559 "type": "A String", # The type of supported feature. Currenty only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.
560 },
561 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000562 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700563 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
564 #
565 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
566 #
567 # Customer-supplied encryption keys do not protect access to metadata of the disk.
568 #
569 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
570 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
571 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
572 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400573 "rawDisk": { # The parameters of the raw disk image.
574 "containerType": "A String", # The format used to encode and transmit the block device, which 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.
575 "source": "A String", # The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
576 "sha1Checksum": "A String", # An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.
577 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700578 "licenses": [ # Any applicable license URI.
Craig Citro065b5302014-08-14 00:47:23 -0700579 "A String",
580 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000581 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
582 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800583 "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 -0700584 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000585 "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 -0400586 },
587 ],
588 "kind": "compute#imageList", # Type of resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800589 "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 -0700590 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400591 }</pre>
592</div>
593
594<div class="method">
595 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
596 <pre>Retrieves the next page of results.
597
598Args:
599 previous_request: The request for the previous page. (required)
600 previous_response: The response from the request for the previous page. (required)
601
602Returns:
603 A request object that you can call 'execute()' on to request the next
604 page. Returns None if there are no more items in the collection.
605 </pre>
606</div>
607
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400608<div class="method">
609 <code class="details" id="setLabels">setLabels(project, resource, body)</code>
610 <pre>Sets the labels on an image. To learn more about labels, read the Labeling or Tagging Resources documentation.
611
612Args:
613 project: string, Project ID for this request. (required)
614 resource: string, Name of the resource for this request. (required)
615 body: object, The request body. (required)
616 The object takes the form of:
617
618{
619 "labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels. Make a get() request to the resource to get the latest fingerprint.
620 "labels": { # A list of labels to apply for this resource. Each label key & value must 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. For example, "webserver-frontend": "images". A label value can also be empty (e.g. "my-label": "").
621 "a_key": "A String",
622 },
623 }
624
625
626Returns:
627 An object of the form:
628
629 { # An Operation resource, used to manage asynchronous API requests.
630 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
631 "clientOperationId": "A String", # [Output Only] Reserved for future use.
632 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
633 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
634 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
635 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
636 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
637 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
638 "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.
639 "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.
640 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
641 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
642 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
643 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
644 {
645 "message": "A String", # [Output Only] A human-readable description of the warning code.
646 "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.
647 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
648 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
649 {
650 "value": "A String", # [Output Only] A warning data value corresponding to the key.
651 "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).
652 },
653 ],
654 },
655 ],
656 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
657 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
658 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
659 "name": "A String", # [Output Only] Name of the resource.
660 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
661 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
662 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
663 {
664 "message": "A String", # [Output Only] An optional, human-readable error message.
665 "code": "A String", # [Output Only] The error type identifier for this error.
666 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
667 },
668 ],
669 },
670 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
671 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
672 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
673 }</pre>
674</div>
675
John Asmuth614db982014-04-24 15:46:26 -0400676</body></html>