blob: bd060eeefc284e139f74034a62a673e3afd4994f [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>
82<p class="firstline">A description of how to use this function</p>
83<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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000091<p class="firstline">Deletes the specified Instance resource. For more information, see Shutting down 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>
100<p class="firstline">Returns the specified instance resource.</p>
101<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>
109<p class="firstline">Retrieves the list of instance resources contained within the specified zone.</p>
110<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">
120 <code><a href="#setMetadata">setMetadata(project, zone, instance, body)</a></code></p>
121<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
122<p class="toc_element">
123 <code><a href="#setScheduling">setScheduling(project, zone, instance, body)</a></code></p>
124<p class="firstline">Sets an instance's scheduling options.</p>
125<p class="toc_element">
126 <code><a href="#setTags">setTags(project, zone, instance, body)</a></code></p>
127<p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800128<p class="toc_element">
129 <code><a href="#start">start(project, zone, instance)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000130<p class="firstline">This method 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 -0800131<p class="toc_element">
132 <code><a href="#stop">stop(project, zone, instance)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000133<p class="firstline">This method 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 -0400134<h3>Method Details</h3>
135<div class="method">
136 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</code>
137 <pre>Adds an access config to an instance's network interface.
138
139Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000140 project: string, Project ID for this request. (required)
141 zone: string, The name of the zone for this request. (required)
142 instance: string, The instance name for this request. (required)
143 networkInterface: string, The name of the network interface to add to this instance. (required)
John Asmuth614db982014-04-24 15:46:26 -0400144 body: object, The request body. (required)
145 The object takes the form of:
146
147{ # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000148 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
149 "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 -0400150 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000151 "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 -0400152}
153
154
155Returns:
156 An object of the form:
157
158 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000159 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000160 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000161 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800162 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000163 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
164 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
165 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000166 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000167 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800168 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000169 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
170 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
171 "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 -0400172 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000173 "message": "A String", # [Output Only] Optional human-readable details for this warning.
174 "code": "A String", # [Output Only] The warning type identifier for this warning.
175 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400176 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000177 "value": "A String", # [Output Only] A warning data value corresponding to the key.
178 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400179 },
180 ],
181 },
182 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000183 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
185 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
186 "name": "A String", # [Output Only] Name of the resource.
187 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
188 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800189 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400190 {
Craig Citroe633be12015-03-02 13:40:36 -0800191 "message": "A String", # [Output Only] An optional, human-readable error message.
192 "code": "A String", # [Output Only] The error type identifier for this error.
193 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400194 },
195 ],
196 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000197 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800198 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000199 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code>
205 <pre>A description of how to use this function
206
207Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000208 project: string, Project ID for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000209 maxResults: integer, Maximum count of results to be returned.
210 pageToken: string, Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.
211 filter: string, Filter expression for filtering listed resources.
John Asmuth614db982014-04-24 15:46:26 -0400212
213Returns:
214 An object of the form:
215
216 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000217 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
218 "items": { # [Output Only] A map of scoped instance lists.
John Asmuth614db982014-04-24 15:46:26 -0400219 "a_key": { # Name of the scope containing this set of instances.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000220 "instances": [ # [Output Only] List of instances contained in this scope.
221 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000222 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
223 "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 +0000224 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
225 "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.
John Asmuth614db982014-04-24 15:46:26 -0400226 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000227 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
228 "tags": { # A set of instance tags. # A list of tags to appy 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 -0700229 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
230 "A String",
231 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000232 "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.
233 #
234 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700235 },
John Asmuth614db982014-04-24 15:46:26 -0400236 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
237 { # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000238 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ 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.
239 #
240 # 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.
241 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
242 "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.
243 #
244 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
245 #
246 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
247 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
248 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
249 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
250 #
251 # global/images/my-private-image
252 #
253 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
254 #
255 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
256 #
257 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
258 "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:
259 #
260 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
261 #
262 # 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:
263 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
264 # - projects/project/zones/zone/diskTypes/diskType
265 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400266 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000267 "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).
268 "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.
269 "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.
270 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700271 "A String",
272 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000273 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800274 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000275 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
276 "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 -0700277 },
John Asmuth614db982014-04-24 15:46:26 -0400278 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000279 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
280 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
281 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
282 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000283 "preemptible": True or False, # Whether the Instance is preemptible.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000284 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400285 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000286 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:
287 #
288 # zones/zone/machineTypes/machine-type
289 "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 -0400290 { # A service account.
291 "scopes": [ # The list of scopes to be made available for this service account.
292 "A String",
293 ],
294 "email": "A String", # Email address of the service account.
295 },
296 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000297 "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 -0400298 { # A network interface resource attached to an instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000299 "accessConfigs": [ # An array of configurations for this interface. Currently, <codeONE_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 -0400300 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000301 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
302 "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 -0400303 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000304 "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 -0400305 },
306 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000307 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
308 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
309 "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:
310 #
311 # global/networks/default
312 #
313 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
314 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
315 # - projects/project/global/networks/network
316 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400317 },
318 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000319 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
320 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
321 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
322 "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 -0400323 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
324 {
325 "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.
326 "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.
327 },
328 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000329 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
330 "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 -0400331 },
332 },
333 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000334 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
335 "message": "A String", # [Output Only] Optional human-readable details for this warning.
336 "code": "A String", # [Output Only] The warning type identifier for this warning.
337 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400338 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000339 "value": "A String", # [Output Only] A warning data value corresponding to the key.
340 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400341 },
342 ],
343 },
344 },
345 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000346 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
347 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
348 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400349 }</pre>
350</div>
351
352<div class="method">
353 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
354 <pre>Retrieves the next page of results.
355
356Args:
357 previous_request: The request for the previous page. (required)
358 previous_response: The response from the request for the previous page. (required)
359
360Returns:
361 A request object that you can call 'execute()' on to request the next
362 page. Returns None if there are no more items in the collection.
363 </pre>
364</div>
365
366<div class="method">
367 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000368 <pre>Attaches a Disk resource to an instance.
John Asmuth614db982014-04-24 15:46:26 -0400369
370Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000371 project: string, Project ID for this request. (required)
372 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400373 instance: string, Instance name. (required)
374 body: object, The request body. (required)
375 The object takes the form of:
376
377{ # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000378 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ 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.
379 #
380 # 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.
381 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
382 "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.
383 #
384 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
385 #
386 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
387 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
388 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
389 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
390 #
391 # global/images/my-private-image
392 #
393 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
394 #
395 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
396 #
397 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
398 "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:
399 #
400 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
401 #
402 # 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:
403 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
404 # - projects/project/zones/zone/diskTypes/diskType
405 # - zones/zone/diskTypes/diskType
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700406 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000407 "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).
408 "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.
409 "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.
410 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700411 "A String",
412 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000413 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800414 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000415 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
416 "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 -0700417}
John Asmuth614db982014-04-24 15:46:26 -0400418
419
420Returns:
421 An object of the form:
422
423 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000424 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000425 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000426 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800427 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000428 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
429 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
430 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000431 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000432 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800433 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000434 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
435 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
436 "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 -0400437 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000438 "message": "A String", # [Output Only] Optional human-readable details for this warning.
439 "code": "A String", # [Output Only] The warning type identifier for this warning.
440 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400441 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000442 "value": "A String", # [Output Only] A warning data value corresponding to the key.
443 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400444 },
445 ],
446 },
447 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000448 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
449 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
450 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
451 "name": "A String", # [Output Only] Name of the resource.
452 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
453 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800454 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400455 {
Craig Citroe633be12015-03-02 13:40:36 -0800456 "message": "A String", # [Output Only] An optional, human-readable error message.
457 "code": "A String", # [Output Only] The error type identifier for this error.
458 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400459 },
460 ],
461 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000462 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800463 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000464 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400465 }</pre>
466</div>
467
468<div class="method">
469 <code class="details" id="delete">delete(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000470 <pre>Deletes the specified Instance resource. For more information, see Shutting down an instance.
John Asmuth614db982014-04-24 15:46:26 -0400471
472Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000473 project: string, Project ID for this request. (required)
474 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400475 instance: string, Name of the instance resource to delete. (required)
476
477Returns:
478 An object of the form:
479
480 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000481 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000482 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000483 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800484 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000485 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
486 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
487 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000488 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000489 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800490 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000491 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
492 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
493 "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 -0400494 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000495 "message": "A String", # [Output Only] Optional human-readable details for this warning.
496 "code": "A String", # [Output Only] The warning type identifier for this warning.
497 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400498 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000499 "value": "A String", # [Output Only] A warning data value corresponding to the key.
500 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400501 },
502 ],
503 },
504 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000505 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
506 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
507 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
508 "name": "A String", # [Output Only] Name of the resource.
509 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
510 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800511 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400512 {
Craig Citroe633be12015-03-02 13:40:36 -0800513 "message": "A String", # [Output Only] An optional, human-readable error message.
514 "code": "A String", # [Output Only] The error type identifier for this error.
515 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400516 },
517 ],
518 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000519 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800520 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000521 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400522 }</pre>
523</div>
524
525<div class="method">
526 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
527 <pre>Deletes an access config from an instance's network interface.
528
529Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000530 project: string, Project ID for this request. (required)
531 zone: string, The name of the zone for this request. (required)
532 instance: string, The instance name for this request. (required)
533 accessConfig: string, The name of the access config to delete. (required)
534 networkInterface: string, The name of the network interface. (required)
John Asmuth614db982014-04-24 15:46:26 -0400535
536Returns:
537 An object of the form:
538
539 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000540 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000541 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000542 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800543 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000544 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
545 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
546 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000547 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000548 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800549 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000550 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
551 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
552 "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 -0400553 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000554 "message": "A String", # [Output Only] Optional human-readable details for this warning.
555 "code": "A String", # [Output Only] The warning type identifier for this warning.
556 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400557 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000558 "value": "A String", # [Output Only] A warning data value corresponding to the key.
559 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400560 },
561 ],
562 },
563 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000564 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
565 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
566 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
567 "name": "A String", # [Output Only] Name of the resource.
568 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
569 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800570 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400571 {
Craig Citroe633be12015-03-02 13:40:36 -0800572 "message": "A String", # [Output Only] An optional, human-readable error message.
573 "code": "A String", # [Output Only] The error type identifier for this error.
574 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400575 },
576 ],
577 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000578 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800579 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000580 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400581 }</pre>
582</div>
583
584<div class="method">
585 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
586 <pre>Detaches a disk from an instance.
587
588Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000589 project: string, Project ID for this request. (required)
590 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400591 instance: string, Instance name. (required)
592 deviceName: string, Disk device name to detach. (required)
593
594Returns:
595 An object of the form:
596
597 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000598 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000599 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000600 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800601 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000602 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
603 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
604 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000605 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000606 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800607 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000608 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
609 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
610 "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 -0400611 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000612 "message": "A String", # [Output Only] Optional human-readable details for this warning.
613 "code": "A String", # [Output Only] The warning type identifier for this warning.
614 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400615 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000616 "value": "A String", # [Output Only] A warning data value corresponding to the key.
617 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400618 },
619 ],
620 },
621 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000622 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
623 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
624 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
625 "name": "A String", # [Output Only] Name of the resource.
626 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
627 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800628 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400629 {
Craig Citroe633be12015-03-02 13:40:36 -0800630 "message": "A String", # [Output Only] An optional, human-readable error message.
631 "code": "A String", # [Output Only] The error type identifier for this error.
632 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400633 },
634 ],
635 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000636 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800637 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000638 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400639 }</pre>
640</div>
641
642<div class="method">
643 <code class="details" id="get">get(project, zone, instance)</code>
644 <pre>Returns the specified instance resource.
645
646Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000647 project: string, Project ID for this request. (required)
648 zone: string, The name of the The name of the zone for this request.. (required)
John Asmuth614db982014-04-24 15:46:26 -0400649 instance: string, Name of the instance resource to return. (required)
650
651Returns:
652 An object of the form:
653
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000654 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000655 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
656 "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 +0000657 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
658 "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.
John Asmuth614db982014-04-24 15:46:26 -0400659 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000660 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
661 "tags": { # A set of instance tags. # A list of tags to appy 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 -0700662 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
663 "A String",
664 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000665 "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.
666 #
667 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700668 },
John Asmuth614db982014-04-24 15:46:26 -0400669 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
670 { # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000671 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ 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.
672 #
673 # 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.
674 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
675 "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.
676 #
677 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
678 #
679 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
680 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
681 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
682 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
683 #
684 # global/images/my-private-image
685 #
686 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
687 #
688 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
689 #
690 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
691 "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:
692 #
693 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
694 #
695 # 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:
696 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
697 # - projects/project/zones/zone/diskTypes/diskType
698 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400699 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000700 "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).
701 "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.
702 "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.
703 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700704 "A String",
705 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000706 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800707 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000708 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
709 "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 -0700710 },
John Asmuth614db982014-04-24 15:46:26 -0400711 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000712 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
713 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
714 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
715 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000716 "preemptible": True or False, # Whether the Instance is preemptible.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000717 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400718 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000719 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:
720 #
721 # zones/zone/machineTypes/machine-type
722 "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 -0400723 { # A service account.
724 "scopes": [ # The list of scopes to be made available for this service account.
725 "A String",
726 ],
727 "email": "A String", # Email address of the service account.
728 },
729 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000730 "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 -0400731 { # A network interface resource attached to an instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000732 "accessConfigs": [ # An array of configurations for this interface. Currently, <codeONE_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 -0400733 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000734 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
735 "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 -0400736 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000737 "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 -0400738 },
739 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000740 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
741 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
742 "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:
743 #
744 # global/networks/default
745 #
746 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
747 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
748 # - projects/project/global/networks/network
749 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400750 },
751 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000752 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
753 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
754 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
755 "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 -0400756 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
757 {
758 "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.
759 "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.
760 },
761 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000762 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
763 "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 -0400764 },
765 }</pre>
766</div>
767
768<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000769 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400770 <pre>Returns the specified instance's serial port output.
771
772Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000773 project: string, Project ID for this request. (required)
774 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400775 instance: string, Name of the instance scoping this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000776 port: integer, Which COM port to retrieve data from.
John Asmuth614db982014-04-24 15:46:26 -0400777
778Returns:
779 An object of the form:
780
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000781 { # An instance's serial console output.
782 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
783 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
784 "contents": "A String", # [Output Only] The contents of the console output.
John Asmuth614db982014-04-24 15:46:26 -0400785 }</pre>
786</div>
787
788<div class="method">
789 <code class="details" id="insert">insert(project, zone, body)</code>
790 <pre>Creates an instance resource in the specified project using the data included in the request.
791
792Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000793 project: string, Project ID for this request. (required)
794 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400795 body: object, The request body. (required)
796 The object takes the form of:
797
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000798{ # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000799 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
800 "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 +0000801 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
802 "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.
John Asmuth614db982014-04-24 15:46:26 -0400803 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000804 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
805 "tags": { # A set of instance tags. # A list of tags to appy 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 -0700806 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
807 "A String",
808 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000809 "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.
810 #
811 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700812 },
John Asmuth614db982014-04-24 15:46:26 -0400813 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
814 { # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000815 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ 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.
816 #
817 # 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.
818 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
819 "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.
820 #
821 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
822 #
823 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
824 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
825 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
826 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
827 #
828 # global/images/my-private-image
829 #
830 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
831 #
832 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
833 #
834 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
835 "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:
836 #
837 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
838 #
839 # 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:
840 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
841 # - projects/project/zones/zone/diskTypes/diskType
842 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400843 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000844 "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).
845 "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.
846 "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.
847 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700848 "A String",
849 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000850 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800851 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000852 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
853 "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 -0700854 },
John Asmuth614db982014-04-24 15:46:26 -0400855 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000856 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
857 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
858 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
859 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000860 "preemptible": True or False, # Whether the Instance is preemptible.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000861 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400862 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000863 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:
864 #
865 # zones/zone/machineTypes/machine-type
866 "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 -0400867 { # A service account.
868 "scopes": [ # The list of scopes to be made available for this service account.
869 "A String",
870 ],
871 "email": "A String", # Email address of the service account.
872 },
873 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000874 "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 -0400875 { # A network interface resource attached to an instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000876 "accessConfigs": [ # An array of configurations for this interface. Currently, <codeONE_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 -0400877 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000878 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
879 "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 -0400880 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000881 "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 -0400882 },
883 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000884 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
885 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
886 "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:
887 #
888 # global/networks/default
889 #
890 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
891 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
892 # - projects/project/global/networks/network
893 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400894 },
895 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000896 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
897 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
898 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
899 "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 -0400900 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
901 {
902 "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.
903 "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.
904 },
905 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000906 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
907 "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 -0400908 },
909}
910
911
912Returns:
913 An object of the form:
914
915 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000916 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000917 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000918 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800919 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000920 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
921 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
922 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000923 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000924 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800925 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000926 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
927 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
928 "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 -0400929 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000930 "message": "A String", # [Output Only] Optional human-readable details for this warning.
931 "code": "A String", # [Output Only] The warning type identifier for this warning.
932 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400933 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000934 "value": "A String", # [Output Only] A warning data value corresponding to the key.
935 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400936 },
937 ],
938 },
939 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000940 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
941 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
942 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
943 "name": "A String", # [Output Only] Name of the resource.
944 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
945 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800946 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400947 {
Craig Citroe633be12015-03-02 13:40:36 -0800948 "message": "A String", # [Output Only] An optional, human-readable error message.
949 "code": "A String", # [Output Only] The error type identifier for this error.
950 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400951 },
952 ],
953 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000954 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800955 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000956 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400957 }</pre>
958</div>
959
960<div class="method">
961 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
962 <pre>Retrieves the list of instance resources contained within the specified zone.
963
964Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000965 project: string, Project ID for this request. (required)
966 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000967 maxResults: integer, Maximum count of results to be returned.
968 pageToken: string, Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.
969 filter: string, Filter expression for filtering listed resources.
John Asmuth614db982014-04-24 15:46:26 -0400970
971Returns:
972 An object of the form:
973
974 { # Contains a list of instance resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000975 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
976 "items": [ # [Output Only] A list of Instance resources.
977 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000978 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
979 "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 +0000980 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
981 "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.
John Asmuth614db982014-04-24 15:46:26 -0400982 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000983 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
984 "tags": { # A set of instance tags. # A list of tags to appy 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 -0700985 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
986 "A String",
987 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000988 "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.
989 #
990 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700991 },
John Asmuth614db982014-04-24 15:46:26 -0400992 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
993 { # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000994 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ 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.
995 #
996 # 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.
997 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
998 "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.
999 #
1000 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1001 #
1002 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1003 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
1004 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
1005 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
1006 #
1007 # global/images/my-private-image
1008 #
1009 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
1010 #
1011 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
1012 #
1013 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
1014 "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:
1015 #
1016 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1017 #
1018 # 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:
1019 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1020 # - projects/project/zones/zone/diskTypes/diskType
1021 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -04001022 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001023 "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).
1024 "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.
1025 "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.
1026 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001027 "A String",
1028 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001029 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001030 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001031 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
1032 "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 -07001033 },
John Asmuth614db982014-04-24 15:46:26 -04001034 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001035 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1036 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1037 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
1038 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001039 "preemptible": True or False, # Whether the Instance is preemptible.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001040 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -04001041 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001042 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:
1043 #
1044 # zones/zone/machineTypes/machine-type
1045 "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 -04001046 { # A service account.
1047 "scopes": [ # The list of scopes to be made available for this service account.
1048 "A String",
1049 ],
1050 "email": "A String", # Email address of the service account.
1051 },
1052 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001053 "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 -04001054 { # A network interface resource attached to an instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001055 "accessConfigs": [ # An array of configurations for this interface. Currently, <codeONE_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 -04001056 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001057 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1058 "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 -04001059 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001060 "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 -04001061 },
1062 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001063 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
1064 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
1065 "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:
1066 #
1067 # global/networks/default
1068 #
1069 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1070 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1071 # - projects/project/global/networks/network
1072 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -04001073 },
1074 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001075 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1076 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1077 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
1078 "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 -04001079 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1080 {
1081 "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.
1082 "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.
1083 },
1084 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001085 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1086 "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 -04001087 },
1088 },
1089 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001090 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
1091 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1092 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -04001093 }</pre>
1094</div>
1095
1096<div class="method">
1097 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1098 <pre>Retrieves the next page of results.
1099
1100Args:
1101 previous_request: The request for the previous page. (required)
1102 previous_response: The response from the request for the previous page. (required)
1103
1104Returns:
1105 A request object that you can call 'execute()' on to request the next
1106 page. Returns None if there are no more items in the collection.
1107 </pre>
1108</div>
1109
1110<div class="method">
1111 <code class="details" id="reset">reset(project, zone, instance)</code>
1112 <pre>Performs a hard reset on the instance.
1113
1114Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001115 project: string, Project ID for this request. (required)
1116 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001117 instance: string, Name of the instance scoping this request. (required)
1118
1119Returns:
1120 An object of the form:
1121
1122 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001123 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001124 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001125 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001126 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001127 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1128 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1129 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001130 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001131 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001132 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001133 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1134 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1135 "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 -04001136 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001137 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1138 "code": "A String", # [Output Only] The warning type identifier for this warning.
1139 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001140 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001141 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1142 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001143 },
1144 ],
1145 },
1146 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001147 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1148 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1149 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1150 "name": "A String", # [Output Only] Name of the resource.
1151 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1152 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001153 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001154 {
Craig Citroe633be12015-03-02 13:40:36 -08001155 "message": "A String", # [Output Only] An optional, human-readable error message.
1156 "code": "A String", # [Output Only] The error type identifier for this error.
1157 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001158 },
1159 ],
1160 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001161 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001162 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001163 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001164 }</pre>
1165</div>
1166
1167<div class="method">
1168 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001169 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04001170
1171Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001172 project: string, Project ID for this request. (required)
1173 zone: string, The name of the zone for this request. (required)
1174 instance: string, The instance name. (required)
John Asmuth614db982014-04-24 15:46:26 -04001175 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001176 deviceName: string, The device name of the disk to modify. (required)
John Asmuth614db982014-04-24 15:46:26 -04001177
1178Returns:
1179 An object of the form:
1180
1181 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001182 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001183 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001184 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001185 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001186 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1187 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1188 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001189 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001190 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001191 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001192 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1193 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1194 "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 -04001195 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001196 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1197 "code": "A String", # [Output Only] The warning type identifier for this warning.
1198 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001199 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001200 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1201 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001202 },
1203 ],
1204 },
1205 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001206 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1207 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1208 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1209 "name": "A String", # [Output Only] Name of the resource.
1210 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1211 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001212 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001213 {
Craig Citroe633be12015-03-02 13:40:36 -08001214 "message": "A String", # [Output Only] An optional, human-readable error message.
1215 "code": "A String", # [Output Only] The error type identifier for this error.
1216 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001217 },
1218 ],
1219 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001220 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001221 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001222 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001223 }</pre>
1224</div>
1225
1226<div class="method">
1227 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
1228 <pre>Sets metadata for the specified instance to the data included in the request.
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 body: object, The request body. (required)
1235 The object takes the form of:
1236
1237{ # A metadata key/value entry.
1238 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1239 {
1240 "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.
1241 "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.
1242 },
1243 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001244 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1245 "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 -04001246}
1247
1248
1249Returns:
1250 An object of the form:
1251
1252 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001253 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001254 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001255 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001256 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001257 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1258 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1259 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001260 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001261 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001262 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001263 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1264 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1265 "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 -04001266 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001267 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1268 "code": "A String", # [Output Only] The warning type identifier for this warning.
1269 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001270 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001271 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1272 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001273 },
1274 ],
1275 },
1276 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001277 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1278 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1279 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1280 "name": "A String", # [Output Only] Name of the resource.
1281 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1282 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001283 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001284 {
Craig Citroe633be12015-03-02 13:40:36 -08001285 "message": "A String", # [Output Only] An optional, human-readable error message.
1286 "code": "A String", # [Output Only] The error type identifier for this error.
1287 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001288 },
1289 ],
1290 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001291 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001292 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001293 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001294 }</pre>
1295</div>
1296
1297<div class="method">
1298 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body)</code>
1299 <pre>Sets an instance's scheduling options.
1300
1301Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001302 project: string, Project ID for this request. (required)
1303 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001304 instance: string, Instance name. (required)
1305 body: object, The request body. (required)
1306 The object takes the form of:
1307
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001308{ # Sets the scheduling options for an Instance.
1309 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001310 "preemptible": True or False, # Whether the Instance is preemptible.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001311 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -04001312}
1313
1314
1315Returns:
1316 An object of the form:
1317
1318 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001319 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001320 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001321 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001322 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001323 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1324 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1325 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001326 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001327 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001328 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001329 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1330 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1331 "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 -04001332 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001333 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1334 "code": "A String", # [Output Only] The warning type identifier for this warning.
1335 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001336 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001337 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1338 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001339 },
1340 ],
1341 },
1342 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001343 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1344 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1345 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1346 "name": "A String", # [Output Only] Name of the resource.
1347 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1348 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001349 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001350 {
Craig Citroe633be12015-03-02 13:40:36 -08001351 "message": "A String", # [Output Only] An optional, human-readable error message.
1352 "code": "A String", # [Output Only] The error type identifier for this error.
1353 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001354 },
1355 ],
1356 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001357 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001358 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001359 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001360 }</pre>
1361</div>
1362
1363<div class="method">
1364 <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
1365 <pre>Sets tags for the specified instance to the data included in the request.
1366
1367Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001368 project: string, Project ID for this request. (required)
1369 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001370 instance: string, Name of the instance scoping this request. (required)
1371 body: object, The request body. (required)
1372 The object takes the form of:
1373
1374{ # A set of instance tags.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001375 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1376 "A String",
1377 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001378 "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.
1379 #
1380 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001381}
John Asmuth614db982014-04-24 15:46:26 -04001382
1383
1384Returns:
1385 An object of the form:
1386
1387 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001388 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001389 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001390 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001391 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001392 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1393 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1394 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001395 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001396 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001397 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001398 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1399 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1400 "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 -04001401 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001402 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1403 "code": "A String", # [Output Only] The warning type identifier for this warning.
1404 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001405 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001406 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1407 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001408 },
1409 ],
1410 },
1411 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001412 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1413 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1414 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1415 "name": "A String", # [Output Only] Name of the resource.
1416 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1417 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001418 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001419 {
Craig Citroe633be12015-03-02 13:40:36 -08001420 "message": "A String", # [Output Only] An optional, human-readable error message.
1421 "code": "A String", # [Output Only] The error type identifier for this error.
1422 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001423 },
1424 ],
1425 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001426 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001427 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001428 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
Craig Citroe633be12015-03-02 13:40:36 -08001429 }</pre>
1430</div>
1431
1432<div class="method">
1433 <code class="details" id="start">start(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001434 <pre>This method 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 -08001435
1436Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001437 project: string, Project ID for this request. (required)
1438 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001439 instance: string, Name of the instance resource to start. (required)
1440
1441Returns:
1442 An object of the form:
1443
1444 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001445 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001446 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001447 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001448 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001449 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1450 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1451 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001452 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001453 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001454 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001455 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1456 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1457 "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 -08001458 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001459 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1460 "code": "A String", # [Output Only] The warning type identifier for this warning.
1461 "data": [ # [Output Only] Metadata for this warning in key: value format.
Craig Citroe633be12015-03-02 13:40:36 -08001462 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001463 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1464 "key": "A String", # [Output Only] A key for the warning data.
Craig Citroe633be12015-03-02 13:40:36 -08001465 },
1466 ],
1467 },
1468 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001469 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1470 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1471 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1472 "name": "A String", # [Output Only] Name of the resource.
1473 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1474 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001475 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1476 {
1477 "message": "A String", # [Output Only] An optional, human-readable error message.
1478 "code": "A String", # [Output Only] The error type identifier for this error.
1479 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
1480 },
1481 ],
1482 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001483 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001484 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001485 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
Craig Citroe633be12015-03-02 13:40:36 -08001486 }</pre>
1487</div>
1488
1489<div class="method">
1490 <code class="details" id="stop">stop(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001491 <pre>This method 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 -08001492
1493Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001494 project: string, Project ID for this request. (required)
1495 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001496 instance: string, Name of the instance resource to stop. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001497
1498Returns:
1499 An object of the form:
1500
1501 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001502 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001503 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001504 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001505 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001506 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1507 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1508 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001509 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001510 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001511 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001512 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1513 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1514 "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 -08001515 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001516 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1517 "code": "A String", # [Output Only] The warning type identifier for this warning.
1518 "data": [ # [Output Only] Metadata for this warning in key: value format.
Craig Citroe633be12015-03-02 13:40:36 -08001519 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001520 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1521 "key": "A String", # [Output Only] A key for the warning data.
Craig Citroe633be12015-03-02 13:40:36 -08001522 },
1523 ],
1524 },
1525 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001526 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1527 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1528 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1529 "name": "A String", # [Output Only] Name of the resource.
1530 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1531 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001532 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1533 {
1534 "message": "A String", # [Output Only] An optional, human-readable error message.
1535 "code": "A String", # [Output Only] The error type identifier for this error.
1536 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
1537 },
1538 ],
1539 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001540 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001541 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001542 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001543 }</pre>
1544</div>
1545
1546</body></html>