blob: 15eb1f0c4d6390fe9b160c25e256b150a9a0e1ee [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>
88<p class="firstline">Attaches a disk resource to an instance.</p>
89<p class="toc_element">
90 <code><a href="#delete">delete(project, zone, instance)</a></code></p>
91<p class="firstline">Deletes the specified instance resource.</p>
92<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">
102 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance)</a></code></p>
103<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>
118<p class="firstline">Sets the auto-delete flag for a disk attached to an instance</p>
119<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>
130<p class="firstline">Starts an instance</p>
131<p class="toc_element">
132 <code><a href="#stop">stop(project, zone, instance)</a></code></p>
133<p class="firstline">Stops 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:
140 project: string, Project name. (required)
141 zone: string, Name of the zone scoping this request. (required)
142 instance: string, Instance name. (required)
143 networkInterface: string, Network interface name. (required)
144 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.
148 "kind": "compute#accessConfig", # Type of the resource.
149 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
150 "name": "A String", # Name of this access configuration.
151 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
152}
153
154
155Returns:
156 An object of the form:
157
158 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800159 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
160 "clientOperationId": "A String",
161 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
162 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
163 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
164 "operationType": "A String",
165 "httpErrorMessage": "A String",
166 "progress": 42,
167 "httpErrorStatusCode": 42,
168 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
169 "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 RFC 3339 format.
171 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400172 {
173 "message": "A String", # Optional human-readable details for this warning.
174 "code": "A String", # The warning type identifier for this warning.
175 "data": [ # Metadata for this warning in 'key: value' format.
176 {
177 "value": "A String", # A warning data value corresponding to the key.
178 "key": "A String", # A key for the warning data.
179 },
180 ],
181 },
182 ],
Craig Citroe633be12015-03-02 13:40:36 -0800183 "user": "A String",
184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
185 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
186 "name": "A String", # [Output Only] Name of the resource (output only).
187 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
188 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
189 "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 },
Craig Citroe633be12015-03-02 13:40:36 -0800197 "endTime": "A String",
198 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
199 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
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:
208 project: string, Name of the project scoping this request. (required)
209 maxResults: integer, Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.
210 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
211 filter: string, Optional. Filter expression for filtering listed resources.
212
213Returns:
214 An object of the form:
215
216 {
217 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
218 "items": { # A map of scoped instance lists.
219 "a_key": { # Name of the scope containing this set of instances.
220 "instances": [ # List of instances contained in this scope.
221 { # An instance resource.
222 "status": "A String", # Instance status. One of the following values: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only).
223 "kind": "compute#instance", # Type of the resource.
224 "canIpForward": True or False, # Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false.
225 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
226 "zone": "A String", # URL of the zone where the instance resides (output only).
227 "tags": { # A set of instance tags. # A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on 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 -0700228 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
229 "A String",
230 ],
231 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
232 },
John Asmuth614db982014-04-24 15:46:26 -0400233 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
234 { # An instance-attached disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700235 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
236 "kind": "compute#attachedDisk", # Type of the resource.
237 "initializeParams": { # Initialization parameters for the new disk (input-only). Can only be specified on the boot disk or local SSDs. Mutually exclusive with 'source'. # Initialization parameters.
238 "diskSizeGb": "A String", # Size of the disk in base-2 GB.
239 "diskName": "A String", # Name of the disk (when not provided defaults to the name of the instance).
240 "sourceImage": "A String", # The source image used to create this disk.
241 "diskType": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
John Asmuth614db982014-04-24 15:46:26 -0400242 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700243 "autoDelete": True or False, # Whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
244 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
245 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700246 "licenses": [ # Public visible licenses.
247 "A String",
248 ],
Craig Citroe633be12015-03-02 13:40:36 -0800249 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
250 "interface": "A String",
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700251 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
Craig Citroe633be12015-03-02 13:40:36 -0800252 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700253 },
John Asmuth614db982014-04-24 15:46:26 -0400254 ],
255 "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.
256 "statusMessage": "A String", # An optional, human-readable explanation of the status (output only).
257 "scheduling": { # Scheduling options for an Instance. # Scheduling options for this instance.
258 "automaticRestart": True or False, # Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user).
259 "onHostMaintenance": "A String", # How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
260 },
261 "machineType": "A String", # URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.
262 "serviceAccounts": [ # A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.
263 { # A service account.
264 "scopes": [ # The list of scopes to be made available for this service account.
265 "A String",
266 ],
267 "email": "A String", # Email address of the service account.
268 },
269 ],
270 "networkInterfaces": [ # 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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
271 { # A network interface resource attached to an instance.
272 "accessConfigs": [ # 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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
273 { # An access configuration attached to an instance's network interface.
274 "kind": "compute#accessConfig", # Type of the resource.
275 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
276 "name": "A String", # Name of this access configuration.
277 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
278 },
279 ],
280 "networkIP": "A String", # An optional IPV4 internal network address assigned to the instance for this network interface (output only).
281 "name": "A String", # Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only).
282 "network": "A String", # URL of the network resource attached to this interface.
283 },
284 ],
285 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
286 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
287 "selfLink": "A String", # Server defined URL for this resource (output only).
288 "metadata": { # A metadata key/value entry. # Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information.
289 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
290 {
291 "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.
292 "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.
293 },
294 ],
295 "kind": "compute#metadata", # Type of the resource.
296 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
297 },
298 },
299 ],
300 "warning": { # Informational warning which replaces the list of instances when the list is empty.
301 "message": "A String", # Optional human-readable details for this warning.
302 "code": "A String", # The warning type identifier for this warning.
303 "data": [ # Metadata for this warning in 'key: value' format.
304 {
305 "value": "A String", # A warning data value corresponding to the key.
306 "key": "A String", # A key for the warning data.
307 },
308 ],
309 },
310 },
311 },
312 "kind": "compute#instanceAggregatedList", # Type of resource.
313 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
314 "selfLink": "A String", # Server defined URL for this resource (output only).
315 }</pre>
316</div>
317
318<div class="method">
319 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
320 <pre>Retrieves the next page of results.
321
322Args:
323 previous_request: The request for the previous page. (required)
324 previous_response: The response from the request for the previous page. (required)
325
326Returns:
327 A request object that you can call 'execute()' on to request the next
328 page. Returns None if there are no more items in the collection.
329 </pre>
330</div>
331
332<div class="method">
333 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
334 <pre>Attaches a disk resource to an instance.
335
336Args:
337 project: string, Project name. (required)
338 zone: string, Name of the zone scoping this request. (required)
339 instance: string, Instance name. (required)
340 body: object, The request body. (required)
341 The object takes the form of:
342
343{ # An instance-attached disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700344 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
345 "kind": "compute#attachedDisk", # Type of the resource.
346 "initializeParams": { # Initialization parameters for the new disk (input-only). Can only be specified on the boot disk or local SSDs. Mutually exclusive with 'source'. # Initialization parameters.
347 "diskSizeGb": "A String", # Size of the disk in base-2 GB.
348 "diskName": "A String", # Name of the disk (when not provided defaults to the name of the instance).
349 "sourceImage": "A String", # The source image used to create this disk.
350 "diskType": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
351 },
352 "autoDelete": True or False, # Whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
353 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
354 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700355 "licenses": [ # Public visible licenses.
356 "A String",
357 ],
Craig Citroe633be12015-03-02 13:40:36 -0800358 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
359 "interface": "A String",
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700360 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
Craig Citroe633be12015-03-02 13:40:36 -0800361 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700362}
John Asmuth614db982014-04-24 15:46:26 -0400363
364
365Returns:
366 An object of the form:
367
368 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800369 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
370 "clientOperationId": "A String",
371 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
372 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
373 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
374 "operationType": "A String",
375 "httpErrorMessage": "A String",
376 "progress": 42,
377 "httpErrorStatusCode": 42,
378 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
379 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
380 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
381 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400382 {
383 "message": "A String", # Optional human-readable details for this warning.
384 "code": "A String", # The warning type identifier for this warning.
385 "data": [ # Metadata for this warning in 'key: value' format.
386 {
387 "value": "A String", # A warning data value corresponding to the key.
388 "key": "A String", # A key for the warning data.
389 },
390 ],
391 },
392 ],
Craig Citroe633be12015-03-02 13:40:36 -0800393 "user": "A String",
394 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
395 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
396 "name": "A String", # [Output Only] Name of the resource (output only).
397 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
398 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
399 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400400 {
Craig Citroe633be12015-03-02 13:40:36 -0800401 "message": "A String", # [Output Only] An optional, human-readable error message.
402 "code": "A String", # [Output Only] The error type identifier for this error.
403 "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 -0400404 },
405 ],
406 },
Craig Citroe633be12015-03-02 13:40:36 -0800407 "endTime": "A String",
408 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
409 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400410 }</pre>
411</div>
412
413<div class="method">
414 <code class="details" id="delete">delete(project, zone, instance)</code>
415 <pre>Deletes the specified instance resource.
416
417Args:
418 project: string, Name of the project scoping this request. (required)
419 zone: string, Name of the zone scoping this request. (required)
420 instance: string, Name of the instance resource to delete. (required)
421
422Returns:
423 An object of the form:
424
425 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800426 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
427 "clientOperationId": "A String",
428 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
429 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
430 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
431 "operationType": "A String",
432 "httpErrorMessage": "A String",
433 "progress": 42,
434 "httpErrorStatusCode": 42,
435 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
436 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
437 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
438 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400439 {
440 "message": "A String", # Optional human-readable details for this warning.
441 "code": "A String", # The warning type identifier for this warning.
442 "data": [ # Metadata for this warning in 'key: value' format.
443 {
444 "value": "A String", # A warning data value corresponding to the key.
445 "key": "A String", # A key for the warning data.
446 },
447 ],
448 },
449 ],
Craig Citroe633be12015-03-02 13:40:36 -0800450 "user": "A String",
451 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
452 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
453 "name": "A String", # [Output Only] Name of the resource (output only).
454 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
455 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
456 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400457 {
Craig Citroe633be12015-03-02 13:40:36 -0800458 "message": "A String", # [Output Only] An optional, human-readable error message.
459 "code": "A String", # [Output Only] The error type identifier for this error.
460 "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 -0400461 },
462 ],
463 },
Craig Citroe633be12015-03-02 13:40:36 -0800464 "endTime": "A String",
465 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
466 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400467 }</pre>
468</div>
469
470<div class="method">
471 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
472 <pre>Deletes an access config from an instance's network interface.
473
474Args:
475 project: string, Project name. (required)
476 zone: string, Name of the zone scoping this request. (required)
477 instance: string, Instance name. (required)
478 accessConfig: string, Access config name. (required)
479 networkInterface: string, Network interface name. (required)
480
481Returns:
482 An object of the form:
483
484 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800485 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
486 "clientOperationId": "A String",
487 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
488 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
489 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
490 "operationType": "A String",
491 "httpErrorMessage": "A String",
492 "progress": 42,
493 "httpErrorStatusCode": 42,
494 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
495 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
496 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
497 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400498 {
499 "message": "A String", # Optional human-readable details for this warning.
500 "code": "A String", # The warning type identifier for this warning.
501 "data": [ # Metadata for this warning in 'key: value' format.
502 {
503 "value": "A String", # A warning data value corresponding to the key.
504 "key": "A String", # A key for the warning data.
505 },
506 ],
507 },
508 ],
Craig Citroe633be12015-03-02 13:40:36 -0800509 "user": "A String",
510 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
511 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
512 "name": "A String", # [Output Only] Name of the resource (output only).
513 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
514 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
515 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400516 {
Craig Citroe633be12015-03-02 13:40:36 -0800517 "message": "A String", # [Output Only] An optional, human-readable error message.
518 "code": "A String", # [Output Only] The error type identifier for this error.
519 "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 -0400520 },
521 ],
522 },
Craig Citroe633be12015-03-02 13:40:36 -0800523 "endTime": "A String",
524 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
525 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400526 }</pre>
527</div>
528
529<div class="method">
530 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
531 <pre>Detaches a disk from an instance.
532
533Args:
534 project: string, Project name. (required)
535 zone: string, Name of the zone scoping this request. (required)
536 instance: string, Instance name. (required)
537 deviceName: string, Disk device name to detach. (required)
538
539Returns:
540 An object of the form:
541
542 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800543 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
544 "clientOperationId": "A String",
545 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
546 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
547 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
548 "operationType": "A String",
549 "httpErrorMessage": "A String",
550 "progress": 42,
551 "httpErrorStatusCode": 42,
552 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
553 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
554 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
555 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400556 {
557 "message": "A String", # Optional human-readable details for this warning.
558 "code": "A String", # The warning type identifier for this warning.
559 "data": [ # Metadata for this warning in 'key: value' format.
560 {
561 "value": "A String", # A warning data value corresponding to the key.
562 "key": "A String", # A key for the warning data.
563 },
564 ],
565 },
566 ],
Craig Citroe633be12015-03-02 13:40:36 -0800567 "user": "A String",
568 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
569 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
570 "name": "A String", # [Output Only] Name of the resource (output only).
571 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
572 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
573 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400574 {
Craig Citroe633be12015-03-02 13:40:36 -0800575 "message": "A String", # [Output Only] An optional, human-readable error message.
576 "code": "A String", # [Output Only] The error type identifier for this error.
577 "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 -0400578 },
579 ],
580 },
Craig Citroe633be12015-03-02 13:40:36 -0800581 "endTime": "A String",
582 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
583 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400584 }</pre>
585</div>
586
587<div class="method">
588 <code class="details" id="get">get(project, zone, instance)</code>
589 <pre>Returns the specified instance resource.
590
591Args:
592 project: string, Name of the project scoping this request. (required)
593 zone: string, Name of the zone scoping this request. (required)
594 instance: string, Name of the instance resource to return. (required)
595
596Returns:
597 An object of the form:
598
599 { # An instance resource.
600 "status": "A String", # Instance status. One of the following values: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only).
601 "kind": "compute#instance", # Type of the resource.
602 "canIpForward": True or False, # Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false.
603 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
604 "zone": "A String", # URL of the zone where the instance resides (output only).
605 "tags": { # A set of instance tags. # A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on 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 -0700606 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
607 "A String",
608 ],
609 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
610 },
John Asmuth614db982014-04-24 15:46:26 -0400611 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
612 { # An instance-attached disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700613 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
614 "kind": "compute#attachedDisk", # Type of the resource.
615 "initializeParams": { # Initialization parameters for the new disk (input-only). Can only be specified on the boot disk or local SSDs. Mutually exclusive with 'source'. # Initialization parameters.
616 "diskSizeGb": "A String", # Size of the disk in base-2 GB.
617 "diskName": "A String", # Name of the disk (when not provided defaults to the name of the instance).
618 "sourceImage": "A String", # The source image used to create this disk.
619 "diskType": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
John Asmuth614db982014-04-24 15:46:26 -0400620 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700621 "autoDelete": True or False, # Whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
622 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
623 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700624 "licenses": [ # Public visible licenses.
625 "A String",
626 ],
Craig Citroe633be12015-03-02 13:40:36 -0800627 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
628 "interface": "A String",
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700629 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
Craig Citroe633be12015-03-02 13:40:36 -0800630 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700631 },
John Asmuth614db982014-04-24 15:46:26 -0400632 ],
633 "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.
634 "statusMessage": "A String", # An optional, human-readable explanation of the status (output only).
635 "scheduling": { # Scheduling options for an Instance. # Scheduling options for this instance.
636 "automaticRestart": True or False, # Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user).
637 "onHostMaintenance": "A String", # How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
638 },
639 "machineType": "A String", # URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.
640 "serviceAccounts": [ # A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.
641 { # A service account.
642 "scopes": [ # The list of scopes to be made available for this service account.
643 "A String",
644 ],
645 "email": "A String", # Email address of the service account.
646 },
647 ],
648 "networkInterfaces": [ # 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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
649 { # A network interface resource attached to an instance.
650 "accessConfigs": [ # 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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
651 { # An access configuration attached to an instance's network interface.
652 "kind": "compute#accessConfig", # Type of the resource.
653 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
654 "name": "A String", # Name of this access configuration.
655 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
656 },
657 ],
658 "networkIP": "A String", # An optional IPV4 internal network address assigned to the instance for this network interface (output only).
659 "name": "A String", # Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only).
660 "network": "A String", # URL of the network resource attached to this interface.
661 },
662 ],
663 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
664 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
665 "selfLink": "A String", # Server defined URL for this resource (output only).
666 "metadata": { # A metadata key/value entry. # Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information.
667 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
668 {
669 "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.
670 "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.
671 },
672 ],
673 "kind": "compute#metadata", # Type of the resource.
674 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
675 },
676 }</pre>
677</div>
678
679<div class="method">
680 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance)</code>
681 <pre>Returns the specified instance's serial port output.
682
683Args:
684 project: string, Name of the project scoping this request. (required)
685 zone: string, Name of the zone scoping this request. (required)
686 instance: string, Name of the instance scoping this request. (required)
687
688Returns:
689 An object of the form:
690
691 { # An instance serial console output.
692 "kind": "compute#serialPortOutput", # Type of the resource.
693 "selfLink": "A String", # Server defined URL for the resource (output only).
694 "contents": "A String", # The contents of the console output.
695 }</pre>
696</div>
697
698<div class="method">
699 <code class="details" id="insert">insert(project, zone, body)</code>
700 <pre>Creates an instance resource in the specified project using the data included in the request.
701
702Args:
703 project: string, Name of the project scoping this request. (required)
704 zone: string, Name of the zone scoping this request. (required)
705 body: object, The request body. (required)
706 The object takes the form of:
707
708{ # An instance resource.
709 "status": "A String", # Instance status. One of the following values: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only).
710 "kind": "compute#instance", # Type of the resource.
711 "canIpForward": True or False, # Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false.
712 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
713 "zone": "A String", # URL of the zone where the instance resides (output only).
714 "tags": { # A set of instance tags. # A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on 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 -0700715 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
716 "A String",
717 ],
718 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
719 },
John Asmuth614db982014-04-24 15:46:26 -0400720 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
721 { # An instance-attached disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700722 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
723 "kind": "compute#attachedDisk", # Type of the resource.
724 "initializeParams": { # Initialization parameters for the new disk (input-only). Can only be specified on the boot disk or local SSDs. Mutually exclusive with 'source'. # Initialization parameters.
725 "diskSizeGb": "A String", # Size of the disk in base-2 GB.
726 "diskName": "A String", # Name of the disk (when not provided defaults to the name of the instance).
727 "sourceImage": "A String", # The source image used to create this disk.
728 "diskType": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
John Asmuth614db982014-04-24 15:46:26 -0400729 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700730 "autoDelete": True or False, # Whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
731 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
732 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700733 "licenses": [ # Public visible licenses.
734 "A String",
735 ],
Craig Citroe633be12015-03-02 13:40:36 -0800736 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
737 "interface": "A String",
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700738 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
Craig Citroe633be12015-03-02 13:40:36 -0800739 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700740 },
John Asmuth614db982014-04-24 15:46:26 -0400741 ],
742 "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.
743 "statusMessage": "A String", # An optional, human-readable explanation of the status (output only).
744 "scheduling": { # Scheduling options for an Instance. # Scheduling options for this instance.
745 "automaticRestart": True or False, # Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user).
746 "onHostMaintenance": "A String", # How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
747 },
748 "machineType": "A String", # URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.
749 "serviceAccounts": [ # A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.
750 { # A service account.
751 "scopes": [ # The list of scopes to be made available for this service account.
752 "A String",
753 ],
754 "email": "A String", # Email address of the service account.
755 },
756 ],
757 "networkInterfaces": [ # 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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
758 { # A network interface resource attached to an instance.
759 "accessConfigs": [ # 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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
760 { # An access configuration attached to an instance's network interface.
761 "kind": "compute#accessConfig", # Type of the resource.
762 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
763 "name": "A String", # Name of this access configuration.
764 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
765 },
766 ],
767 "networkIP": "A String", # An optional IPV4 internal network address assigned to the instance for this network interface (output only).
768 "name": "A String", # Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only).
769 "network": "A String", # URL of the network resource attached to this interface.
770 },
771 ],
772 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
773 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
774 "selfLink": "A String", # Server defined URL for this resource (output only).
775 "metadata": { # A metadata key/value entry. # Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information.
776 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
777 {
778 "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.
779 "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.
780 },
781 ],
782 "kind": "compute#metadata", # Type of the resource.
783 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
784 },
785}
786
787
788Returns:
789 An object of the form:
790
791 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800792 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
793 "clientOperationId": "A String",
794 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
795 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
796 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
797 "operationType": "A String",
798 "httpErrorMessage": "A String",
799 "progress": 42,
800 "httpErrorStatusCode": 42,
801 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
802 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
803 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
804 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400805 {
806 "message": "A String", # Optional human-readable details for this warning.
807 "code": "A String", # The warning type identifier for this warning.
808 "data": [ # Metadata for this warning in 'key: value' format.
809 {
810 "value": "A String", # A warning data value corresponding to the key.
811 "key": "A String", # A key for the warning data.
812 },
813 ],
814 },
815 ],
Craig Citroe633be12015-03-02 13:40:36 -0800816 "user": "A String",
817 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
818 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
819 "name": "A String", # [Output Only] Name of the resource (output only).
820 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
821 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
822 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400823 {
Craig Citroe633be12015-03-02 13:40:36 -0800824 "message": "A String", # [Output Only] An optional, human-readable error message.
825 "code": "A String", # [Output Only] The error type identifier for this error.
826 "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 -0400827 },
828 ],
829 },
Craig Citroe633be12015-03-02 13:40:36 -0800830 "endTime": "A String",
831 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
832 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400833 }</pre>
834</div>
835
836<div class="method">
837 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
838 <pre>Retrieves the list of instance resources contained within the specified zone.
839
840Args:
841 project: string, Name of the project scoping this request. (required)
842 zone: string, Name of the zone scoping this request. (required)
843 maxResults: integer, Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.
844 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
845 filter: string, Optional. Filter expression for filtering listed resources.
846
847Returns:
848 An object of the form:
849
850 { # Contains a list of instance resources.
851 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
Craig Citroe633be12015-03-02 13:40:36 -0800852 "items": [ # A list of Instance resources.
John Asmuth614db982014-04-24 15:46:26 -0400853 { # An instance resource.
854 "status": "A String", # Instance status. One of the following values: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only).
855 "kind": "compute#instance", # Type of the resource.
856 "canIpForward": True or False, # Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false.
857 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
858 "zone": "A String", # URL of the zone where the instance resides (output only).
859 "tags": { # A set of instance tags. # A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on 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 -0700860 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
861 "A String",
862 ],
863 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
864 },
John Asmuth614db982014-04-24 15:46:26 -0400865 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
866 { # An instance-attached disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700867 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
868 "kind": "compute#attachedDisk", # Type of the resource.
869 "initializeParams": { # Initialization parameters for the new disk (input-only). Can only be specified on the boot disk or local SSDs. Mutually exclusive with 'source'. # Initialization parameters.
870 "diskSizeGb": "A String", # Size of the disk in base-2 GB.
871 "diskName": "A String", # Name of the disk (when not provided defaults to the name of the instance).
872 "sourceImage": "A String", # The source image used to create this disk.
873 "diskType": "A String", # URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
John Asmuth614db982014-04-24 15:46:26 -0400874 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700875 "autoDelete": True or False, # Whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
876 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
877 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700878 "licenses": [ # Public visible licenses.
879 "A String",
880 ],
Craig Citroe633be12015-03-02 13:40:36 -0800881 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
882 "interface": "A String",
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700883 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
Craig Citroe633be12015-03-02 13:40:36 -0800884 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700885 },
John Asmuth614db982014-04-24 15:46:26 -0400886 ],
887 "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.
888 "statusMessage": "A String", # An optional, human-readable explanation of the status (output only).
889 "scheduling": { # Scheduling options for an Instance. # Scheduling options for this instance.
890 "automaticRestart": True or False, # Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user).
891 "onHostMaintenance": "A String", # How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
892 },
893 "machineType": "A String", # URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.
894 "serviceAccounts": [ # A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.
895 { # A service account.
896 "scopes": [ # The list of scopes to be made available for this service account.
897 "A String",
898 ],
899 "email": "A String", # Email address of the service account.
900 },
901 ],
902 "networkInterfaces": [ # 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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
903 { # A network interface resource attached to an instance.
904 "accessConfigs": [ # 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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
905 { # An access configuration attached to an instance's network interface.
906 "kind": "compute#accessConfig", # Type of the resource.
907 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
908 "name": "A String", # Name of this access configuration.
909 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
910 },
911 ],
912 "networkIP": "A String", # An optional IPV4 internal network address assigned to the instance for this network interface (output only).
913 "name": "A String", # Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only).
914 "network": "A String", # URL of the network resource attached to this interface.
915 },
916 ],
917 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
918 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
919 "selfLink": "A String", # Server defined URL for this resource (output only).
920 "metadata": { # A metadata key/value entry. # Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information.
921 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
922 {
923 "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.
924 "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.
925 },
926 ],
927 "kind": "compute#metadata", # Type of the resource.
928 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
929 },
930 },
931 ],
932 "kind": "compute#instanceList", # Type of resource.
933 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
934 "selfLink": "A String", # Server defined URL for this resource (output only).
935 }</pre>
936</div>
937
938<div class="method">
939 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
940 <pre>Retrieves the next page of results.
941
942Args:
943 previous_request: The request for the previous page. (required)
944 previous_response: The response from the request for the previous page. (required)
945
946Returns:
947 A request object that you can call 'execute()' on to request the next
948 page. Returns None if there are no more items in the collection.
949 </pre>
950</div>
951
952<div class="method">
953 <code class="details" id="reset">reset(project, zone, instance)</code>
954 <pre>Performs a hard reset on the instance.
955
956Args:
957 project: string, Name of the project scoping this request. (required)
958 zone: string, Name of the zone scoping this request. (required)
959 instance: string, Name of the instance scoping this request. (required)
960
961Returns:
962 An object of the form:
963
964 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800965 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
966 "clientOperationId": "A String",
967 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
968 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
969 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
970 "operationType": "A String",
971 "httpErrorMessage": "A String",
972 "progress": 42,
973 "httpErrorStatusCode": 42,
974 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
975 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
976 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
977 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400978 {
979 "message": "A String", # Optional human-readable details for this warning.
980 "code": "A String", # The warning type identifier for this warning.
981 "data": [ # Metadata for this warning in 'key: value' format.
982 {
983 "value": "A String", # A warning data value corresponding to the key.
984 "key": "A String", # A key for the warning data.
985 },
986 ],
987 },
988 ],
Craig Citroe633be12015-03-02 13:40:36 -0800989 "user": "A String",
990 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
991 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
992 "name": "A String", # [Output Only] Name of the resource (output only).
993 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
994 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
995 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400996 {
Craig Citroe633be12015-03-02 13:40:36 -0800997 "message": "A String", # [Output Only] An optional, human-readable error message.
998 "code": "A String", # [Output Only] The error type identifier for this error.
999 "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 -04001000 },
1001 ],
1002 },
Craig Citroe633be12015-03-02 13:40:36 -08001003 "endTime": "A String",
1004 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
1005 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -04001006 }</pre>
1007</div>
1008
1009<div class="method">
1010 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</code>
1011 <pre>Sets the auto-delete flag for a disk attached to an instance
1012
1013Args:
1014 project: string, Project name. (required)
1015 zone: string, Name of the zone scoping this request. (required)
1016 instance: string, Instance name. (required)
1017 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
1018 deviceName: string, Disk device name to modify. (required)
1019
1020Returns:
1021 An object of the form:
1022
1023 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -08001024 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
1025 "clientOperationId": "A String",
1026 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
1027 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1028 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
1029 "operationType": "A String",
1030 "httpErrorMessage": "A String",
1031 "progress": 42,
1032 "httpErrorStatusCode": 42,
1033 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1034 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
1035 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
1036 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -04001037 {
1038 "message": "A String", # Optional human-readable details for this warning.
1039 "code": "A String", # The warning type identifier for this warning.
1040 "data": [ # Metadata for this warning in 'key: value' format.
1041 {
1042 "value": "A String", # A warning data value corresponding to the key.
1043 "key": "A String", # A key for the warning data.
1044 },
1045 ],
1046 },
1047 ],
Craig Citroe633be12015-03-02 13:40:36 -08001048 "user": "A String",
1049 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
1050 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
1051 "name": "A String", # [Output Only] Name of the resource (output only).
1052 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
1053 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
1054 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001055 {
Craig Citroe633be12015-03-02 13:40:36 -08001056 "message": "A String", # [Output Only] An optional, human-readable error message.
1057 "code": "A String", # [Output Only] The error type identifier for this error.
1058 "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 -04001059 },
1060 ],
1061 },
Craig Citroe633be12015-03-02 13:40:36 -08001062 "endTime": "A String",
1063 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
1064 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -04001065 }</pre>
1066</div>
1067
1068<div class="method">
1069 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
1070 <pre>Sets metadata for the specified instance to the data included in the request.
1071
1072Args:
1073 project: string, Name of the project scoping this request. (required)
1074 zone: string, Name of the zone scoping this request. (required)
1075 instance: string, Name of the instance scoping this request. (required)
1076 body: object, The request body. (required)
1077 The object takes the form of:
1078
1079{ # A metadata key/value entry.
1080 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1081 {
1082 "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.
1083 "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.
1084 },
1085 ],
1086 "kind": "compute#metadata", # Type of the resource.
1087 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
1088}
1089
1090
1091Returns:
1092 An object of the form:
1093
1094 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -08001095 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
1096 "clientOperationId": "A String",
1097 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
1098 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1099 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
1100 "operationType": "A String",
1101 "httpErrorMessage": "A String",
1102 "progress": 42,
1103 "httpErrorStatusCode": 42,
1104 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1105 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
1106 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
1107 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -04001108 {
1109 "message": "A String", # Optional human-readable details for this warning.
1110 "code": "A String", # The warning type identifier for this warning.
1111 "data": [ # Metadata for this warning in 'key: value' format.
1112 {
1113 "value": "A String", # A warning data value corresponding to the key.
1114 "key": "A String", # A key for the warning data.
1115 },
1116 ],
1117 },
1118 ],
Craig Citroe633be12015-03-02 13:40:36 -08001119 "user": "A String",
1120 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
1121 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
1122 "name": "A String", # [Output Only] Name of the resource (output only).
1123 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
1124 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
1125 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001126 {
Craig Citroe633be12015-03-02 13:40:36 -08001127 "message": "A String", # [Output Only] An optional, human-readable error message.
1128 "code": "A String", # [Output Only] The error type identifier for this error.
1129 "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 -04001130 },
1131 ],
1132 },
Craig Citroe633be12015-03-02 13:40:36 -08001133 "endTime": "A String",
1134 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
1135 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -04001136 }</pre>
1137</div>
1138
1139<div class="method">
1140 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body)</code>
1141 <pre>Sets an instance's scheduling options.
1142
1143Args:
1144 project: string, Project name. (required)
1145 zone: string, Name of the zone scoping this request. (required)
1146 instance: string, Instance name. (required)
1147 body: object, The request body. (required)
1148 The object takes the form of:
1149
1150{ # Scheduling options for an Instance.
1151 "automaticRestart": True or False, # Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user).
1152 "onHostMaintenance": "A String", # How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
1153}
1154
1155
1156Returns:
1157 An object of the form:
1158
1159 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -08001160 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
1161 "clientOperationId": "A String",
1162 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
1163 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1164 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
1165 "operationType": "A String",
1166 "httpErrorMessage": "A String",
1167 "progress": 42,
1168 "httpErrorStatusCode": 42,
1169 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1170 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
1171 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
1172 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -04001173 {
1174 "message": "A String", # Optional human-readable details for this warning.
1175 "code": "A String", # The warning type identifier for this warning.
1176 "data": [ # Metadata for this warning in 'key: value' format.
1177 {
1178 "value": "A String", # A warning data value corresponding to the key.
1179 "key": "A String", # A key for the warning data.
1180 },
1181 ],
1182 },
1183 ],
Craig Citroe633be12015-03-02 13:40:36 -08001184 "user": "A String",
1185 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
1186 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
1187 "name": "A String", # [Output Only] Name of the resource (output only).
1188 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
1189 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
1190 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001191 {
Craig Citroe633be12015-03-02 13:40:36 -08001192 "message": "A String", # [Output Only] An optional, human-readable error message.
1193 "code": "A String", # [Output Only] The error type identifier for this error.
1194 "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 -04001195 },
1196 ],
1197 },
Craig Citroe633be12015-03-02 13:40:36 -08001198 "endTime": "A String",
1199 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
1200 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -04001201 }</pre>
1202</div>
1203
1204<div class="method">
1205 <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
1206 <pre>Sets tags for the specified instance to the data included in the request.
1207
1208Args:
1209 project: string, Name of the project scoping this request. (required)
1210 zone: string, Name of the zone scoping this request. (required)
1211 instance: string, Name of the instance scoping this request. (required)
1212 body: object, The request body. (required)
1213 The object takes the form of:
1214
1215{ # A set of instance tags.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001216 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1217 "A String",
1218 ],
1219 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
1220}
John Asmuth614db982014-04-24 15:46:26 -04001221
1222
1223Returns:
1224 An object of the form:
1225
1226 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -08001227 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
1228 "clientOperationId": "A String",
1229 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
1230 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1231 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
1232 "operationType": "A String",
1233 "httpErrorMessage": "A String",
1234 "progress": 42,
1235 "httpErrorStatusCode": 42,
1236 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1237 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
1238 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
1239 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -04001240 {
1241 "message": "A String", # Optional human-readable details for this warning.
1242 "code": "A String", # The warning type identifier for this warning.
1243 "data": [ # Metadata for this warning in 'key: value' format.
1244 {
1245 "value": "A String", # A warning data value corresponding to the key.
1246 "key": "A String", # A key for the warning data.
1247 },
1248 ],
1249 },
1250 ],
Craig Citroe633be12015-03-02 13:40:36 -08001251 "user": "A String",
1252 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
1253 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
1254 "name": "A String", # [Output Only] Name of the resource (output only).
1255 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
1256 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
1257 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001258 {
Craig Citroe633be12015-03-02 13:40:36 -08001259 "message": "A String", # [Output Only] An optional, human-readable error message.
1260 "code": "A String", # [Output Only] The error type identifier for this error.
1261 "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 -04001262 },
1263 ],
1264 },
Craig Citroe633be12015-03-02 13:40:36 -08001265 "endTime": "A String",
1266 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
1267 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
1268 }</pre>
1269</div>
1270
1271<div class="method">
1272 <code class="details" id="start">start(project, zone, instance)</code>
1273 <pre>Starts an instance
1274
1275Args:
1276 project: string, Name of the project scoping this request. (required)
1277 zone: string, Name of the zone scoping this request. (required)
1278 instance: string, Name of the instance resource to start. (required)
1279
1280Returns:
1281 An object of the form:
1282
1283 { # An operation resource, used to manage asynchronous API requests.
1284 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
1285 "clientOperationId": "A String",
1286 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
1287 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1288 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
1289 "operationType": "A String",
1290 "httpErrorMessage": "A String",
1291 "progress": 42,
1292 "httpErrorStatusCode": 42,
1293 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1294 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
1295 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
1296 "warnings": [
1297 {
1298 "message": "A String", # Optional human-readable details for this warning.
1299 "code": "A String", # The warning type identifier for this warning.
1300 "data": [ # Metadata for this warning in 'key: value' format.
1301 {
1302 "value": "A String", # A warning data value corresponding to the key.
1303 "key": "A String", # A key for the warning data.
1304 },
1305 ],
1306 },
1307 ],
1308 "user": "A String",
1309 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
1310 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
1311 "name": "A String", # [Output Only] Name of the resource (output only).
1312 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
1313 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
1314 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1315 {
1316 "message": "A String", # [Output Only] An optional, human-readable error message.
1317 "code": "A String", # [Output Only] The error type identifier for this error.
1318 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
1319 },
1320 ],
1321 },
1322 "endTime": "A String",
1323 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
1324 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
1325 }</pre>
1326</div>
1327
1328<div class="method">
1329 <code class="details" id="stop">stop(project, zone, instance)</code>
1330 <pre>Stops an instance
1331
1332Args:
1333 project: string, Name of the project scoping this request. (required)
1334 zone: string, Name of the zone scoping this request. (required)
1335 instance: string, Name of the instance resource to start. (required)
1336
1337Returns:
1338 An object of the form:
1339
1340 { # An operation resource, used to manage asynchronous API requests.
1341 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
1342 "clientOperationId": "A String",
1343 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
1344 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1345 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
1346 "operationType": "A String",
1347 "httpErrorMessage": "A String",
1348 "progress": 42,
1349 "httpErrorStatusCode": 42,
1350 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1351 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
1352 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
1353 "warnings": [
1354 {
1355 "message": "A String", # Optional human-readable details for this warning.
1356 "code": "A String", # The warning type identifier for this warning.
1357 "data": [ # Metadata for this warning in 'key: value' format.
1358 {
1359 "value": "A String", # A warning data value corresponding to the key.
1360 "key": "A String", # A key for the warning data.
1361 },
1362 ],
1363 },
1364 ],
1365 "user": "A String",
1366 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
1367 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
1368 "name": "A String", # [Output Only] Name of the resource (output only).
1369 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
1370 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
1371 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1372 {
1373 "message": "A String", # [Output Only] An optional, human-readable error message.
1374 "code": "A String", # [Output Only] The error type identifier for this error.
1375 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
1376 },
1377 ],
1378 },
1379 "endTime": "A String",
1380 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
1381 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -04001382 }</pre>
1383</div>
1384
1385</body></html>