blob: b946e7ce85e3685333be5529b7c8520941be99c7 [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.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</a></code></p>
79<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Retrieves aggregated list of instances.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#attachDisk">attachDisk(project, zone, instance, body)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000088<p class="firstline">Attaches a Disk resource to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#delete">delete(project, zone, instance)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
93 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</a></code></p>
94<p class="firstline">Deletes an access config from an instance's network interface.</p>
95<p class="toc_element">
96 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName)</a></code></p>
97<p class="firstline">Detaches a disk from an instance.</p>
98<p class="toc_element">
99 <code><a href="#get">get(project, zone, instance)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700100<p class="firstline">Returns the specified Instance resource. Get a list of available instances by making a list() request.</p>
John Asmuth614db982014-04-24 15:46:26 -0400101<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000102 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<p class="firstline">Returns the specified instance's serial port output.</p>
104<p class="toc_element">
105 <code><a href="#insert">insert(project, zone, body)</a></code></p>
106<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
107<p class="toc_element">
108 <code><a href="#list">list(project, zone, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
John Asmuth614db982014-04-24 15:46:26 -0400110<p class="toc_element">
111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114 <code><a href="#reset">reset(project, zone, instance)</a></code></p>
115<p class="firstline">Performs a hard reset on the instance.</p>
116<p class="toc_element">
117 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000118<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800120 <code><a href="#setMachineType">setMachineType(project, zone, instance, body)</a></code></p>
121<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
122<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -0400123 <code><a href="#setMetadata">setMetadata(project, zone, instance, body)</a></code></p>
124<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
125<p class="toc_element">
126 <code><a href="#setScheduling">setScheduling(project, zone, instance, body)</a></code></p>
127<p class="firstline">Sets an instance's scheduling options.</p>
128<p class="toc_element">
129 <code><a href="#setTags">setTags(project, zone, instance, body)</a></code></p>
130<p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800131<p class="toc_element">
132 <code><a href="#start">start(project, zone, instance)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800133<p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800134<p class="toc_element">
135 <code><a href="#stop">stop(project, zone, instance)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800136<p class="firstline">Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400137<h3>Method Details</h3>
138<div class="method">
139 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</code>
140 <pre>Adds an access config to an instance's network interface.
141
142Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000143 project: string, Project ID for this request. (required)
144 zone: string, The name of the zone for this request. (required)
145 instance: string, The instance name for this request. (required)
146 networkInterface: string, The name of the network interface to add to this instance. (required)
John Asmuth614db982014-04-24 15:46:26 -0400147 body: object, The request body. (required)
148 The object takes the form of:
149
150{ # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000151 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
152 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400153 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000154 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400155}
156
157
158Returns:
159 An object of the form:
160
Takashi Matsuo06694102015-09-11 13:55:40 -0700161 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800162 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
163 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000164 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800165 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
166 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
167 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
168 "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 +0000169 "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 -0800170 "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.
171 "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 -0800172 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800173 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
174 "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 +0000175 "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 -0400176 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800177 "message": "A String", # [Output Only] A human-readable description of the warning code.
178 "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.
179 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
180 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400181 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000182 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700183 "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 -0400184 },
185 ],
186 },
187 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000188 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800189 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
190 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000191 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800192 "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 +0000193 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800194 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400195 {
Craig Citroe633be12015-03-02 13:40:36 -0800196 "message": "A String", # [Output Only] An optional, human-readable error message.
197 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700198 "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 -0400199 },
200 ],
201 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800202 "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 -0700203 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800204 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400205 }</pre>
206</div>
207
208<div class="method">
209 <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800210 <pre>Retrieves aggregated list of instances.
John Asmuth614db982014-04-24 15:46:26 -0400211
212Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000213 project: string, Project ID for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800214 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.
215 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.
216 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 -0700217
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800218The 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 -0700219
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700220For 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 -0800221
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700222Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. 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 -0800223
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700224The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
John Asmuth614db982014-04-24 15:46:26 -0400225
226Returns:
227 An object of the form:
228
229 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800230 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000231 "items": { # [Output Only] A map of scoped instance lists.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800232 "a_key": { # [Output Only] Name of the scope containing this set of instances.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000233 "instances": [ # [Output Only] List of instances contained in this scope.
234 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000235 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
236 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000237 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
238 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800239 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000240 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700241 "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700242 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
243 "A String",
244 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000245 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
246 #
247 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700248 },
John Asmuth614db982014-04-24 15:46:26 -0400249 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
250 { # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700251 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000252 #
253 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
254 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
255 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
256 #
257 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
258 #
259 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
260 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
261 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700262 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
263 #
264 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
265 #
266 # projects/debian-cloud/global/images/family/debian-8
267 #
268 # Alternatively, use a specific version of a public operating system image:
269 #
270 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
271 #
272 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000273 #
274 # global/images/my-private-image
275 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700276 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000277 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700278 # global/images/family/my-private-family
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000279 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
280 #
281 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
282 #
283 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
284 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
285 # - projects/project/zones/zone/diskTypes/diskType
286 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400287 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000288 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
289 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
290 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
291 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700292 "A String",
293 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000294 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800295 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000296 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
297 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700298 },
John Asmuth614db982014-04-24 15:46:26 -0400299 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800300 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000301 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
302 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700303 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
304 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800305 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -0400306 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800307 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000308 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800309 # zones/us-central1-f/machineTypes/n1-standard-1
310 #
311 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
312 #
313 # zones/zone/machineTypes/custom-CPUS-MEMORY
314 #
315 # For example: zones/us-central1-f/machineTypes/custom-4-5120
316 #
317 # For a full list of restrictions, read the Specifications for custom machine types.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000318 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.
John Asmuth614db982014-04-24 15:46:26 -0400319 { # A service account.
320 "scopes": [ # The list of scopes to be made available for this service account.
321 "A String",
322 ],
323 "email": "A String", # Email address of the service account.
324 },
325 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000326 "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.
John Asmuth614db982014-04-24 15:46:26 -0400327 { # A network interface resource attached to an instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700328 "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400329 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000330 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
331 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400332 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000333 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400334 },
335 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700336 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000337 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800338 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700339 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
340 # - regions/region/subnetworks/subnetwork
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000341 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
342 #
343 # global/networks/default
344 #
345 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
346 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
347 # - projects/project/global/networks/network
348 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400349 },
350 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000351 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800352 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
353 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000354 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
John Asmuth614db982014-04-24 15:46:26 -0400355 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
356 {
357 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
358 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
359 },
360 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000361 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
362 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -0400363 },
364 },
365 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000366 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800367 "message": "A String", # [Output Only] A human-readable description of the warning code.
368 "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.
369 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
370 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400371 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000372 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700373 "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 -0400374 },
375 ],
376 },
377 },
378 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000379 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800380 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
381 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400382 }</pre>
383</div>
384
385<div class="method">
386 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
387 <pre>Retrieves the next page of results.
388
389Args:
390 previous_request: The request for the previous page. (required)
391 previous_response: The response from the request for the previous page. (required)
392
393Returns:
394 A request object that you can call 'execute()' on to request the next
395 page. Returns None if there are no more items in the collection.
396 </pre>
397</div>
398
399<div class="method">
400 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000401 <pre>Attaches a Disk resource to an instance.
John Asmuth614db982014-04-24 15:46:26 -0400402
403Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000404 project: string, Project ID for this request. (required)
405 zone: string, The name of the zone for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800406 instance: string, The instance name for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400407 body: object, The request body. (required)
408 The object takes the form of:
409
410{ # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700411 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000412 #
413 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
414 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
415 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
416 #
417 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
418 #
419 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
420 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
421 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700422 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
423 #
424 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
425 #
426 # projects/debian-cloud/global/images/family/debian-8
427 #
428 # Alternatively, use a specific version of a public operating system image:
429 #
430 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
431 #
432 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000433 #
434 # global/images/my-private-image
435 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700436 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000437 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700438 # global/images/family/my-private-family
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000439 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
440 #
441 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
442 #
443 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
444 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
445 # - projects/project/zones/zone/diskTypes/diskType
446 # - zones/zone/diskTypes/diskType
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700447 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000448 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
449 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
450 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
451 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700452 "A String",
453 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000454 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800455 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000456 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
457 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700458}
John Asmuth614db982014-04-24 15:46:26 -0400459
460
461Returns:
462 An object of the form:
463
Takashi Matsuo06694102015-09-11 13:55:40 -0700464 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800465 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
466 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000467 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800468 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
469 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
470 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
471 "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 +0000472 "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 -0800473 "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.
474 "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 -0800475 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800476 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
477 "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 +0000478 "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 -0400479 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800480 "message": "A String", # [Output Only] A human-readable description of the warning code.
481 "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.
482 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
483 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400484 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000485 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700486 "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 -0400487 },
488 ],
489 },
490 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000491 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800492 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
493 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000494 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800495 "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 +0000496 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800497 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400498 {
Craig Citroe633be12015-03-02 13:40:36 -0800499 "message": "A String", # [Output Only] An optional, human-readable error message.
500 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700501 "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 -0400502 },
503 ],
504 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800505 "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 -0700506 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800507 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400508 }</pre>
509</div>
510
511<div class="method">
512 <code class="details" id="delete">delete(project, zone, instance)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800513 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
John Asmuth614db982014-04-24 15:46:26 -0400514
515Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000516 project: string, Project ID for this request. (required)
517 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400518 instance: string, Name of the instance resource to delete. (required)
519
520Returns:
521 An object of the form:
522
Takashi Matsuo06694102015-09-11 13:55:40 -0700523 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800524 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
525 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000526 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800527 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
528 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
529 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
530 "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 +0000531 "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 -0800532 "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.
533 "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 -0800534 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800535 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
536 "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 +0000537 "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 -0400538 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800539 "message": "A String", # [Output Only] A human-readable description of the warning code.
540 "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.
541 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
542 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400543 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000544 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700545 "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 -0400546 },
547 ],
548 },
549 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000550 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800551 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
552 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000553 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800554 "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 +0000555 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800556 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400557 {
Craig Citroe633be12015-03-02 13:40:36 -0800558 "message": "A String", # [Output Only] An optional, human-readable error message.
559 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700560 "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 -0400561 },
562 ],
563 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800564 "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 -0700565 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800566 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400567 }</pre>
568</div>
569
570<div class="method">
571 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
572 <pre>Deletes an access config from an instance's network interface.
573
574Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000575 project: string, Project ID for this request. (required)
576 zone: string, The name of the zone for this request. (required)
577 instance: string, The instance name for this request. (required)
578 accessConfig: string, The name of the access config to delete. (required)
579 networkInterface: string, The name of the network interface. (required)
John Asmuth614db982014-04-24 15:46:26 -0400580
581Returns:
582 An object of the form:
583
Takashi Matsuo06694102015-09-11 13:55:40 -0700584 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800585 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
586 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000587 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800588 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
589 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
590 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
591 "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 +0000592 "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 -0800593 "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.
594 "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 -0800595 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800596 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
597 "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 +0000598 "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 -0400599 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800600 "message": "A String", # [Output Only] A human-readable description of the warning code.
601 "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.
602 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
603 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400604 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000605 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700606 "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 -0400607 },
608 ],
609 },
610 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000611 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800612 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
613 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000614 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800615 "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 +0000616 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800617 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400618 {
Craig Citroe633be12015-03-02 13:40:36 -0800619 "message": "A String", # [Output Only] An optional, human-readable error message.
620 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700621 "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 -0400622 },
623 ],
624 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800625 "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 -0700626 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800627 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400628 }</pre>
629</div>
630
631<div class="method">
632 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
633 <pre>Detaches a disk from an instance.
634
635Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000636 project: string, Project ID for this request. (required)
637 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400638 instance: string, Instance name. (required)
639 deviceName: string, Disk device name to detach. (required)
640
641Returns:
642 An object of the form:
643
Takashi Matsuo06694102015-09-11 13:55:40 -0700644 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800645 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
646 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000647 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800648 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
649 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
650 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
651 "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 +0000652 "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 -0800653 "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.
654 "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 -0800655 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800656 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
657 "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 +0000658 "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 -0400659 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800660 "message": "A String", # [Output Only] A human-readable description of the warning code.
661 "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.
662 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
663 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400664 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000665 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700666 "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 -0400667 },
668 ],
669 },
670 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000671 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800672 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
673 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000674 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800675 "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 +0000676 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800677 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400678 {
Craig Citroe633be12015-03-02 13:40:36 -0800679 "message": "A String", # [Output Only] An optional, human-readable error message.
680 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700681 "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 -0400682 },
683 ],
684 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800685 "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 -0700686 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800687 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -0400688 }</pre>
689</div>
690
691<div class="method">
692 <code class="details" id="get">get(project, zone, instance)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700693 <pre>Returns the specified Instance resource. Get a list of available instances by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -0400694
695Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000696 project: string, Project ID for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700697 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400698 instance: string, Name of the instance resource to return. (required)
699
700Returns:
701 An object of the form:
702
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000703 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000704 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
705 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000706 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
707 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800708 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000709 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700710 "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700711 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
712 "A String",
713 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000714 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
715 #
716 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700717 },
John Asmuth614db982014-04-24 15:46:26 -0400718 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
719 { # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700720 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000721 #
722 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
723 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
724 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
725 #
726 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
727 #
728 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
729 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
730 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700731 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
732 #
733 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
734 #
735 # projects/debian-cloud/global/images/family/debian-8
736 #
737 # Alternatively, use a specific version of a public operating system image:
738 #
739 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
740 #
741 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000742 #
743 # global/images/my-private-image
744 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700745 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000746 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700747 # global/images/family/my-private-family
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000748 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
749 #
750 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
751 #
752 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
753 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
754 # - projects/project/zones/zone/diskTypes/diskType
755 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400756 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000757 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
758 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
759 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
760 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700761 "A String",
762 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000763 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800764 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000765 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
766 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700767 },
John Asmuth614db982014-04-24 15:46:26 -0400768 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800769 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000770 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
771 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700772 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
773 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800774 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -0400775 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800776 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000777 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800778 # zones/us-central1-f/machineTypes/n1-standard-1
779 #
780 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
781 #
782 # zones/zone/machineTypes/custom-CPUS-MEMORY
783 #
784 # For example: zones/us-central1-f/machineTypes/custom-4-5120
785 #
786 # For a full list of restrictions, read the Specifications for custom machine types.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000787 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.
John Asmuth614db982014-04-24 15:46:26 -0400788 { # A service account.
789 "scopes": [ # The list of scopes to be made available for this service account.
790 "A String",
791 ],
792 "email": "A String", # Email address of the service account.
793 },
794 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000795 "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.
John Asmuth614db982014-04-24 15:46:26 -0400796 { # A network interface resource attached to an instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700797 "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400798 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000799 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
800 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400801 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000802 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400803 },
804 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700805 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000806 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800807 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700808 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
809 # - regions/region/subnetworks/subnetwork
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000810 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
811 #
812 # global/networks/default
813 #
814 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
815 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
816 # - projects/project/global/networks/network
817 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400818 },
819 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000820 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800821 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
822 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000823 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
John Asmuth614db982014-04-24 15:46:26 -0400824 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
825 {
826 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
827 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
828 },
829 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000830 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
831 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -0400832 },
833 }</pre>
834</div>
835
836<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000837 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400838 <pre>Returns the specified instance's serial port output.
839
840Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000841 project: string, Project ID for this request. (required)
842 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400843 instance: string, Name of the instance scoping this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700844 port: integer, Specifies which COM or serial port to retrieve data from.
John Asmuth614db982014-04-24 15:46:26 -0400845
846Returns:
847 An object of the form:
848
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000849 { # An instance's serial console output.
850 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800851 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000852 "contents": "A String", # [Output Only] The contents of the console output.
John Asmuth614db982014-04-24 15:46:26 -0400853 }</pre>
854</div>
855
856<div class="method">
857 <code class="details" id="insert">insert(project, zone, body)</code>
858 <pre>Creates an instance resource in the specified project using the data included in the request.
859
860Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000861 project: string, Project ID for this request. (required)
862 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400863 body: object, The request body. (required)
864 The object takes the form of:
865
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000866{ # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000867 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
868 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000869 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
870 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800871 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000872 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700873 "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700874 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
875 "A String",
876 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000877 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
878 #
879 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700880 },
John Asmuth614db982014-04-24 15:46:26 -0400881 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
882 { # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700883 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000884 #
885 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
886 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
887 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
888 #
889 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
890 #
891 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
892 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
893 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700894 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
895 #
896 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
897 #
898 # projects/debian-cloud/global/images/family/debian-8
899 #
900 # Alternatively, use a specific version of a public operating system image:
901 #
902 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
903 #
904 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000905 #
906 # global/images/my-private-image
907 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700908 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000909 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700910 # global/images/family/my-private-family
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000911 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
912 #
913 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
914 #
915 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
916 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
917 # - projects/project/zones/zone/diskTypes/diskType
918 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400919 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000920 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
921 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
922 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
923 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700924 "A String",
925 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000926 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800927 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000928 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
929 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700930 },
John Asmuth614db982014-04-24 15:46:26 -0400931 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800932 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000933 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
934 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700935 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
936 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800937 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -0400938 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800939 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000940 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800941 # zones/us-central1-f/machineTypes/n1-standard-1
942 #
943 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
944 #
945 # zones/zone/machineTypes/custom-CPUS-MEMORY
946 #
947 # For example: zones/us-central1-f/machineTypes/custom-4-5120
948 #
949 # For a full list of restrictions, read the Specifications for custom machine types.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000950 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.
John Asmuth614db982014-04-24 15:46:26 -0400951 { # A service account.
952 "scopes": [ # The list of scopes to be made available for this service account.
953 "A String",
954 ],
955 "email": "A String", # Email address of the service account.
956 },
957 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000958 "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.
John Asmuth614db982014-04-24 15:46:26 -0400959 { # A network interface resource attached to an instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700960 "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400961 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000962 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
963 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400964 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000965 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400966 },
967 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700968 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000969 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800970 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700971 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
972 # - regions/region/subnetworks/subnetwork
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000973 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
974 #
975 # global/networks/default
976 #
977 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
978 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
979 # - projects/project/global/networks/network
980 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400981 },
982 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000983 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800984 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
985 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000986 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
John Asmuth614db982014-04-24 15:46:26 -0400987 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
988 {
989 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
990 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
991 },
992 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000993 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
994 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -0400995 },
996}
997
998
999Returns:
1000 An object of the form:
1001
Takashi Matsuo06694102015-09-11 13:55:40 -07001002 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001003 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1004 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001005 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001006 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1007 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1008 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1009 "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 +00001010 "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 -08001011 "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.
1012 "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 -08001013 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001014 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1015 "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 +00001016 "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 -04001017 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001018 "message": "A String", # [Output Only] A human-readable description of the warning code.
1019 "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.
1020 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1021 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001022 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001023 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001024 "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 -04001025 },
1026 ],
1027 },
1028 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001029 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001030 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1031 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001032 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001033 "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 +00001034 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001035 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001036 {
Craig Citroe633be12015-03-02 13:40:36 -08001037 "message": "A String", # [Output Only] An optional, human-readable error message.
1038 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001039 "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 -04001040 },
1041 ],
1042 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001043 "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 -07001044 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001045 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -04001046 }</pre>
1047</div>
1048
1049<div class="method">
1050 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001051 <pre>Retrieves the list of instances contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -04001052
1053Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001054 project: string, Project ID for this request. (required)
1055 zone: string, The name of the zone for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001056 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.
1057 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.
1058 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 -07001059
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001060The 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 -07001061
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001062For 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 -08001063
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001064Compute Engine Beta API Only: When filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. 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 -08001065
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001066The Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
John Asmuth614db982014-04-24 15:46:26 -04001067
1068Returns:
1069 An object of the form:
1070
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001071 { # Contains a list of instances.
1072 "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.
1073 "items": [ # [Output Only] A list of instances.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001074 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001075 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
1076 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001077 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
1078 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001079 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001080 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001081 "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001082 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1083 "A String",
1084 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001085 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
1086 #
1087 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001088 },
John Asmuth614db982014-04-24 15:46:26 -04001089 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1090 { # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -07001091 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001092 #
1093 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
1094 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1095 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
1096 #
1097 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1098 #
1099 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1100 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
1101 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001102 "sourceImage": "A String", # The source image used to create this disk. If the source image is deleted, this field will not be set.
1103 #
1104 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
1105 #
1106 # projects/debian-cloud/global/images/family/debian-8
1107 #
1108 # Alternatively, use a specific version of a public operating system image:
1109 #
1110 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
1111 #
1112 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001113 #
1114 # global/images/my-private-image
1115 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001116 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001117 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001118 # global/images/family/my-private-family
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001119 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
1120 #
1121 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1122 #
1123 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
1124 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1125 # - projects/project/zones/zone/diskTypes/diskType
1126 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -04001127 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001128 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
1129 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
1130 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
1131 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001132 "A String",
1133 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001134 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001135 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001136 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
1137 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001138 },
John Asmuth614db982014-04-24 15:46:26 -04001139 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001140 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001141 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1142 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001143 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
1144 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001145 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -04001146 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001147 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001148 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001149 # zones/us-central1-f/machineTypes/n1-standard-1
1150 #
1151 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
1152 #
1153 # zones/zone/machineTypes/custom-CPUS-MEMORY
1154 #
1155 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1156 #
1157 # For a full list of restrictions, read the Specifications for custom machine types.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001158 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.
John Asmuth614db982014-04-24 15:46:26 -04001159 { # A service account.
1160 "scopes": [ # The list of scopes to be made available for this service account.
1161 "A String",
1162 ],
1163 "email": "A String", # Email address of the service account.
1164 },
1165 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001166 "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.
John Asmuth614db982014-04-24 15:46:26 -04001167 { # A network interface resource attached to an instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001168 "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -04001169 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001170 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1171 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -04001172 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001173 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -04001174 },
1175 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001176 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001177 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001178 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001179 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1180 # - regions/region/subnetworks/subnetwork
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001181 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
1182 #
1183 # global/networks/default
1184 #
1185 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1186 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1187 # - projects/project/global/networks/network
1188 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -04001189 },
1190 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001191 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001192 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1193 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001194 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
John Asmuth614db982014-04-24 15:46:26 -04001195 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1196 {
1197 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
1198 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
1199 },
1200 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001201 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1202 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -04001203 },
1204 },
1205 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001206 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001207 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1208 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -04001209 }</pre>
1210</div>
1211
1212<div class="method">
1213 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1214 <pre>Retrieves the next page of results.
1215
1216Args:
1217 previous_request: The request for the previous page. (required)
1218 previous_response: The response from the request for the previous page. (required)
1219
1220Returns:
1221 A request object that you can call 'execute()' on to request the next
1222 page. Returns None if there are no more items in the collection.
1223 </pre>
1224</div>
1225
1226<div class="method">
1227 <code class="details" id="reset">reset(project, zone, instance)</code>
1228 <pre>Performs a hard reset on the instance.
1229
1230Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001231 project: string, Project ID for this request. (required)
1232 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001233 instance: string, Name of the instance scoping this request. (required)
1234
1235Returns:
1236 An object of the form:
1237
Takashi Matsuo06694102015-09-11 13:55:40 -07001238 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001239 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1240 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001241 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001242 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1243 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1244 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1245 "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 +00001246 "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 -08001247 "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.
1248 "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 -08001249 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001250 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1251 "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 +00001252 "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 -04001253 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001254 "message": "A String", # [Output Only] A human-readable description of the warning code.
1255 "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.
1256 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1257 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001258 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001259 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001260 "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 -04001261 },
1262 ],
1263 },
1264 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001265 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001266 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1267 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001268 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001269 "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 +00001270 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001271 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001272 {
Craig Citroe633be12015-03-02 13:40:36 -08001273 "message": "A String", # [Output Only] An optional, human-readable error message.
1274 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001275 "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 -04001276 },
1277 ],
1278 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001279 "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 -07001280 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001281 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -04001282 }</pre>
1283</div>
1284
1285<div class="method">
1286 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001287 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04001288
1289Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001290 project: string, Project ID for this request. (required)
1291 zone: string, The name of the zone for this request. (required)
1292 instance: string, The instance name. (required)
John Asmuth614db982014-04-24 15:46:26 -04001293 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001294 deviceName: string, The device name of the disk to modify. (required)
John Asmuth614db982014-04-24 15:46:26 -04001295
1296Returns:
1297 An object of the form:
1298
Takashi Matsuo06694102015-09-11 13:55:40 -07001299 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001300 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1301 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001302 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001303 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1304 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1305 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1306 "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 +00001307 "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 -08001308 "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.
1309 "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 -08001310 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001311 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1312 "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 +00001313 "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 -04001314 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001315 "message": "A String", # [Output Only] A human-readable description of the warning code.
1316 "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.
1317 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1318 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001319 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001320 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001321 "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 -04001322 },
1323 ],
1324 },
1325 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001326 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001327 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1328 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001329 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001330 "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 +00001331 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001332 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001333 {
Craig Citroe633be12015-03-02 13:40:36 -08001334 "message": "A String", # [Output Only] An optional, human-readable error message.
1335 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001336 "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 -04001337 },
1338 ],
1339 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001340 "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 -07001341 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001342 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
1343 }</pre>
1344</div>
1345
1346<div class="method">
1347 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body)</code>
1348 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
1349
1350Args:
1351 project: string, Project ID for this request. (required)
1352 zone: string, The name of the zone for this request. (required)
1353 instance: string, Name of the instance scoping this request. (required)
1354 body: object, The request body. (required)
1355 The object takes the form of:
1356
1357{
1358 "machineType": "A String", # Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1
1359 }
1360
1361
1362Returns:
1363 An object of the form:
1364
1365 { # An Operation resource, used to manage asynchronous API requests.
1366 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1367 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1368 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1369 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1370 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1371 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1372 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1373 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1374 "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.
1375 "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.
1376 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1377 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1378 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1379 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1380 {
1381 "message": "A String", # [Output Only] A human-readable description of the warning code.
1382 "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.
1383 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1384 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1385 {
1386 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001387 "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).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001388 },
1389 ],
1390 },
1391 ],
1392 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1393 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1394 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1395 "name": "A String", # [Output Only] Name of the resource.
1396 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1397 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1398 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1399 {
1400 "message": "A String", # [Output Only] An optional, human-readable error message.
1401 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001402 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001403 },
1404 ],
1405 },
1406 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1407 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1408 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -04001409 }</pre>
1410</div>
1411
1412<div class="method">
1413 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
1414 <pre>Sets metadata for the specified instance to the data included in the request.
1415
1416Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001417 project: string, Project ID for this request. (required)
1418 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001419 instance: string, Name of the instance scoping this request. (required)
1420 body: object, The request body. (required)
1421 The object takes the form of:
1422
1423{ # A metadata key/value entry.
1424 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1425 {
1426 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.
1427 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
1428 },
1429 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001430 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1431 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -04001432}
1433
1434
1435Returns:
1436 An object of the form:
1437
Takashi Matsuo06694102015-09-11 13:55:40 -07001438 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001439 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1440 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001441 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001442 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1443 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1444 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1445 "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 +00001446 "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 -08001447 "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.
1448 "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 -08001449 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001450 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1451 "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 +00001452 "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 -04001453 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001454 "message": "A String", # [Output Only] A human-readable description of the warning code.
1455 "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.
1456 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1457 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001458 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001459 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001460 "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 -04001461 },
1462 ],
1463 },
1464 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001465 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001466 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1467 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001468 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001469 "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 +00001470 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001471 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001472 {
Craig Citroe633be12015-03-02 13:40:36 -08001473 "message": "A String", # [Output Only] An optional, human-readable error message.
1474 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001475 "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 -04001476 },
1477 ],
1478 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001479 "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 -07001480 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001481 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -04001482 }</pre>
1483</div>
1484
1485<div class="method">
1486 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body)</code>
1487 <pre>Sets an instance's scheduling options.
1488
1489Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001490 project: string, Project ID for this request. (required)
1491 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001492 instance: string, Instance name. (required)
1493 body: object, The request body. (required)
1494 The object takes the form of:
1495
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001496{ # Sets the scheduling options for an Instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001497 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
1498 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001499 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -04001500}
1501
1502
1503Returns:
1504 An object of the form:
1505
Takashi Matsuo06694102015-09-11 13:55:40 -07001506 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001507 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1508 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001509 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001510 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1511 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1512 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1513 "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 +00001514 "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 -08001515 "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.
1516 "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 -08001517 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001518 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1519 "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 +00001520 "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 -04001521 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001522 "message": "A String", # [Output Only] A human-readable description of the warning code.
1523 "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.
1524 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1525 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001526 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001527 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001528 "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 -04001529 },
1530 ],
1531 },
1532 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001533 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001534 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1535 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001536 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001537 "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 +00001538 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001539 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001540 {
Craig Citroe633be12015-03-02 13:40:36 -08001541 "message": "A String", # [Output Only] An optional, human-readable error message.
1542 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001543 "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 -04001544 },
1545 ],
1546 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001547 "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 -07001548 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001549 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -04001550 }</pre>
1551</div>
1552
1553<div class="method">
1554 <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
1555 <pre>Sets tags for the specified instance to the data included in the request.
1556
1557Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001558 project: string, Project ID for this request. (required)
1559 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001560 instance: string, Name of the instance scoping this request. (required)
1561 body: object, The request body. (required)
1562 The object takes the form of:
1563
1564{ # A set of instance tags.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001565 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1566 "A String",
1567 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001568 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
1569 #
1570 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001571}
John Asmuth614db982014-04-24 15:46:26 -04001572
1573
1574Returns:
1575 An object of the form:
1576
Takashi Matsuo06694102015-09-11 13:55:40 -07001577 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001578 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1579 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001580 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001581 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1582 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1583 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1584 "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 +00001585 "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 -08001586 "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.
1587 "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 -08001588 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001589 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1590 "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 +00001591 "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 -04001592 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001593 "message": "A String", # [Output Only] A human-readable description of the warning code.
1594 "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.
1595 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1596 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001597 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001598 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001599 "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 -04001600 },
1601 ],
1602 },
1603 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001604 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001605 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1606 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001607 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001608 "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 +00001609 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001610 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001611 {
Craig Citroe633be12015-03-02 13:40:36 -08001612 "message": "A String", # [Output Only] An optional, human-readable error message.
1613 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001614 "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 -04001615 },
1616 ],
1617 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001618 "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 -07001619 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001620 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
Craig Citroe633be12015-03-02 13:40:36 -08001621 }</pre>
1622</div>
1623
1624<div class="method">
1625 <code class="details" id="start">start(project, zone, instance)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001626 <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
Craig Citroe633be12015-03-02 13:40:36 -08001627
1628Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001629 project: string, Project ID for this request. (required)
1630 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001631 instance: string, Name of the instance resource to start. (required)
1632
1633Returns:
1634 An object of the form:
1635
Takashi Matsuo06694102015-09-11 13:55:40 -07001636 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001637 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1638 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001639 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001640 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1641 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1642 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1643 "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 +00001644 "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 -08001645 "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.
1646 "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 -08001647 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001648 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1649 "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 +00001650 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001651 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001652 "message": "A String", # [Output Only] A human-readable description of the warning code.
1653 "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.
1654 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1655 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citroe633be12015-03-02 13:40:36 -08001656 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001657 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001658 "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).
Craig Citroe633be12015-03-02 13:40:36 -08001659 },
1660 ],
1661 },
1662 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001663 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001664 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1665 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001666 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001667 "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 +00001668 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001669 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1670 {
1671 "message": "A String", # [Output Only] An optional, human-readable error message.
1672 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001673 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citroe633be12015-03-02 13:40:36 -08001674 },
1675 ],
1676 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001677 "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 -07001678 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001679 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
Craig Citroe633be12015-03-02 13:40:36 -08001680 }</pre>
1681</div>
1682
1683<div class="method">
1684 <code class="details" id="stop">stop(project, zone, instance)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001685 <pre>Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Craig Citroe633be12015-03-02 13:40:36 -08001686
1687Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001688 project: string, Project ID for this request. (required)
1689 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001690 instance: string, Name of the instance resource to stop. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001691
1692Returns:
1693 An object of the form:
1694
Takashi Matsuo06694102015-09-11 13:55:40 -07001695 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001696 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1697 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001698 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001699 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1700 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1701 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1702 "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 +00001703 "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 -08001704 "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.
1705 "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 -08001706 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001707 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1708 "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 +00001709 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001710 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001711 "message": "A String", # [Output Only] A human-readable description of the warning code.
1712 "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.
1713 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1714 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citroe633be12015-03-02 13:40:36 -08001715 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001716 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001717 "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).
Craig Citroe633be12015-03-02 13:40:36 -08001718 },
1719 ],
1720 },
1721 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001722 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001723 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1724 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001725 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001726 "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 +00001727 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001728 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1729 {
1730 "message": "A String", # [Output Only] An optional, human-readable error message.
1731 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001732 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citroe633be12015-03-02 13:40:36 -08001733 },
1734 ],
1735 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001736 "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 -07001737 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001738 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies.
John Asmuth614db982014-04-24 15:46:26 -04001739 }</pre>
1740</div>
1741
1742</body></html>