blob: 36290bbf37295bfdc766591bac8d9523349e0d03 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</a></code></p>
79<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">A description of how to use this function</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#attachDisk">attachDisk(project, zone, instance, body)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000088<p class="firstline">Attaches a Disk resource to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#delete">delete(project, zone, instance)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000091<p class="firstline">Deletes the specified Instance resource. For more information, see Shutting down an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
93 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</a></code></p>
94<p class="firstline">Deletes an access config from an instance's network interface.</p>
95<p class="toc_element">
96 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName)</a></code></p>
97<p class="firstline">Detaches a disk from an instance.</p>
98<p class="toc_element">
99 <code><a href="#get">get(project, zone, instance)</a></code></p>
100<p class="firstline">Returns the specified instance resource.</p>
101<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000102 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<p class="firstline">Returns the specified instance's serial port output.</p>
104<p class="toc_element">
105 <code><a href="#insert">insert(project, zone, body)</a></code></p>
106<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
107<p class="toc_element">
108 <code><a href="#list">list(project, zone, maxResults=None, pageToken=None, filter=None)</a></code></p>
109<p class="firstline">Retrieves the list of instance resources contained within the specified zone.</p>
110<p class="toc_element">
111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114 <code><a href="#reset">reset(project, zone, instance)</a></code></p>
115<p class="firstline">Performs a hard reset on the instance.</p>
116<p class="toc_element">
117 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000118<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
120 <code><a href="#setMetadata">setMetadata(project, zone, instance, body)</a></code></p>
121<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
122<p class="toc_element">
123 <code><a href="#setScheduling">setScheduling(project, zone, instance, body)</a></code></p>
124<p class="firstline">Sets an instance's scheduling options.</p>
125<p class="toc_element">
126 <code><a href="#setTags">setTags(project, zone, instance, body)</a></code></p>
127<p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800128<p class="toc_element">
129 <code><a href="#start">start(project, zone, instance)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000130<p class="firstline">This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800131<p class="toc_element">
132 <code><a href="#stop">stop(project, zone, instance)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000133<p class="firstline">This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400134<h3>Method Details</h3>
135<div class="method">
136 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</code>
137 <pre>Adds an access config to an instance's network interface.
138
139Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000140 project: string, Project ID for this request. (required)
141 zone: string, The name of the zone for this request. (required)
142 instance: string, The instance name for this request. (required)
143 networkInterface: string, The name of the network interface to add to this instance. (required)
John Asmuth614db982014-04-24 15:46:26 -0400144 body: object, The request body. (required)
145 The object takes the form of:
146
147{ # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000148 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
149 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400150 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000151 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
John Asmuth614db982014-04-24 15:46:26 -0400152}
153
154
155Returns:
156 An object of the form:
157
Takashi Matsuo06694102015-09-11 13:55:40 -0700158 { # 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700160 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000161 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800162 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000163 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
164 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
165 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000166 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000167 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
Craig Citroe633be12015-03-02 13:40:36 -0800168 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000169 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
170 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
171 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400172 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000173 "message": "A String", # [Output Only] Optional human-readable details for this warning.
174 "code": "A String", # [Output Only] The warning type identifier for this warning.
175 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400176 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000177 "value": "A String", # [Output Only] A warning data value corresponding to the key.
178 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400179 },
180 ],
181 },
182 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000183 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
185 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
186 "name": "A String", # [Output Only] Name of the resource.
187 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
188 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800189 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400190 {
Craig Citroe633be12015-03-02 13:40:36 -0800191 "message": "A String", # [Output Only] An optional, human-readable error message.
192 "code": "A String", # [Output Only] The error type identifier for this error.
193 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400194 },
195 ],
196 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000197 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700198 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000199 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400200 }</pre>
201</div>
202
203<div class="method">
204 <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code>
205 <pre>A description of how to use this function
206
207Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000208 project: string, Project ID for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000209 maxResults: integer, Maximum count of results to be returned.
Takashi Matsuo06694102015-09-11 13:55:40 -0700210 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
211 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING.
212
213The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
214
215For example, filter=name ne example-instance.
John Asmuth614db982014-04-24 15:46:26 -0400216
217Returns:
218 An object of the form:
219
220 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000221 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
222 "items": { # [Output Only] A map of scoped instance lists.
John Asmuth614db982014-04-24 15:46:26 -0400223 "a_key": { # Name of the scope containing this set of instances.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000224 "instances": [ # [Output Only] List of instances contained in this scope.
225 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000226 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
227 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000228 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
229 "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 -0400230 "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 +0000231 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
232 "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 -0700233 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
234 "A String",
235 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000236 "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.
237 #
238 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700239 },
John Asmuth614db982014-04-24 15:46:26 -0400240 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
241 { # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700242 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000243 #
244 # 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.
245 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
246 "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.
247 #
248 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
249 #
250 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
251 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
252 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
253 "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:
254 #
255 # global/images/my-private-image
256 #
257 # 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:
258 #
259 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
260 #
261 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
262 "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:
263 #
264 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
265 #
266 # 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:
267 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
268 # - projects/project/zones/zone/diskTypes/diskType
269 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400270 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000271 "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).
272 "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.
273 "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.
274 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700275 "A String",
276 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000277 "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 -0800278 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000279 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
280 "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 -0700281 },
John Asmuth614db982014-04-24 15:46:26 -0400282 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000283 "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.
284 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
285 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700286 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
287 "preemptible": True or False, # Whether the instance is preemptible.
288 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400289 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000290 "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:
291 #
292 # zones/zone/machineTypes/machine-type
293 "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 -0400294 { # A service account.
295 "scopes": [ # The list of scopes to be made available for this service account.
296 "A String",
297 ],
298 "email": "A String", # Email address of the service account.
299 },
300 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000301 "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 -0400302 { # A network interface resource attached to an instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700303 "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400304 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000305 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
306 "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 -0400307 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000308 "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 -0400309 },
310 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000311 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
312 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
313 "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:
314 #
315 # global/networks/default
316 #
317 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
318 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
319 # - projects/project/global/networks/network
320 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400321 },
322 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000323 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
324 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
325 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
326 "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 -0400327 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
328 {
329 "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.
330 "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.
331 },
332 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000333 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
334 "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 -0400335 },
336 },
337 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000338 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
339 "message": "A String", # [Output Only] Optional human-readable details for this warning.
340 "code": "A String", # [Output Only] The warning type identifier for this warning.
341 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400342 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000343 "value": "A String", # [Output Only] A warning data value corresponding to the key.
344 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400345 },
346 ],
347 },
348 },
349 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000350 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
351 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
352 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400353 }</pre>
354</div>
355
356<div class="method">
357 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
358 <pre>Retrieves the next page of results.
359
360Args:
361 previous_request: The request for the previous page. (required)
362 previous_response: The response from the request for the previous page. (required)
363
364Returns:
365 A request object that you can call 'execute()' on to request the next
366 page. Returns None if there are no more items in the collection.
367 </pre>
368</div>
369
370<div class="method">
371 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000372 <pre>Attaches a Disk resource to an instance.
John Asmuth614db982014-04-24 15:46:26 -0400373
374Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000375 project: string, Project ID for this request. (required)
376 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400377 instance: string, Instance name. (required)
378 body: object, The request body. (required)
379 The object takes the form of:
380
381{ # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700382 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000383 #
384 # 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.
385 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
386 "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.
387 #
388 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
389 #
390 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
391 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
392 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
393 "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:
394 #
395 # global/images/my-private-image
396 #
397 # 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:
398 #
399 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
400 #
401 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
402 "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:
403 #
404 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
405 #
406 # 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:
407 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
408 # - projects/project/zones/zone/diskTypes/diskType
409 # - zones/zone/diskTypes/diskType
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700410 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000411 "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).
412 "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.
413 "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.
414 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700415 "A String",
416 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000417 "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 -0800418 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000419 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
420 "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 -0700421}
John Asmuth614db982014-04-24 15:46:26 -0400422
423
424Returns:
425 An object of the form:
426
Takashi Matsuo06694102015-09-11 13:55:40 -0700427 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000428 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700429 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000430 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800431 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000432 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
433 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
434 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000435 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000436 "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 -0800437 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000438 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
439 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
440 "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 -0400441 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000442 "message": "A String", # [Output Only] Optional human-readable details for this warning.
443 "code": "A String", # [Output Only] The warning type identifier for this warning.
444 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400445 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000446 "value": "A String", # [Output Only] A warning data value corresponding to the key.
447 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400448 },
449 ],
450 },
451 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000452 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
453 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
454 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
455 "name": "A String", # [Output Only] Name of the resource.
456 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
457 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800458 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400459 {
Craig Citroe633be12015-03-02 13:40:36 -0800460 "message": "A String", # [Output Only] An optional, human-readable error message.
461 "code": "A String", # [Output Only] The error type identifier for this error.
462 "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 -0400463 },
464 ],
465 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000466 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700467 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000468 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400469 }</pre>
470</div>
471
472<div class="method">
473 <code class="details" id="delete">delete(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000474 <pre>Deletes the specified Instance resource. For more information, see Shutting down an instance.
John Asmuth614db982014-04-24 15:46:26 -0400475
476Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000477 project: string, Project ID for this request. (required)
478 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400479 instance: string, Name of the instance resource to delete. (required)
480
481Returns:
482 An object of the form:
483
Takashi Matsuo06694102015-09-11 13:55:40 -0700484 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000485 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700486 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000487 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800488 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000489 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
490 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
491 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000492 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000493 "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 -0800494 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000495 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
496 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
497 "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 -0400498 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000499 "message": "A String", # [Output Only] Optional human-readable details for this warning.
500 "code": "A String", # [Output Only] The warning type identifier for this warning.
501 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400502 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000503 "value": "A String", # [Output Only] A warning data value corresponding to the key.
504 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400505 },
506 ],
507 },
508 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000509 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
510 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
511 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
512 "name": "A String", # [Output Only] Name of the resource.
513 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
514 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800515 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400516 {
Craig Citroe633be12015-03-02 13:40:36 -0800517 "message": "A String", # [Output Only] An optional, human-readable error message.
518 "code": "A String", # [Output Only] The error type identifier for this error.
519 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400520 },
521 ],
522 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000523 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700524 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000525 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400526 }</pre>
527</div>
528
529<div class="method">
530 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
531 <pre>Deletes an access config from an instance's network interface.
532
533Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000534 project: string, Project ID for this request. (required)
535 zone: string, The name of the zone for this request. (required)
536 instance: string, The instance name for this request. (required)
537 accessConfig: string, The name of the access config to delete. (required)
538 networkInterface: string, The name of the network interface. (required)
John Asmuth614db982014-04-24 15:46:26 -0400539
540Returns:
541 An object of the form:
542
Takashi Matsuo06694102015-09-11 13:55:40 -0700543 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000544 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700545 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000546 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800547 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000548 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
549 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
550 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000551 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000552 "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 -0800553 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000554 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
555 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
556 "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 -0400557 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000558 "message": "A String", # [Output Only] Optional human-readable details for this warning.
559 "code": "A String", # [Output Only] The warning type identifier for this warning.
560 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400561 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000562 "value": "A String", # [Output Only] A warning data value corresponding to the key.
563 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400564 },
565 ],
566 },
567 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000568 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
569 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
570 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
571 "name": "A String", # [Output Only] Name of the resource.
572 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
573 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800574 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400575 {
Craig Citroe633be12015-03-02 13:40:36 -0800576 "message": "A String", # [Output Only] An optional, human-readable error message.
577 "code": "A String", # [Output Only] The error type identifier for this error.
578 "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 -0400579 },
580 ],
581 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000582 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700583 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000584 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400585 }</pre>
586</div>
587
588<div class="method">
589 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
590 <pre>Detaches a disk from an instance.
591
592Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000593 project: string, Project ID for this request. (required)
594 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400595 instance: string, Instance name. (required)
596 deviceName: string, Disk device name to detach. (required)
597
598Returns:
599 An object of the form:
600
Takashi Matsuo06694102015-09-11 13:55:40 -0700601 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000602 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700603 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000604 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800605 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000606 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
607 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
608 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000609 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000610 "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 -0800611 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000612 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
613 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
614 "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 -0400615 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000616 "message": "A String", # [Output Only] Optional human-readable details for this warning.
617 "code": "A String", # [Output Only] The warning type identifier for this warning.
618 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400619 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000620 "value": "A String", # [Output Only] A warning data value corresponding to the key.
621 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400622 },
623 ],
624 },
625 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000626 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
627 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
628 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
629 "name": "A String", # [Output Only] Name of the resource.
630 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
631 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800632 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400633 {
Craig Citroe633be12015-03-02 13:40:36 -0800634 "message": "A String", # [Output Only] An optional, human-readable error message.
635 "code": "A String", # [Output Only] The error type identifier for this error.
636 "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 -0400637 },
638 ],
639 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000640 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700641 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000642 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400643 }</pre>
644</div>
645
646<div class="method">
647 <code class="details" id="get">get(project, zone, instance)</code>
648 <pre>Returns the specified instance resource.
649
650Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000651 project: string, Project ID for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700652 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400653 instance: string, Name of the instance resource to return. (required)
654
655Returns:
656 An object of the form:
657
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000658 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000659 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
660 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000661 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
662 "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 -0400663 "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 +0000664 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
665 "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 -0700666 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
667 "A String",
668 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000669 "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.
670 #
671 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700672 },
John Asmuth614db982014-04-24 15:46:26 -0400673 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
674 { # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700675 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000676 #
677 # 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.
678 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
679 "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.
680 #
681 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
682 #
683 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
684 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
685 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
686 "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:
687 #
688 # global/images/my-private-image
689 #
690 # 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:
691 #
692 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
693 #
694 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
695 "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:
696 #
697 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
698 #
699 # 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:
700 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
701 # - projects/project/zones/zone/diskTypes/diskType
702 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400703 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000704 "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).
705 "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.
706 "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.
707 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700708 "A String",
709 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000710 "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 -0800711 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000712 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
713 "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 -0700714 },
John Asmuth614db982014-04-24 15:46:26 -0400715 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000716 "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.
717 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
718 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700719 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
720 "preemptible": True or False, # Whether the instance is preemptible.
721 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400722 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000723 "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:
724 #
725 # zones/zone/machineTypes/machine-type
726 "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 -0400727 { # A service account.
728 "scopes": [ # The list of scopes to be made available for this service account.
729 "A String",
730 ],
731 "email": "A String", # Email address of the service account.
732 },
733 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000734 "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 -0400735 { # A network interface resource attached to an instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700736 "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400737 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000738 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
739 "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 -0400740 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000741 "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 -0400742 },
743 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000744 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
745 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
746 "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:
747 #
748 # global/networks/default
749 #
750 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
751 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
752 # - projects/project/global/networks/network
753 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400754 },
755 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000756 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
757 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
758 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
759 "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 -0400760 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
761 {
762 "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.
763 "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.
764 },
765 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000766 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
767 "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 -0400768 },
769 }</pre>
770</div>
771
772<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000773 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400774 <pre>Returns the specified instance's serial port output.
775
776Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000777 project: string, Project ID for this request. (required)
778 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400779 instance: string, Name of the instance scoping this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700780 port: integer, Specifies which COM or serial port to retrieve data from.
John Asmuth614db982014-04-24 15:46:26 -0400781
782Returns:
783 An object of the form:
784
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000785 { # An instance's serial console output.
786 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
787 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
788 "contents": "A String", # [Output Only] The contents of the console output.
John Asmuth614db982014-04-24 15:46:26 -0400789 }</pre>
790</div>
791
792<div class="method">
793 <code class="details" id="insert">insert(project, zone, body)</code>
794 <pre>Creates an instance resource in the specified project using the data included in the request.
795
796Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000797 project: string, Project ID for this request. (required)
798 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400799 body: object, The request body. (required)
800 The object takes the form of:
801
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000802{ # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000803 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
804 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000805 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
806 "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 -0400807 "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 +0000808 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
809 "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 -0700810 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
811 "A String",
812 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000813 "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.
814 #
815 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700816 },
John Asmuth614db982014-04-24 15:46:26 -0400817 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
818 { # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700819 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000820 #
821 # 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.
822 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
823 "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.
824 #
825 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
826 #
827 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
828 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
829 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
830 "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:
831 #
832 # global/images/my-private-image
833 #
834 # 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:
835 #
836 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
837 #
838 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
839 "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:
840 #
841 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
842 #
843 # 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:
844 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
845 # - projects/project/zones/zone/diskTypes/diskType
846 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -0400847 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000848 "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).
849 "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.
850 "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.
851 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700852 "A String",
853 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000854 "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 -0800855 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000856 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
857 "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 -0700858 },
John Asmuth614db982014-04-24 15:46:26 -0400859 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000860 "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.
861 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
862 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700863 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
864 "preemptible": True or False, # Whether the instance is preemptible.
865 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -0400866 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000867 "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:
868 #
869 # zones/zone/machineTypes/machine-type
870 "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 -0400871 { # A service account.
872 "scopes": [ # The list of scopes to be made available for this service account.
873 "A String",
874 ],
875 "email": "A String", # Email address of the service account.
876 },
877 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000878 "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 -0400879 { # A network interface resource attached to an instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700880 "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -0400881 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000882 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
883 "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 -0400884 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000885 "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 -0400886 },
887 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000888 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
889 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
890 "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:
891 #
892 # global/networks/default
893 #
894 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
895 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
896 # - projects/project/global/networks/network
897 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400898 },
899 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000900 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
901 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
902 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
903 "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 -0400904 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
905 {
906 "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.
907 "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.
908 },
909 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000910 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
911 "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 -0400912 },
913}
914
915
916Returns:
917 An object of the form:
918
Takashi Matsuo06694102015-09-11 13:55:40 -0700919 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000920 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -0700921 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000922 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -0800923 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000924 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
925 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
926 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000927 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000928 "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 -0800929 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000930 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
931 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
932 "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 -0400933 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000934 "message": "A String", # [Output Only] Optional human-readable details for this warning.
935 "code": "A String", # [Output Only] The warning type identifier for this warning.
936 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -0400937 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000938 "value": "A String", # [Output Only] A warning data value corresponding to the key.
939 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -0400940 },
941 ],
942 },
943 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000944 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
945 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
946 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
947 "name": "A String", # [Output Only] Name of the resource.
948 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
949 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800950 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400951 {
Craig Citroe633be12015-03-02 13:40:36 -0800952 "message": "A String", # [Output Only] An optional, human-readable error message.
953 "code": "A String", # [Output Only] The error type identifier for this error.
954 "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 -0400955 },
956 ],
957 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000958 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700959 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000960 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -0400961 }</pre>
962</div>
963
964<div class="method">
965 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
966 <pre>Retrieves the list of instance resources contained within the specified zone.
967
968Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000969 project: string, Project ID for this request. (required)
970 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000971 maxResults: integer, Maximum count of results to be returned.
Takashi Matsuo06694102015-09-11 13:55:40 -0700972 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
973 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING.
974
975The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
976
977For example, filter=name ne example-instance.
John Asmuth614db982014-04-24 15:46:26 -0400978
979Returns:
980 An object of the form:
981
982 { # Contains a list of instance resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000983 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
984 "items": [ # [Output Only] A list of Instance resources.
985 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000986 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
987 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000988 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
989 "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 -0400990 "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 +0000991 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
992 "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 -0700993 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
994 "A String",
995 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000996 "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.
997 #
998 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700999 },
John Asmuth614db982014-04-24 15:46:26 -04001000 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1001 { # An instance-attached disk resource.
Takashi Matsuo06694102015-09-11 13:55:40 -07001002 "deviceName": "A String", # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001003 #
1004 # 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.
1005 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1006 "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.
1007 #
1008 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1009 #
1010 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1011 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
1012 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
1013 "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:
1014 #
1015 # global/images/my-private-image
1016 #
1017 # 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:
1018 #
1019 # projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
1020 #
1021 # where vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases.
1022 "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:
1023 #
1024 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1025 #
1026 # 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:
1027 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1028 # - projects/project/zones/zone/diskTypes/diskType
1029 # - zones/zone/diskTypes/diskType
John Asmuth614db982014-04-24 15:46:26 -04001030 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001031 "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).
1032 "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.
1033 "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.
1034 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001035 "A String",
1036 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001037 "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 -08001038 "interface": "A String",
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001039 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
1040 "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 -07001041 },
John Asmuth614db982014-04-24 15:46:26 -04001042 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001043 "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.
1044 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1045 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001046 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
1047 "preemptible": True or False, # Whether the instance is preemptible.
1048 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -04001049 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001050 "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:
1051 #
1052 # zones/zone/machineTypes/machine-type
1053 "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 -04001054 { # A service account.
1055 "scopes": [ # The list of scopes to be made available for this service account.
1056 "A String",
1057 ],
1058 "email": "A String", # Email address of the service account.
1059 },
1060 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001061 "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 -04001062 { # A network interface resource attached to an instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001063 "accessConfigs": [ # An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
John Asmuth614db982014-04-24 15:46:26 -04001064 { # An access configuration attached to an instance's network interface.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001065 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1066 "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 -04001067 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001068 "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 -04001069 },
1070 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001071 "networkIP": "A String", # [Output Only] An optional IPV4 internal network address assigned to the instance for this network interface.
1072 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
1073 "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:
1074 #
1075 # global/networks/default
1076 #
1077 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1078 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1079 # - projects/project/global/networks/network
1080 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -04001081 },
1082 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001083 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1084 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1085 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
1086 "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 -04001087 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1088 {
1089 "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.
1090 "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.
1091 },
1092 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001093 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1094 "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 -04001095 },
1096 },
1097 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001098 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
1099 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
1100 "selfLink": "A String", # [Output Only] Server defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -04001101 }</pre>
1102</div>
1103
1104<div class="method">
1105 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1106 <pre>Retrieves the next page of results.
1107
1108Args:
1109 previous_request: The request for the previous page. (required)
1110 previous_response: The response from the request for the previous page. (required)
1111
1112Returns:
1113 A request object that you can call 'execute()' on to request the next
1114 page. Returns None if there are no more items in the collection.
1115 </pre>
1116</div>
1117
1118<div class="method">
1119 <code class="details" id="reset">reset(project, zone, instance)</code>
1120 <pre>Performs a hard reset on the instance.
1121
1122Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001123 project: string, Project ID for this request. (required)
1124 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001125 instance: string, Name of the instance scoping this request. (required)
1126
1127Returns:
1128 An object of the form:
1129
Takashi Matsuo06694102015-09-11 13:55:40 -07001130 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001131 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -07001132 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001133 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001134 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001135 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1136 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1137 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001138 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001139 "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 -08001140 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001141 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1142 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1143 "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 -04001144 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001145 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1146 "code": "A String", # [Output Only] The warning type identifier for this warning.
1147 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001148 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001149 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1150 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001151 },
1152 ],
1153 },
1154 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001155 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1156 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1157 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1158 "name": "A String", # [Output Only] Name of the resource.
1159 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1160 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001161 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001162 {
Craig Citroe633be12015-03-02 13:40:36 -08001163 "message": "A String", # [Output Only] An optional, human-readable error message.
1164 "code": "A String", # [Output Only] The error type identifier for this error.
1165 "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 -04001166 },
1167 ],
1168 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001169 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001170 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001171 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001172 }</pre>
1173</div>
1174
1175<div class="method">
1176 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001177 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04001178
1179Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001180 project: string, Project ID for this request. (required)
1181 zone: string, The name of the zone for this request. (required)
1182 instance: string, The instance name. (required)
John Asmuth614db982014-04-24 15:46:26 -04001183 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001184 deviceName: string, The device name of the disk to modify. (required)
John Asmuth614db982014-04-24 15:46:26 -04001185
1186Returns:
1187 An object of the form:
1188
Takashi Matsuo06694102015-09-11 13:55:40 -07001189 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001190 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -07001191 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001192 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001193 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001194 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1195 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1196 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001197 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001198 "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 -08001199 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001200 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1201 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1202 "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 -04001203 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001204 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1205 "code": "A String", # [Output Only] The warning type identifier for this warning.
1206 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001207 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001208 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1209 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001210 },
1211 ],
1212 },
1213 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001214 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1215 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1216 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1217 "name": "A String", # [Output Only] Name of the resource.
1218 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1219 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001220 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001221 {
Craig Citroe633be12015-03-02 13:40:36 -08001222 "message": "A String", # [Output Only] An optional, human-readable error message.
1223 "code": "A String", # [Output Only] The error type identifier for this error.
1224 "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 -04001225 },
1226 ],
1227 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001228 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001229 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001230 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001231 }</pre>
1232</div>
1233
1234<div class="method">
1235 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
1236 <pre>Sets metadata for the specified instance to the data included in the request.
1237
1238Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001239 project: string, Project ID for this request. (required)
1240 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001241 instance: string, Name of the instance scoping this request. (required)
1242 body: object, The request body. (required)
1243 The object takes the form of:
1244
1245{ # A metadata key/value entry.
1246 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1247 {
1248 "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.
1249 "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.
1250 },
1251 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001252 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1253 "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 -04001254}
1255
1256
1257Returns:
1258 An object of the form:
1259
Takashi Matsuo06694102015-09-11 13:55:40 -07001260 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001261 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -07001262 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001263 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001264 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001265 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1266 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1267 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001268 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001269 "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 -08001270 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001271 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1272 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1273 "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 -04001274 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001275 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1276 "code": "A String", # [Output Only] The warning type identifier for this warning.
1277 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001278 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001279 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1280 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001281 },
1282 ],
1283 },
1284 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001285 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1286 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1287 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1288 "name": "A String", # [Output Only] Name of the resource.
1289 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1290 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001291 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001292 {
Craig Citroe633be12015-03-02 13:40:36 -08001293 "message": "A String", # [Output Only] An optional, human-readable error message.
1294 "code": "A String", # [Output Only] The error type identifier for this error.
1295 "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 -04001296 },
1297 ],
1298 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001299 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001300 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001301 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001302 }</pre>
1303</div>
1304
1305<div class="method">
1306 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body)</code>
1307 <pre>Sets an instance's scheduling options.
1308
1309Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001310 project: string, Project ID for this request. (required)
1311 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001312 instance: string, Instance name. (required)
1313 body: object, The request body. (required)
1314 The object takes the form of:
1315
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001316{ # Sets the scheduling options for an Instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001317 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
1318 "preemptible": True or False, # Whether the instance is preemptible.
1319 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior.
John Asmuth614db982014-04-24 15:46:26 -04001320}
1321
1322
1323Returns:
1324 An object of the form:
1325
Takashi Matsuo06694102015-09-11 13:55:40 -07001326 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001327 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -07001328 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001329 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001330 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001331 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1332 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1333 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001334 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001335 "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 -08001336 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001337 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1338 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1339 "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 -04001340 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001341 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1342 "code": "A String", # [Output Only] The warning type identifier for this warning.
1343 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001344 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001345 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1346 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001347 },
1348 ],
1349 },
1350 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001351 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1352 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1353 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1354 "name": "A String", # [Output Only] Name of the resource.
1355 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1356 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001357 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001358 {
Craig Citroe633be12015-03-02 13:40:36 -08001359 "message": "A String", # [Output Only] An optional, human-readable error message.
1360 "code": "A String", # [Output Only] The error type identifier for this error.
1361 "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 -04001362 },
1363 ],
1364 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001365 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001366 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001367 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001368 }</pre>
1369</div>
1370
1371<div class="method">
1372 <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
1373 <pre>Sets tags for the specified instance to the data included in the request.
1374
1375Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001376 project: string, Project ID for this request. (required)
1377 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001378 instance: string, Name of the instance scoping this request. (required)
1379 body: object, The request body. (required)
1380 The object takes the form of:
1381
1382{ # A set of instance tags.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001383 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1384 "A String",
1385 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001386 "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.
1387 #
1388 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001389}
John Asmuth614db982014-04-24 15:46:26 -04001390
1391
1392Returns:
1393 An object of the form:
1394
Takashi Matsuo06694102015-09-11 13:55:40 -07001395 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001396 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -07001397 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001398 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001399 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001400 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1401 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1402 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001403 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001404 "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 -08001405 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001406 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1407 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1408 "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 -04001409 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001410 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1411 "code": "A String", # [Output Only] The warning type identifier for this warning.
1412 "data": [ # [Output Only] Metadata for this warning in key: value format.
John Asmuth614db982014-04-24 15:46:26 -04001413 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001414 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1415 "key": "A String", # [Output Only] A key for the warning data.
John Asmuth614db982014-04-24 15:46:26 -04001416 },
1417 ],
1418 },
1419 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001420 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1421 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1422 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1423 "name": "A String", # [Output Only] Name of the resource.
1424 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1425 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001426 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001427 {
Craig Citroe633be12015-03-02 13:40:36 -08001428 "message": "A String", # [Output Only] An optional, human-readable error message.
1429 "code": "A String", # [Output Only] The error type identifier for this error.
1430 "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 -04001431 },
1432 ],
1433 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001434 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001435 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001436 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
Craig Citroe633be12015-03-02 13:40:36 -08001437 }</pre>
1438</div>
1439
1440<div class="method">
1441 <code class="details" id="start">start(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001442 <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 -08001443
1444Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001445 project: string, Project ID for this request. (required)
1446 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001447 instance: string, Name of the instance resource to start. (required)
1448
1449Returns:
1450 An object of the form:
1451
Takashi Matsuo06694102015-09-11 13:55:40 -07001452 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001453 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -07001454 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001455 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001456 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001457 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1458 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1459 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001460 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001461 "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 -08001462 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001463 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1464 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1465 "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 -08001466 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001467 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1468 "code": "A String", # [Output Only] The warning type identifier for this warning.
1469 "data": [ # [Output Only] Metadata for this warning in key: value format.
Craig Citroe633be12015-03-02 13:40:36 -08001470 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001471 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1472 "key": "A String", # [Output Only] A key for the warning data.
Craig Citroe633be12015-03-02 13:40:36 -08001473 },
1474 ],
1475 },
1476 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001477 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1478 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1479 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1480 "name": "A String", # [Output Only] Name of the resource.
1481 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1482 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001483 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1484 {
1485 "message": "A String", # [Output Only] An optional, human-readable error message.
1486 "code": "A String", # [Output Only] The error type identifier for this error.
1487 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
1488 },
1489 ],
1490 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001491 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001492 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001493 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
Craig Citroe633be12015-03-02 13:40:36 -08001494 }</pre>
1495</div>
1496
1497<div class="method">
1498 <code class="details" id="stop">stop(project, zone, instance)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001499 <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 -08001500
1501Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001502 project: string, Project ID for this request. (required)
1503 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001504 instance: string, Name of the instance resource to stop. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001505
1506Returns:
1507 An object of the form:
1508
Takashi Matsuo06694102015-09-11 13:55:40 -07001509 { # An Operation resource, used to manage asynchronous API requests.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001510 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
Takashi Matsuo06694102015-09-11 13:55:40 -07001511 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001512 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Craig Citroe633be12015-03-02 13:40:36 -08001513 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001514 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
1515 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
1516 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001517 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001518 "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 -08001519 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001520 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
1521 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
1522 "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 -08001523 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001524 "message": "A String", # [Output Only] Optional human-readable details for this warning.
1525 "code": "A String", # [Output Only] The warning type identifier for this warning.
1526 "data": [ # [Output Only] Metadata for this warning in key: value format.
Craig Citroe633be12015-03-02 13:40:36 -08001527 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001528 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1529 "key": "A String", # [Output Only] A key for the warning data.
Craig Citroe633be12015-03-02 13:40:36 -08001530 },
1531 ],
1532 },
1533 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001534 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1535 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
1536 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
1537 "name": "A String", # [Output Only] Name of the resource.
1538 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
1539 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001540 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1541 {
1542 "message": "A String", # [Output Only] An optional, human-readable error message.
1543 "code": "A String", # [Output Only] The error type identifier for this error.
1544 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
1545 },
1546 ],
1547 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001548 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001549 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001550 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
John Asmuth614db982014-04-24 15:46:26 -04001551 }</pre>
1552</div>
1553
1554</body></html>