blob: d210ac54f1895c3af3157282c6bb379dba4122f9 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</a></code></p>
79<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">A description of how to use this function</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#attachDisk">attachDisk(project, zone, instance, body)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000088<p class="firstline">Attaches a Disk resource to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#delete">delete(project, zone, instance)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000091<p class="firstline">Deletes the specified Instance resource. For more information, see Shutting down an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
93 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</a></code></p>
94<p class="firstline">Deletes an access config from an instance's network interface.</p>
95<p class="toc_element">
96 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName)</a></code></p>
97<p class="firstline">Detaches a disk from an instance.</p>
98<p class="toc_element">
99 <code><a href="#get">get(project, zone, instance)</a></code></p>
100<p class="firstline">Returns the specified instance resource.</p>
101<p class="toc_element">
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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000118<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
120 <code><a href="#setMetadata">setMetadata(project, zone, instance, body)</a></code></p>
121<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
122<p class="toc_element">
123 <code><a href="#setScheduling">setScheduling(project, zone, instance, body)</a></code></p>
124<p class="firstline">Sets an instance's scheduling options.</p>
125<p class="toc_element">
126 <code><a href="#setTags">setTags(project, zone, instance, body)</a></code></p>
127<p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800128<p class="toc_element">
129 <code><a href="#start">start(project, zone, instance)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000130<p class="firstline">This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800131<p class="toc_element">
132 <code><a href="#stop">stop(project, zone, instance)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000133<p class="firstline">This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400134<h3>Method Details</h3>
135<div class="method">
136 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</code>
137 <pre>Adds an access config to an instance's network interface.
138
139Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000140 project: string, Project ID for this request. (required)
141 zone: string, The name of the zone for this request. (required)
142 instance: string, The instance name for this request. (required)
143 networkInterface: string, The name of the network interface to add to this instance. (required)
John Asmuth614db982014-04-24 15:46:26 -0400144 body: object, The request body. (required)
145 The object takes the form of:
146
147{ # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000148 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
149 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400150 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000151 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400152}
153
154
155Returns:
156 An object of the form:
157
158 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000159 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
160 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
161 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800162 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000163 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
164 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
165 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
166 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
167 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800168 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000169 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
170 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
171 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400172 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000173 "message": "A String", # [Output Only] Optional human-readable details for this warning.
174 "code": "A String", # [Output Only] The warning type identifier for this warning.
175 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400176 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000177 "value": "A String", # [Output Only] A warning data value corresponding to the key.
178 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400179 },
180 ],
181 },
182 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000183 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
185 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
186 "name": "A String", # [Output Only] Name of the resource.
187 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
188 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800189 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400190 {
Craig Citroe633be12015-03-02 13:40:36 -0800191 "message": "A String", # [Output Only] An optional, human-readable error message.
192 "code": "A String", # [Output Only] The error type identifier for this error.
193 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400194 },
195 ],
196 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000197 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800198 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000199 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code>
205 <pre>A description of how to use this function
206
207Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000208 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400209 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 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000217 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
218 "items": { # [Output Only] A map of scoped instance lists.
John Asmuth614db982014-04-24 15:46:26 -0400219 "a_key": { # Name of the scope containing this set of instances.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000220 "instances": [ # [Output Only] List of instances contained in this scope.
221 { # An Instance resource.
222 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, TERMINATED.
223 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
224 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
John Asmuth614db982014-04-24 15:46:26 -0400225 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000226 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
227 "tags": { # A set of instance tags. # A list of tags to appy to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700228 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
229 "A String",
230 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000231 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
232 #
233 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700234 },
John Asmuth614db982014-04-24 15:46:26 -0400235 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
236 { # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000237 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
238 #
239 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
240 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
241 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
242 #
243 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
244 #
245 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
246 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
247 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
248 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
249 #
250 # global/images/my-private-image
251 #
252 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
253 #
254 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
255 #
256 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
257 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
258 #
259 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
260 #
261 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
262 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
263 # - projects/project/zones/zone/diskTypes/diskType
264 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400265 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000266 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
267 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
268 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
269 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700270 "A String",
271 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000272 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Craig Citroe633be12015-03-02 13:40:36 -0800273 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000274 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
275 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700276 },
John Asmuth614db982014-04-24 15:46:26 -0400277 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000278 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
279 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
280 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
281 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
282 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400283 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000284 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:
285 #
286 # zones/zone/machineTypes/machine-type
287 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.
John Asmuth614db982014-04-24 15:46:26 -0400288 { # A service account.
289 "scopes": [ # The list of scopes to be made available for this service account.
290 "A String",
291 ],
292 "email": "A String", # Email address of the service account.
293 },
294 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000295 "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.
John Asmuth614db982014-04-24 15:46:26 -0400296 { # A network interface resource attached to an instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000297 "accessConfigs": [ # An array of configurations for this interface. Currently, <codeONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400298 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000299 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
300 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400301 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000302 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400303 },
304 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000305 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
306 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
307 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
308 #
309 # global/networks/default
310 #
311 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
312 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
313 # - projects/project/global/networks/network
314 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400315 },
316 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000317 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
318 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
319 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
320 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
John Asmuth614db982014-04-24 15:46:26 -0400321 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
322 {
323 "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.
324 "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.
325 },
326 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000327 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
328 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -0400329 },
330 },
331 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000332 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
333 "message": "A String", # [Output Only] Optional human-readable details for this warning.
334 "code": "A String", # [Output Only] The warning type identifier for this warning.
335 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400336 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000337 "value": "A String", # [Output Only] A warning data value corresponding to the key.
338 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400339 },
340 ],
341 },
342 },
343 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000344 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
345 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
346 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400347 }</pre>
348</div>
349
350<div class="method">
351 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
352 <pre>Retrieves the next page of results.
353
354Args:
355 previous_request: The request for the previous page. (required)
356 previous_response: The response from the request for the previous page. (required)
357
358Returns:
359 A request object that you can call 'execute()' on to request the next
360 page. Returns None if there are no more items in the collection.
361 </pre>
362</div>
363
364<div class="method">
365 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000366 <pre>Attaches a Disk resource to an instance.
John Asmuth614db982014-04-24 15:46:26 -0400367
368Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000369 project: string, Project ID for this request. (required)
370 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400371 instance: string, Instance name. (required)
372 body: object, The request body. (required)
373 The object takes the form of:
374
375{ # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000376 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
377 #
378 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
379 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
380 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
381 #
382 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
383 #
384 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
385 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
386 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
387 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
388 #
389 # global/images/my-private-image
390 #
391 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
392 #
393 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
394 #
395 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
396 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
397 #
398 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
399 #
400 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
401 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
402 # - projects/project/zones/zone/diskTypes/diskType
403 # - zones/zone/diskTypes/diskType
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700404 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000405 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
406 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
407 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
408 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700409 "A String",
410 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000411 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Craig Citroe633be12015-03-02 13:40:36 -0800412 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000413 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
414 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700415}
John Asmuth614db982014-04-24 15:46:26 -0400416
417
418Returns:
419 An object of the form:
420
421 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000422 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
423 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
424 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800425 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000426 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
427 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
428 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
429 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
430 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800431 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000432 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
433 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
434 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400435 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000436 "message": "A String", # [Output Only] Optional human-readable details for this warning.
437 "code": "A String", # [Output Only] The warning type identifier for this warning.
438 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400439 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000440 "value": "A String", # [Output Only] A warning data value corresponding to the key.
441 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400442 },
443 ],
444 },
445 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000446 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
447 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
448 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
449 "name": "A String", # [Output Only] Name of the resource.
450 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
451 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800452 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400453 {
Craig Citroe633be12015-03-02 13:40:36 -0800454 "message": "A String", # [Output Only] An optional, human-readable error message.
455 "code": "A String", # [Output Only] The error type identifier for this error.
456 "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 -0400457 },
458 ],
459 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000460 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800461 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000462 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400463 }</pre>
464</div>
465
466<div class="method">
467 <code class="details" id="delete">delete(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000468 <pre>Deletes the specified Instance resource. For more information, see Shutting down an instance.
John Asmuth614db982014-04-24 15:46:26 -0400469
470Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000471 project: string, Project ID for this request. (required)
472 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400473 instance: string, Name of the instance resource to delete. (required)
474
475Returns:
476 An object of the form:
477
478 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000479 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
480 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
481 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800482 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000483 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
484 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
485 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
486 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
487 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800488 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000489 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
490 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
491 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400492 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000493 "message": "A String", # [Output Only] Optional human-readable details for this warning.
494 "code": "A String", # [Output Only] The warning type identifier for this warning.
495 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400496 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000497 "value": "A String", # [Output Only] A warning data value corresponding to the key.
498 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400499 },
500 ],
501 },
502 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000503 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
504 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
505 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
506 "name": "A String", # [Output Only] Name of the resource.
507 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
508 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800509 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400510 {
Craig Citroe633be12015-03-02 13:40:36 -0800511 "message": "A String", # [Output Only] An optional, human-readable error message.
512 "code": "A String", # [Output Only] The error type identifier for this error.
513 "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 -0400514 },
515 ],
516 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000517 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800518 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000519 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400520 }</pre>
521</div>
522
523<div class="method">
524 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
525 <pre>Deletes an access config from an instance's network interface.
526
527Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000528 project: string, Project ID for this request. (required)
529 zone: string, The name of the zone for this request. (required)
530 instance: string, The instance name for this request. (required)
531 accessConfig: string, The name of the access config to delete. (required)
532 networkInterface: string, The name of the network interface. (required)
John Asmuth614db982014-04-24 15:46:26 -0400533
534Returns:
535 An object of the form:
536
537 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000538 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
539 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
540 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800541 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000542 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
543 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
544 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
545 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
546 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800547 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000548 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
549 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
550 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400551 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000552 "message": "A String", # [Output Only] Optional human-readable details for this warning.
553 "code": "A String", # [Output Only] The warning type identifier for this warning.
554 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400555 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000556 "value": "A String", # [Output Only] A warning data value corresponding to the key.
557 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400558 },
559 ],
560 },
561 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000562 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
563 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
564 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
565 "name": "A String", # [Output Only] Name of the resource.
566 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
567 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800568 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400569 {
Craig Citroe633be12015-03-02 13:40:36 -0800570 "message": "A String", # [Output Only] An optional, human-readable error message.
571 "code": "A String", # [Output Only] The error type identifier for this error.
572 "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 -0400573 },
574 ],
575 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000576 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800577 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000578 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400579 }</pre>
580</div>
581
582<div class="method">
583 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
584 <pre>Detaches a disk from an instance.
585
586Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000587 project: string, Project ID for this request. (required)
588 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400589 instance: string, Instance name. (required)
590 deviceName: string, Disk device name to detach. (required)
591
592Returns:
593 An object of the form:
594
595 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000596 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
597 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
598 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800599 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000600 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
601 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
602 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
603 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
604 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800605 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000606 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
607 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
608 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400609 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000610 "message": "A String", # [Output Only] Optional human-readable details for this warning.
611 "code": "A String", # [Output Only] The warning type identifier for this warning.
612 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400613 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000614 "value": "A String", # [Output Only] A warning data value corresponding to the key.
615 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400616 },
617 ],
618 },
619 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000620 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
621 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
622 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
623 "name": "A String", # [Output Only] Name of the resource.
624 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
625 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800626 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400627 {
Craig Citroe633be12015-03-02 13:40:36 -0800628 "message": "A String", # [Output Only] An optional, human-readable error message.
629 "code": "A String", # [Output Only] The error type identifier for this error.
630 "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 -0400631 },
632 ],
633 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000634 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800635 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000636 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400637 }</pre>
638</div>
639
640<div class="method">
641 <code class="details" id="get">get(project, zone, instance)</code>
642 <pre>Returns the specified instance resource.
643
644Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000645 project: string, Project ID for this request. (required)
646 zone: string, The name of the The name of the zone for this request.. (required)
John Asmuth614db982014-04-24 15:46:26 -0400647 instance: string, Name of the instance resource to return. (required)
648
649Returns:
650 An object of the form:
651
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000652 { # An Instance resource.
653 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, TERMINATED.
654 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
655 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
John Asmuth614db982014-04-24 15:46:26 -0400656 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000657 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
658 "tags": { # A set of instance tags. # A list of tags to appy to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700659 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
660 "A String",
661 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000662 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
663 #
664 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700665 },
John Asmuth614db982014-04-24 15:46:26 -0400666 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
667 { # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000668 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
669 #
670 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
671 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
672 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
673 #
674 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
675 #
676 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
677 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
678 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
679 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
680 #
681 # global/images/my-private-image
682 #
683 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
684 #
685 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
686 #
687 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
688 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
689 #
690 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
691 #
692 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
693 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
694 # - projects/project/zones/zone/diskTypes/diskType
695 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400696 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000697 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
698 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
699 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
700 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700701 "A String",
702 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000703 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Craig Citroe633be12015-03-02 13:40:36 -0800704 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000705 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
706 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700707 },
John Asmuth614db982014-04-24 15:46:26 -0400708 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000709 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
710 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
711 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
712 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
713 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400714 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000715 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:
716 #
717 # zones/zone/machineTypes/machine-type
718 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.
John Asmuth614db982014-04-24 15:46:26 -0400719 { # A service account.
720 "scopes": [ # The list of scopes to be made available for this service account.
721 "A String",
722 ],
723 "email": "A String", # Email address of the service account.
724 },
725 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000726 "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.
John Asmuth614db982014-04-24 15:46:26 -0400727 { # A network interface resource attached to an instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000728 "accessConfigs": [ # An array of configurations for this interface. Currently, <codeONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400729 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000730 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
731 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400732 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000733 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400734 },
735 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000736 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
737 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
738 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
739 #
740 # global/networks/default
741 #
742 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
743 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
744 # - projects/project/global/networks/network
745 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400746 },
747 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000748 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
749 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
750 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
751 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
John Asmuth614db982014-04-24 15:46:26 -0400752 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
753 {
754 "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.
755 "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.
756 },
757 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000758 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
759 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -0400760 },
761 }</pre>
762</div>
763
764<div class="method">
765 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance)</code>
766 <pre>Returns the specified instance's serial port output.
767
768Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000769 project: string, Project ID for this request. (required)
770 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400771 instance: string, Name of the instance scoping this request. (required)
772
773Returns:
774 An object of the form:
775
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000776 { # An instance's serial console output.
777 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
778 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
779 "contents": "A String", # [Output Only] The contents of the console output.
John Asmuth614db982014-04-24 15:46:26 -0400780 }</pre>
781</div>
782
783<div class="method">
784 <code class="details" id="insert">insert(project, zone, body)</code>
785 <pre>Creates an instance resource in the specified project using the data included in the request.
786
787Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000788 project: string, Project ID for this request. (required)
789 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400790 body: object, The request body. (required)
791 The object takes the form of:
792
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000793{ # An Instance resource.
794 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, TERMINATED.
795 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
796 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
John Asmuth614db982014-04-24 15:46:26 -0400797 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000798 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
799 "tags": { # A set of instance tags. # A list of tags to appy to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700800 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
801 "A String",
802 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000803 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
804 #
805 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700806 },
John Asmuth614db982014-04-24 15:46:26 -0400807 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
808 { # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000809 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
810 #
811 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
812 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
813 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
814 #
815 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
816 #
817 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
818 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
819 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
820 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
821 #
822 # global/images/my-private-image
823 #
824 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
825 #
826 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
827 #
828 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
829 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
830 #
831 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
832 #
833 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
834 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
835 # - projects/project/zones/zone/diskTypes/diskType
836 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400837 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000838 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
839 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
840 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
841 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700842 "A String",
843 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000844 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Craig Citroe633be12015-03-02 13:40:36 -0800845 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000846 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
847 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700848 },
John Asmuth614db982014-04-24 15:46:26 -0400849 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000850 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
851 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
852 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
853 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
854 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400855 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000856 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:
857 #
858 # zones/zone/machineTypes/machine-type
859 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.
John Asmuth614db982014-04-24 15:46:26 -0400860 { # A service account.
861 "scopes": [ # The list of scopes to be made available for this service account.
862 "A String",
863 ],
864 "email": "A String", # Email address of the service account.
865 },
866 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000867 "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.
John Asmuth614db982014-04-24 15:46:26 -0400868 { # A network interface resource attached to an instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000869 "accessConfigs": [ # An array of configurations for this interface. Currently, <codeONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400870 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000871 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
872 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400873 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000874 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400875 },
876 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000877 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
878 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
879 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
880 #
881 # global/networks/default
882 #
883 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
884 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
885 # - projects/project/global/networks/network
886 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400887 },
888 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000889 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
890 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
891 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
892 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
John Asmuth614db982014-04-24 15:46:26 -0400893 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
894 {
895 "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.
896 "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.
897 },
898 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000899 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
900 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -0400901 },
902}
903
904
905Returns:
906 An object of the form:
907
908 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000909 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
910 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
911 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800912 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000913 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
914 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
915 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
916 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
917 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800918 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000919 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
920 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
921 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400922 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000923 "message": "A String", # [Output Only] Optional human-readable details for this warning.
924 "code": "A String", # [Output Only] The warning type identifier for this warning.
925 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400926 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000927 "value": "A String", # [Output Only] A warning data value corresponding to the key.
928 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400929 },
930 ],
931 },
932 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000933 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
934 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
935 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
936 "name": "A String", # [Output Only] Name of the resource.
937 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
938 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800939 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400940 {
Craig Citroe633be12015-03-02 13:40:36 -0800941 "message": "A String", # [Output Only] An optional, human-readable error message.
942 "code": "A String", # [Output Only] The error type identifier for this error.
943 "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 -0400944 },
945 ],
946 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000947 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800948 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000949 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400950 }</pre>
951</div>
952
953<div class="method">
954 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
955 <pre>Retrieves the list of instance resources contained within the specified zone.
956
957Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000958 project: string, Project ID for this request. (required)
959 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400960 maxResults: integer, Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.
961 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
962 filter: string, Optional. Filter expression for filtering listed resources.
963
964Returns:
965 An object of the form:
966
967 { # Contains a list of instance resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000968 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
969 "items": [ # [Output Only] A list of Instance resources.
970 { # An Instance resource.
971 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, TERMINATED.
972 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
973 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
John Asmuth614db982014-04-24 15:46:26 -0400974 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000975 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
976 "tags": { # A set of instance tags. # A list of tags to appy to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700977 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
978 "A String",
979 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000980 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
981 #
982 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700983 },
John Asmuth614db982014-04-24 15:46:26 -0400984 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
985 { # An instance-attached disk resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000986 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/ tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
987 #
988 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
989 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
990 "initializeParams": { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
991 #
992 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
993 #
994 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
995 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
996 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
997 "sourceImage": "A String", # A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:
998 #
999 # global/images/my-private-image
1000 #
1001 # Or you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:
1002 #
1003 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
1004 #
1005 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
1006 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
1007 #
1008 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1009 #
1010 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
1011 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1012 # - projects/project/zones/zone/diskTypes/diskType
1013 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -04001014 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001015 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
1016 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
1017 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
1018 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001019 "A String",
1020 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001021 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Craig Citroe633be12015-03-02 13:40:36 -08001022 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001023 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
1024 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001025 },
John Asmuth614db982014-04-24 15:46:26 -04001026 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001027 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1028 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1029 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
1030 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
1031 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -04001032 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001033 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:
1034 #
1035 # zones/zone/machineTypes/machine-type
1036 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.
John Asmuth614db982014-04-24 15:46:26 -04001037 { # A service account.
1038 "scopes": [ # The list of scopes to be made available for this service account.
1039 "A String",
1040 ],
1041 "email": "A String", # Email address of the service account.
1042 },
1043 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001044 "networkInterfaces": [ # An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.
John Asmuth614db982014-04-24 15:46:26 -04001045 { # A network interface resource attached to an instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001046 "accessConfigs": [ # An array of configurations for this interface. Currently, <codeONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -04001047 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001048 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1049 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -04001050 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001051 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -04001052 },
1053 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001054 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
1055 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
1056 "network": "A String", # URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:
1057 #
1058 # global/networks/default
1059 #
1060 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1061 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1062 # - projects/project/global/networks/network
1063 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -04001064 },
1065 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001066 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1067 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1068 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
1069 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
John Asmuth614db982014-04-24 15:46:26 -04001070 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1071 {
1072 "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.
1073 "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.
1074 },
1075 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001076 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1077 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -04001078 },
1079 },
1080 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001081 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
1082 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1083 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -04001084 }</pre>
1085</div>
1086
1087<div class="method">
1088 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1089 <pre>Retrieves the next page of results.
1090
1091Args:
1092 previous_request: The request for the previous page. (required)
1093 previous_response: The response from the request for the previous page. (required)
1094
1095Returns:
1096 A request object that you can call 'execute()' on to request the next
1097 page. Returns None if there are no more items in the collection.
1098 </pre>
1099</div>
1100
1101<div class="method">
1102 <code class="details" id="reset">reset(project, zone, instance)</code>
1103 <pre>Performs a hard reset on the instance.
1104
1105Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001106 project: string, Project ID for this request. (required)
1107 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001108 instance: string, Name of the instance scoping this request. (required)
1109
1110Returns:
1111 An object of the form:
1112
1113 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001114 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
1115 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
1116 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001117 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001118 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1119 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1120 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1121 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
1122 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001123 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001124 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1125 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1126 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04001127 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001128 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1129 "code": "A String", # [Output Only] The warning type identifier for this warning.
1130 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001131 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001132 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1133 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001134 },
1135 ],
1136 },
1137 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001138 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1139 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1140 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1141 "name": "A String", # [Output Only] Name of the resource.
1142 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1143 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001144 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001145 {
Craig Citroe633be12015-03-02 13:40:36 -08001146 "message": "A String", # [Output Only] An optional, human-readable error message.
1147 "code": "A String", # [Output Only] The error type identifier for this error.
1148 "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 -04001149 },
1150 ],
1151 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001152 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001153 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001154 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001155 }</pre>
1156</div>
1157
1158<div class="method">
1159 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001160 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04001161
1162Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001163 project: string, Project ID for this request. (required)
1164 zone: string, The name of the zone for this request. (required)
1165 instance: string, The instance name. (required)
John Asmuth614db982014-04-24 15:46:26 -04001166 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001167 deviceName: string, The device name of the disk to modify. (required)
John Asmuth614db982014-04-24 15:46:26 -04001168
1169Returns:
1170 An object of the form:
1171
1172 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001173 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
1174 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
1175 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001176 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001177 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1178 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1179 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1180 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
1181 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001182 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001183 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1184 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1185 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04001186 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001187 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1188 "code": "A String", # [Output Only] The warning type identifier for this warning.
1189 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001190 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001191 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1192 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001193 },
1194 ],
1195 },
1196 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001197 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1198 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1199 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1200 "name": "A String", # [Output Only] Name of the resource.
1201 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1202 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001203 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001204 {
Craig Citroe633be12015-03-02 13:40:36 -08001205 "message": "A String", # [Output Only] An optional, human-readable error message.
1206 "code": "A String", # [Output Only] The error type identifier for this error.
1207 "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 -04001208 },
1209 ],
1210 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001211 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001212 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001213 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001214 }</pre>
1215</div>
1216
1217<div class="method">
1218 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
1219 <pre>Sets metadata for the specified instance to the data included in the request.
1220
1221Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001222 project: string, Project ID for this request. (required)
1223 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001224 instance: string, Name of the instance scoping this request. (required)
1225 body: object, The request body. (required)
1226 The object takes the form of:
1227
1228{ # A metadata key/value entry.
1229 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1230 {
1231 "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.
1232 "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.
1233 },
1234 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001235 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1236 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
John Asmuth614db982014-04-24 15:46:26 -04001237}
1238
1239
1240Returns:
1241 An object of the form:
1242
1243 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001244 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
1245 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
1246 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001247 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001248 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1249 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1250 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1251 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
1252 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001253 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001254 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1255 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1256 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04001257 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001258 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1259 "code": "A String", # [Output Only] The warning type identifier for this warning.
1260 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001261 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001262 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1263 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001264 },
1265 ],
1266 },
1267 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001268 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1269 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1270 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1271 "name": "A String", # [Output Only] Name of the resource.
1272 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1273 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001274 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001275 {
Craig Citroe633be12015-03-02 13:40:36 -08001276 "message": "A String", # [Output Only] An optional, human-readable error message.
1277 "code": "A String", # [Output Only] The error type identifier for this error.
1278 "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 -04001279 },
1280 ],
1281 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001282 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001283 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001284 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001285 }</pre>
1286</div>
1287
1288<div class="method">
1289 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body)</code>
1290 <pre>Sets an instance's scheduling options.
1291
1292Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001293 project: string, Project ID for this request. (required)
1294 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001295 instance: string, Instance name. (required)
1296 body: object, The request body. (required)
1297 The object takes the form of:
1298
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001299{ # Sets the scheduling options for an Instance.
1300 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user).
1301 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -04001302}
1303
1304
1305Returns:
1306 An object of the form:
1307
1308 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001309 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
1310 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
1311 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001312 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001313 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1314 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1315 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1316 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
1317 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001318 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001319 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1320 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1321 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04001322 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001323 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1324 "code": "A String", # [Output Only] The warning type identifier for this warning.
1325 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001326 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001327 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1328 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001329 },
1330 ],
1331 },
1332 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001333 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1334 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1335 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1336 "name": "A String", # [Output Only] Name of the resource.
1337 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1338 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001339 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001340 {
Craig Citroe633be12015-03-02 13:40:36 -08001341 "message": "A String", # [Output Only] An optional, human-readable error message.
1342 "code": "A String", # [Output Only] The error type identifier for this error.
1343 "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 -04001344 },
1345 ],
1346 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001347 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001348 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001349 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001350 }</pre>
1351</div>
1352
1353<div class="method">
1354 <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
1355 <pre>Sets tags for the specified instance to the data included in the request.
1356
1357Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001358 project: string, Project ID for this request. (required)
1359 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001360 instance: string, Name of the instance scoping this request. (required)
1361 body: object, The request body. (required)
1362 The object takes the form of:
1363
1364{ # A set of instance tags.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001365 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1366 "A String",
1367 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001368 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.
1369 #
1370 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001371}
John Asmuth614db982014-04-24 15:46:26 -04001372
1373
1374Returns:
1375 An object of the form:
1376
1377 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001378 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
1379 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
1380 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001381 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001382 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1383 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1384 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1385 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
1386 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001387 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001388 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1389 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1390 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04001391 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001392 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1393 "code": "A String", # [Output Only] The warning type identifier for this warning.
1394 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001395 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001396 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1397 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001398 },
1399 ],
1400 },
1401 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001402 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1403 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1404 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1405 "name": "A String", # [Output Only] Name of the resource.
1406 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1407 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001408 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001409 {
Craig Citroe633be12015-03-02 13:40:36 -08001410 "message": "A String", # [Output Only] An optional, human-readable error message.
1411 "code": "A String", # [Output Only] The error type identifier for this error.
1412 "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 -04001413 },
1414 ],
1415 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001416 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001417 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001418 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
Craig Citroe633be12015-03-02 13:40:36 -08001419 }</pre>
1420</div>
1421
1422<div class="method">
1423 <code class="details" id="start">start(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001424 <pre>This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
Craig Citroe633be12015-03-02 13:40:36 -08001425
1426Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001427 project: string, Project ID for this request. (required)
1428 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001429 instance: string, Name of the instance resource to start. (required)
1430
1431Returns:
1432 An object of the form:
1433
1434 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001435 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
1436 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
1437 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001438 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001439 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1440 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1441 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1442 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
1443 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001444 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001445 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1446 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1447 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001448 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001449 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1450 "code": "A String", # [Output Only] The warning type identifier for this warning.
1451 "data": [ # [Output Only] Metadata for this warning in key: value format.
Craig Citroe633be12015-03-02 13:40:36 -08001452 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001453 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1454 "key": "A String", # [Output Only] A key for the warning data.
Craig Citroe633be12015-03-02 13:40:36 -08001455 },
1456 ],
1457 },
1458 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001459 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1460 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1461 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1462 "name": "A String", # [Output Only] Name of the resource.
1463 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1464 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001465 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1466 {
1467 "message": "A String", # [Output Only] An optional, human-readable error message.
1468 "code": "A String", # [Output Only] The error type identifier for this error.
1469 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
1470 },
1471 ],
1472 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001473 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001474 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001475 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
Craig Citroe633be12015-03-02 13:40:36 -08001476 }</pre>
1477</div>
1478
1479<div class="method">
1480 <code class="details" id="stop">stop(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001481 <pre>This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance.
Craig Citroe633be12015-03-02 13:40:36 -08001482
1483Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001484 project: string, Project ID for this request. (required)
1485 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001486 instance: string, Name of the instance resource to start. (required)
1487
1488Returns:
1489 An object of the form:
1490
1491 { # An operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001492 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
1493 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project
1494 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001495 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001496 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1497 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1498 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1499 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses.
1500 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -08001501 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001502 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1503 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1504 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001505 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001506 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1507 "code": "A String", # [Output Only] The warning type identifier for this warning.
1508 "data": [ # [Output Only] Metadata for this warning in key: value format.
Craig Citroe633be12015-03-02 13:40:36 -08001509 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001510 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1511 "key": "A String", # [Output Only] A key for the warning data.
Craig Citroe633be12015-03-02 13:40:36 -08001512 },
1513 ],
1514 },
1515 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001516 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1517 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1518 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1519 "name": "A String", # [Output Only] Name of the resource.
1520 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1521 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001522 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1523 {
1524 "message": "A String", # [Output Only] An optional, human-readable error message.
1525 "code": "A String", # [Output Only] The error type identifier for this error.
1526 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
1527 },
1528 ],
1529 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001530 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001531 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001532 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001533 }</pre>
1534</div>
1535
1536</body></html>