blob: 340a16fc8764390537780f597535b828a05957ee [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">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070081 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Retrieves aggregated list of instances.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#attachDisk">attachDisk(project, zone, instance, body)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000088<p class="firstline">Attaches a Disk resource to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040089<p class="toc_element">
90 <code><a href="#delete">delete(project, zone, instance)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080091<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
93 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</a></code></p>
94<p class="firstline">Deletes an access config from an instance's network interface.</p>
95<p class="toc_element">
96 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName)</a></code></p>
97<p class="firstline">Detaches a disk from an instance.</p>
98<p class="toc_element">
99 <code><a href="#get">get(project, zone, instance)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700100<p class="firstline">Returns the specified Instance resource. Get a list of available instances by making a list() request.</p>
John Asmuth614db982014-04-24 15:46:26 -0400101<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800102 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, 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">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700108 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
John Asmuth614db982014-04-24 15:46:26 -0400110<p class="toc_element">
111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114 <code><a href="#reset">reset(project, zone, instance)</a></code></p>
115<p class="firstline">Performs a hard reset on the instance.</p>
116<p class="toc_element">
117 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000118<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800120 <code><a href="#setMachineType">setMachineType(project, zone, instance, body)</a></code></p>
121<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
122<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -0400123 <code><a href="#setMetadata">setMetadata(project, zone, instance, body)</a></code></p>
124<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
125<p class="toc_element">
126 <code><a href="#setScheduling">setScheduling(project, zone, instance, body)</a></code></p>
127<p class="firstline">Sets an instance's scheduling options.</p>
128<p class="toc_element">
129 <code><a href="#setTags">setTags(project, zone, instance, body)</a></code></p>
130<p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800131<p class="toc_element">
132 <code><a href="#start">start(project, zone, instance)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800133<p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800134<p class="toc_element">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700135 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body)</a></code></p>
136<p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
137<p class="toc_element">
Craig Citroe633be12015-03-02 13:40:36 -0800138 <code><a href="#stop">stop(project, zone, instance)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800139<p class="firstline">Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400140<h3>Method Details</h3>
141<div class="method">
142 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</code>
143 <pre>Adds an access config to an instance's network interface.
144
145Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000146 project: string, Project ID for this request. (required)
147 zone: string, The name of the zone for this request. (required)
148 instance: string, The instance name for this request. (required)
149 networkInterface: string, The name of the network interface to add to this instance. (required)
John Asmuth614db982014-04-24 15:46:26 -0400150 body: object, The request body. (required)
151 The object takes the form of:
152
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700153{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000154 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
155 "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 -0400156 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000157 "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 -0400158}
159
160
161Returns:
162 An object of the form:
163
Takashi Matsuo06694102015-09-11 13:55:40 -0700164 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800165 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
166 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000167 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800168 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
169 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
170 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
171 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000172 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800173 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
174 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800175 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800176 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
177 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000178 "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 -0400179 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800180 "message": "A String", # [Output Only] A human-readable description of the warning code.
181 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
182 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
183 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400184 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000185 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700186 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400187 },
188 ],
189 },
190 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000191 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800192 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
193 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000194 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800195 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000196 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800197 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400198 {
Craig Citroe633be12015-03-02 13:40:36 -0800199 "message": "A String", # [Output Only] An optional, human-readable error message.
200 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700201 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400202 },
203 ],
204 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800205 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700206 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800207 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400208 }</pre>
209</div>
210
211<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700212 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800213 <pre>Retrieves aggregated list of instances.
John Asmuth614db982014-04-24 15:46:26 -0400214
215Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000216 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700217 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
218
219You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
220
221Currently, only sorting by name or creationTimestamp desc is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800222 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.
223 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
224 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
Takashi Matsuo06694102015-09-11 13:55:40 -0700225
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800226The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -0700227
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700228For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800229
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700230You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800231
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700232To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
John Asmuth614db982014-04-24 15:46:26 -0400233
234Returns:
235 An object of the form:
236
237 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800238 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000239 "items": { # [Output Only] A map of scoped instance lists.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800240 "a_key": { # [Output Only] Name of the scope containing this set of instances.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000241 "instances": [ # [Output Only] List of instances contained in this scope.
242 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000243 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700244 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000245 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
246 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800247 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000248 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700249 "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700250 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
251 "A String",
252 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000253 "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.
254 #
255 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700256 },
John Asmuth614db982014-04-24 15:46:26 -0400257 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
258 { # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700259 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
260 #
261 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
262 #
263 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
264 #
265 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
266 #
267 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
268 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
269 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
270 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700271 "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 +0000272 #
273 # 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.
274 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
275 "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.
276 #
277 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
278 #
279 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700280 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
281 #
282 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
283 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
284 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
285 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000286 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
287 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800288 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700289 #
290 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
291 #
292 # projects/debian-cloud/global/images/family/debian-8
293 #
294 # Alternatively, use a specific version of a public operating system image:
295 #
296 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
297 #
298 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000299 #
300 # global/images/my-private-image
301 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700302 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000303 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700304 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800305 #
306 # If the source image is deleted later, this field will not be set.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000307 "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:
308 #
309 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
310 #
311 # 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:
312 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
313 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700314 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
John Asmuth614db982014-04-24 15:46:26 -0400315 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000316 "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).
317 "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.
318 "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.
319 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700320 "A String",
321 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000322 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800323 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000324 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800325 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
326 #
327 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
328 #
329 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700330 },
John Asmuth614db982014-04-24 15:46:26 -0400331 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800332 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000333 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
334 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700335 "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.
336 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800337 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -0400338 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800339 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000340 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800341 # zones/us-central1-f/machineTypes/n1-standard-1
342 #
343 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
344 #
345 # zones/zone/machineTypes/custom-CPUS-MEMORY
346 #
347 # For example: zones/us-central1-f/machineTypes/custom-4-5120
348 #
349 # For a full list of restrictions, read the Specifications for custom machine types.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700350 "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 Service Accounts for more information.
John Asmuth614db982014-04-24 15:46:26 -0400351 { # A service account.
352 "scopes": [ # The list of scopes to be made available for this service account.
353 "A String",
354 ],
355 "email": "A String", # Email address of the service account.
356 },
357 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700358 "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. Only one interface is supported per instance.
John Asmuth614db982014-04-24 15:46:26 -0400359 { # A network interface resource attached to an instance.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700360 "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
361 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000362 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
363 "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 -0400364 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000365 "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 -0400366 },
367 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700368 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000369 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800370 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700371 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
372 # - regions/region/subnetworks/subnetwork
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000373 "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:
374 #
375 # global/networks/default
376 #
377 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
378 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
379 # - projects/project/global/networks/network
380 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -0400381 },
382 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000383 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800384 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
385 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000386 "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 -0400387 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
388 {
389 "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.
390 "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.
391 },
392 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000393 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
394 "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 -0400395 },
396 },
397 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000398 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800399 "message": "A String", # [Output Only] A human-readable description of the warning code.
400 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
401 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
402 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400403 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000404 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700405 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400406 },
407 ],
408 },
409 },
410 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000411 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800412 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
413 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400414 }</pre>
415</div>
416
417<div class="method">
418 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
419 <pre>Retrieves the next page of results.
420
421Args:
422 previous_request: The request for the previous page. (required)
423 previous_response: The response from the request for the previous page. (required)
424
425Returns:
426 A request object that you can call 'execute()' on to request the next
427 page. Returns None if there are no more items in the collection.
428 </pre>
429</div>
430
431<div class="method">
432 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000433 <pre>Attaches a Disk resource to an instance.
John Asmuth614db982014-04-24 15:46:26 -0400434
435Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000436 project: string, Project ID for this request. (required)
437 zone: string, The name of the zone for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800438 instance: string, The instance name for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400439 body: object, The request body. (required)
440 The object takes the form of:
441
442{ # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700443 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
444 #
445 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
446 #
447 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
448 #
449 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
450 #
451 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
452 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
453 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
454 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700455 "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 +0000456 #
457 # 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.
458 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
459 "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.
460 #
461 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
462 #
463 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700464 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
465 #
466 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
467 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
468 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
469 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000470 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
471 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800472 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700473 #
474 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
475 #
476 # projects/debian-cloud/global/images/family/debian-8
477 #
478 # Alternatively, use a specific version of a public operating system image:
479 #
480 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
481 #
482 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000483 #
484 # global/images/my-private-image
485 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700486 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000487 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700488 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800489 #
490 # If the source image is deleted later, this field will not be set.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000491 "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:
492 #
493 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
494 #
495 # 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:
496 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
497 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700498 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700499 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000500 "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).
501 "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.
502 "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.
503 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700504 "A String",
505 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000506 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800507 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000508 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800509 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
510 #
511 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
512 #
513 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700514}
John Asmuth614db982014-04-24 15:46:26 -0400515
516
517Returns:
518 An object of the form:
519
Takashi Matsuo06694102015-09-11 13:55:40 -0700520 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800521 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
522 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000523 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800524 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
525 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
526 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
527 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000528 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800529 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
530 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800531 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800532 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
533 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000534 "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 -0400535 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800536 "message": "A String", # [Output Only] A human-readable description of the warning code.
537 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
538 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
539 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400540 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000541 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700542 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400543 },
544 ],
545 },
546 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000547 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800548 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
549 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000550 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800551 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000552 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800553 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400554 {
Craig Citroe633be12015-03-02 13:40:36 -0800555 "message": "A String", # [Output Only] An optional, human-readable error message.
556 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700557 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400558 },
559 ],
560 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800561 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700562 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800563 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400564 }</pre>
565</div>
566
567<div class="method">
568 <code class="details" id="delete">delete(project, zone, instance)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800569 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
John Asmuth614db982014-04-24 15:46:26 -0400570
571Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000572 project: string, Project ID for this request. (required)
573 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400574 instance: string, Name of the instance resource to delete. (required)
575
576Returns:
577 An object of the form:
578
Takashi Matsuo06694102015-09-11 13:55:40 -0700579 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800580 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
581 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000582 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800583 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
584 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
585 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
586 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000587 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800588 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
589 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800590 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800591 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
592 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000593 "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 -0400594 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800595 "message": "A String", # [Output Only] A human-readable description of the warning code.
596 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
597 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
598 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400599 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000600 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700601 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400602 },
603 ],
604 },
605 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000606 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800607 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
608 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000609 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800610 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000611 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800612 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400613 {
Craig Citroe633be12015-03-02 13:40:36 -0800614 "message": "A String", # [Output Only] An optional, human-readable error message.
615 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700616 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400617 },
618 ],
619 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800620 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700621 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800622 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400623 }</pre>
624</div>
625
626<div class="method">
627 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
628 <pre>Deletes an access config from an instance's network interface.
629
630Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000631 project: string, Project ID for this request. (required)
632 zone: string, The name of the zone for this request. (required)
633 instance: string, The instance name for this request. (required)
634 accessConfig: string, The name of the access config to delete. (required)
635 networkInterface: string, The name of the network interface. (required)
John Asmuth614db982014-04-24 15:46:26 -0400636
637Returns:
638 An object of the form:
639
Takashi Matsuo06694102015-09-11 13:55:40 -0700640 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800641 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
642 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000643 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800644 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
645 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
646 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
647 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000648 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800649 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
650 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800651 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800652 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
653 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000654 "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 -0400655 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800656 "message": "A String", # [Output Only] A human-readable description of the warning code.
657 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
658 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
659 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400660 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000661 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700662 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400663 },
664 ],
665 },
666 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000667 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800668 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
669 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000670 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800671 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000672 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800673 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400674 {
Craig Citroe633be12015-03-02 13:40:36 -0800675 "message": "A String", # [Output Only] An optional, human-readable error message.
676 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700677 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400678 },
679 ],
680 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800681 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700682 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800683 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400684 }</pre>
685</div>
686
687<div class="method">
688 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
689 <pre>Detaches a disk from an instance.
690
691Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000692 project: string, Project ID for this request. (required)
693 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400694 instance: string, Instance name. (required)
695 deviceName: string, Disk device name to detach. (required)
696
697Returns:
698 An object of the form:
699
Takashi Matsuo06694102015-09-11 13:55:40 -0700700 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800701 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
702 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000703 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800704 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
705 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
706 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
707 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000708 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800709 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
710 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800711 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800712 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
713 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000714 "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 -0400715 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800716 "message": "A String", # [Output Only] A human-readable description of the warning code.
717 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
718 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
719 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400720 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000721 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700722 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400723 },
724 ],
725 },
726 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000727 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800728 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
729 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000730 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800731 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000732 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800733 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400734 {
Craig Citroe633be12015-03-02 13:40:36 -0800735 "message": "A String", # [Output Only] An optional, human-readable error message.
736 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700737 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400738 },
739 ],
740 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800741 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700742 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800743 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400744 }</pre>
745</div>
746
747<div class="method">
748 <code class="details" id="get">get(project, zone, instance)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700749 <pre>Returns the specified Instance resource. Get a list of available instances by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -0400750
751Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000752 project: string, Project ID for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700753 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400754 instance: string, Name of the instance resource to return. (required)
755
756Returns:
757 An object of the form:
758
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000759 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000760 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700761 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000762 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
763 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800764 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000765 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700766 "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700767 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
768 "A String",
769 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000770 "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.
771 #
772 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700773 },
John Asmuth614db982014-04-24 15:46:26 -0400774 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
775 { # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700776 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
777 #
778 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
779 #
780 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
781 #
782 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
783 #
784 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
785 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
786 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
787 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700788 "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 +0000789 #
790 # 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.
791 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
792 "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.
793 #
794 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
795 #
796 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700797 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
798 #
799 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
800 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
801 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
802 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000803 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
804 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800805 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700806 #
807 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
808 #
809 # projects/debian-cloud/global/images/family/debian-8
810 #
811 # Alternatively, use a specific version of a public operating system image:
812 #
813 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
814 #
815 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000816 #
817 # global/images/my-private-image
818 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700819 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000820 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700821 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800822 #
823 # If the source image is deleted later, this field will not be set.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000824 "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:
825 #
826 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
827 #
828 # 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:
829 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
830 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700831 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
John Asmuth614db982014-04-24 15:46:26 -0400832 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000833 "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).
834 "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.
835 "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.
836 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700837 "A String",
838 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000839 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800840 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000841 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800842 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
843 #
844 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
845 #
846 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700847 },
John Asmuth614db982014-04-24 15:46:26 -0400848 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800849 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000850 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
851 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700852 "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.
853 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800854 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -0400855 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800856 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000857 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800858 # zones/us-central1-f/machineTypes/n1-standard-1
859 #
860 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
861 #
862 # zones/zone/machineTypes/custom-CPUS-MEMORY
863 #
864 # For example: zones/us-central1-f/machineTypes/custom-4-5120
865 #
866 # For a full list of restrictions, read the Specifications for custom machine types.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700867 "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 Service Accounts for more information.
John Asmuth614db982014-04-24 15:46:26 -0400868 { # A service account.
869 "scopes": [ # The list of scopes to be made available for this service account.
870 "A String",
871 ],
872 "email": "A String", # Email address of the service account.
873 },
874 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700875 "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. Only one interface is supported per instance.
John Asmuth614db982014-04-24 15:46:26 -0400876 { # A network interface resource attached to an instance.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700877 "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
878 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000879 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
880 "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 -0400881 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000882 "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 -0400883 },
884 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700885 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000886 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800887 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700888 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
889 # - regions/region/subnetworks/subnetwork
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000890 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800901 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
902 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000903 "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 }</pre>
914</div>
915
916<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800917 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400918 <pre>Returns the specified instance's serial port output.
919
920Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000921 project: string, Project ID for this request. (required)
922 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400923 instance: string, Name of the instance scoping this request. (required)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800924 start: string, For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value that was returned in the previous call.
Takashi Matsuo06694102015-09-11 13:55:40 -0700925 port: integer, Specifies which COM or serial port to retrieve data from.
John Asmuth614db982014-04-24 15:46:26 -0400926
927Returns:
928 An object of the form:
929
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000930 { # An instance's serial console output.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800931 "start": "A String", # [Output Only] The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000932 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700933 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000934 "contents": "A String", # [Output Only] The contents of the console output.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800935 "next": "A String", # [Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.
John Asmuth614db982014-04-24 15:46:26 -0400936 }</pre>
937</div>
938
939<div class="method">
940 <code class="details" id="insert">insert(project, zone, body)</code>
941 <pre>Creates an instance resource in the specified project using the data included in the request.
942
943Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000944 project: string, Project ID for this request. (required)
945 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400946 body: object, The request body. (required)
947 The object takes the form of:
948
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000949{ # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000950 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700951 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000952 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
953 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800954 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000955 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700956 "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700957 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
958 "A String",
959 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000960 "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.
961 #
962 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700963 },
John Asmuth614db982014-04-24 15:46:26 -0400964 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
965 { # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700966 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
967 #
968 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
969 #
970 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
971 #
972 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
973 #
974 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
975 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
976 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
977 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700978 "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 +0000979 #
980 # 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.
981 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
982 "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.
983 #
984 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
985 #
986 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700987 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
988 #
989 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
990 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
991 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
992 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000993 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
994 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800995 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700996 #
997 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
998 #
999 # projects/debian-cloud/global/images/family/debian-8
1000 #
1001 # Alternatively, use a specific version of a public operating system image:
1002 #
1003 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
1004 #
1005 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001006 #
1007 # global/images/my-private-image
1008 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001009 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001010 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001011 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001012 #
1013 # If the source image is deleted later, this field will not be set.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001014 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
1015 #
1016 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1017 #
1018 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
1019 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1020 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001021 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
John Asmuth614db982014-04-24 15:46:26 -04001022 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001023 "autoDelete": True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
1024 "index": 42, # Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.
1025 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
1026 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001027 "A String",
1028 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001029 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001030 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001031 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001032 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
1033 #
1034 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1035 #
1036 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001037 },
John Asmuth614db982014-04-24 15:46:26 -04001038 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001039 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001040 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1041 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001042 "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.
1043 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001044 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -04001045 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001046 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001047 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001048 # zones/us-central1-f/machineTypes/n1-standard-1
1049 #
1050 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
1051 #
1052 # zones/zone/machineTypes/custom-CPUS-MEMORY
1053 #
1054 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1055 #
1056 # For a full list of restrictions, read the Specifications for custom machine types.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001057 "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 Service Accounts for more information.
John Asmuth614db982014-04-24 15:46:26 -04001058 { # A service account.
1059 "scopes": [ # The list of scopes to be made available for this service account.
1060 "A String",
1061 ],
1062 "email": "A String", # Email address of the service account.
1063 },
1064 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001065 "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. Only one interface is supported per instance.
John Asmuth614db982014-04-24 15:46:26 -04001066 { # A network interface resource attached to an instance.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001067 "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
1068 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001069 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1070 "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 -04001071 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001072 "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 -04001073 },
1074 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001075 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001076 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001077 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001078 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1079 # - regions/region/subnetworks/subnetwork
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001080 "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:
1081 #
1082 # global/networks/default
1083 #
1084 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1085 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1086 # - projects/project/global/networks/network
1087 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -04001088 },
1089 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001090 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001091 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1092 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001093 "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 -04001094 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1095 {
1096 "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.
1097 "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.
1098 },
1099 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001100 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1101 "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 -04001102 },
1103}
1104
1105
1106Returns:
1107 An object of the form:
1108
Takashi Matsuo06694102015-09-11 13:55:40 -07001109 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001110 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1111 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001112 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001113 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1114 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1115 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1116 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001117 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001118 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1119 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001120 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001121 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1122 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001123 "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 -04001124 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001125 "message": "A String", # [Output Only] A human-readable description of the warning code.
1126 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1127 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1128 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001129 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001130 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001131 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -04001132 },
1133 ],
1134 },
1135 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001136 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001137 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1138 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001139 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001140 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001141 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001142 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001143 {
Craig Citroe633be12015-03-02 13:40:36 -08001144 "message": "A String", # [Output Only] An optional, human-readable error message.
1145 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001146 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001147 },
1148 ],
1149 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001150 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001151 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001152 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -04001153 }</pre>
1154</div>
1155
1156<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001157 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001158 <pre>Retrieves the list of instances contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -04001159
1160Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001161 project: string, Project ID for this request. (required)
1162 zone: string, The name of the zone for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001163 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1164
1165You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1166
1167Currently, only sorting by name or creationTimestamp desc is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001168 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.
1169 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
1170 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
Takashi Matsuo06694102015-09-11 13:55:40 -07001171
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001172The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
Takashi Matsuo06694102015-09-11 13:55:40 -07001173
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001174For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001175
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001176You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001177
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001178To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
John Asmuth614db982014-04-24 15:46:26 -04001179
1180Returns:
1181 An object of the form:
1182
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001183 { # Contains a list of instances.
1184 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1185 "items": [ # [Output Only] A list of instances.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001186 { # An Instance resource.
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001187 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001188 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001189 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
1190 "canIpForward": True or False, # Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001191 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001192 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001193 "tags": { # A set of instance tags. # A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001194 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1195 "A String",
1196 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001197 "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.
1198 #
1199 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001200 },
John Asmuth614db982014-04-24 15:46:26 -04001201 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1202 { # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001203 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1204 #
1205 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
1206 #
1207 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
1208 #
1209 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
1210 #
1211 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1212 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1213 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1214 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001215 "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 +00001216 #
1217 # 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.
1218 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1219 "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.
1220 #
1221 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1222 #
1223 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001224 "sourceImageEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1225 #
1226 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
1227 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1228 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1229 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001230 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
1231 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001232 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001233 #
1234 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:
1235 #
1236 # projects/debian-cloud/global/images/family/debian-8
1237 #
1238 # Alternatively, use a specific version of a public operating system image:
1239 #
1240 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
1241 #
1242 # To create a disk with a private image that you created, specify the image name in the following format:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001243 #
1244 # global/images/my-private-image
1245 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001246 # You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001247 #
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001248 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001249 #
1250 # If the source image is deleted later, this field will not be set.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001251 "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:
1252 #
1253 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1254 #
1255 # 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:
1256 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1257 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001258 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
John Asmuth614db982014-04-24 15:46:26 -04001259 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001260 "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).
1261 "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.
1262 "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.
1263 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001264 "A String",
1265 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001266 "mode": "A String", # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001267 "interface": "A String", # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001268 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001269 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
1270 #
1271 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1272 #
1273 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001274 },
John Asmuth614db982014-04-24 15:46:26 -04001275 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001276 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001277 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1278 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001279 "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.
1280 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001281 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -04001282 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001283 "machineType": "A String", # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001284 #
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001285 # zones/us-central1-f/machineTypes/n1-standard-1
1286 #
1287 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
1288 #
1289 # zones/zone/machineTypes/custom-CPUS-MEMORY
1290 #
1291 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1292 #
1293 # For a full list of restrictions, read the Specifications for custom machine types.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001294 "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 Service Accounts for more information.
John Asmuth614db982014-04-24 15:46:26 -04001295 { # A service account.
1296 "scopes": [ # The list of scopes to be made available for this service account.
1297 "A String",
1298 ],
1299 "email": "A String", # Email address of the service account.
1300 },
1301 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001302 "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. Only one interface is supported per instance.
John Asmuth614db982014-04-24 15:46:26 -04001303 { # A network interface resource attached to an instance.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001304 "accessConfigs": [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
1305 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001306 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1307 "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 -04001308 "name": "A String", # Name of this access configuration.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001309 "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 -04001310 },
1311 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001312 "networkIP": "A String", # An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001313 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001314 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001315 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1316 # - regions/region/subnetworks/subnetwork
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001317 "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:
1318 #
1319 # global/networks/default
1320 #
1321 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1322 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1323 # - projects/project/global/networks/network
1324 # - global/networks/default
John Asmuth614db982014-04-24 15:46:26 -04001325 },
1326 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001327 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001328 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1329 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001330 "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 -04001331 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1332 {
1333 "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.
1334 "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.
1335 },
1336 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001337 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1338 "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 -04001339 },
1340 },
1341 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001342 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001343 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1344 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -04001345 }</pre>
1346</div>
1347
1348<div class="method">
1349 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1350 <pre>Retrieves the next page of results.
1351
1352Args:
1353 previous_request: The request for the previous page. (required)
1354 previous_response: The response from the request for the previous page. (required)
1355
1356Returns:
1357 A request object that you can call 'execute()' on to request the next
1358 page. Returns None if there are no more items in the collection.
1359 </pre>
1360</div>
1361
1362<div class="method">
1363 <code class="details" id="reset">reset(project, zone, instance)</code>
1364 <pre>Performs a hard reset on the instance.
1365
1366Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001367 project: string, Project ID for this request. (required)
1368 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001369 instance: string, Name of the instance scoping this request. (required)
1370
1371Returns:
1372 An object of the form:
1373
Takashi Matsuo06694102015-09-11 13:55:40 -07001374 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001375 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1376 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001377 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001378 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1379 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1380 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1381 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001382 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001383 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1384 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001385 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001386 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1387 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001388 "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 -04001389 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001390 "message": "A String", # [Output Only] A human-readable description of the warning code.
1391 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1392 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1393 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001394 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001395 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001396 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -04001397 },
1398 ],
1399 },
1400 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001401 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001402 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1403 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001404 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001405 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001406 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001407 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001408 {
Craig Citroe633be12015-03-02 13:40:36 -08001409 "message": "A String", # [Output Only] An optional, human-readable error message.
1410 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001411 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001412 },
1413 ],
1414 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001415 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001416 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001417 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -04001418 }</pre>
1419</div>
1420
1421<div class="method">
1422 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001423 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04001424
1425Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001426 project: string, Project ID for this request. (required)
1427 zone: string, The name of the zone for this request. (required)
1428 instance: string, The instance name. (required)
John Asmuth614db982014-04-24 15:46:26 -04001429 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001430 deviceName: string, The device name of the disk to modify. (required)
John Asmuth614db982014-04-24 15:46:26 -04001431
1432Returns:
1433 An object of the form:
1434
Takashi Matsuo06694102015-09-11 13:55:40 -07001435 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001436 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1437 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001438 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001439 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1440 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1441 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1442 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001443 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001444 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1445 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001446 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001447 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1448 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001449 "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 -04001450 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001451 "message": "A String", # [Output Only] A human-readable description of the warning code.
1452 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1453 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1454 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001455 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001456 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001457 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -04001458 },
1459 ],
1460 },
1461 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001462 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001463 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1464 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001465 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001466 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001467 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001468 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001469 {
Craig Citroe633be12015-03-02 13:40:36 -08001470 "message": "A String", # [Output Only] An optional, human-readable error message.
1471 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001472 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001473 },
1474 ],
1475 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001476 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001477 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001478 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001479 }</pre>
1480</div>
1481
1482<div class="method">
1483 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body)</code>
1484 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
1485
1486Args:
1487 project: string, Project ID for this request. (required)
1488 zone: string, The name of the zone for this request. (required)
1489 instance: string, Name of the instance scoping this request. (required)
1490 body: object, The request body. (required)
1491 The object takes the form of:
1492
1493{
1494 "machineType": "A String", # Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1
1495 }
1496
1497
1498Returns:
1499 An object of the form:
1500
1501 { # An Operation resource, used to manage asynchronous API requests.
1502 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1503 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1504 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1505 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1506 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1507 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1508 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1509 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1510 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1511 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
1512 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1513 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1514 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1515 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1516 {
1517 "message": "A String", # [Output Only] A human-readable description of the warning code.
1518 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1519 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1520 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1521 {
1522 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001523 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001524 },
1525 ],
1526 },
1527 ],
1528 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1529 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1530 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1531 "name": "A String", # [Output Only] Name of the resource.
1532 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1533 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1534 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1535 {
1536 "message": "A String", # [Output Only] An optional, human-readable error message.
1537 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001538 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001539 },
1540 ],
1541 },
1542 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1543 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001544 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -04001545 }</pre>
1546</div>
1547
1548<div class="method">
1549 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
1550 <pre>Sets metadata for the specified instance to the data included in the request.
1551
1552Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001553 project: string, Project ID for this request. (required)
1554 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001555 instance: string, Name of the instance scoping this request. (required)
1556 body: object, The request body. (required)
1557 The object takes the form of:
1558
1559{ # A metadata key/value entry.
1560 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1561 {
1562 "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.
1563 "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.
1564 },
1565 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001566 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1567 "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 -04001568}
1569
1570
1571Returns:
1572 An object of the form:
1573
Takashi Matsuo06694102015-09-11 13:55:40 -07001574 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001575 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1576 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001577 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001578 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1579 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1580 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1581 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001582 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001583 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1584 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001585 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001586 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1587 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001588 "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 -04001589 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001590 "message": "A String", # [Output Only] A human-readable description of the warning code.
1591 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1592 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1593 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001594 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001595 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001596 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -04001597 },
1598 ],
1599 },
1600 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001601 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001602 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1603 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001604 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001605 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001606 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001607 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001608 {
Craig Citroe633be12015-03-02 13:40:36 -08001609 "message": "A String", # [Output Only] An optional, human-readable error message.
1610 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001611 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001612 },
1613 ],
1614 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001615 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001616 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001617 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -04001618 }</pre>
1619</div>
1620
1621<div class="method">
1622 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body)</code>
1623 <pre>Sets an instance's scheduling options.
1624
1625Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001626 project: string, Project ID for this request. (required)
1627 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001628 instance: string, Instance name. (required)
1629 body: object, The request body. (required)
1630 The object takes the form of:
1631
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001632{ # Sets the scheduling options for an Instance.
Takashi Matsuo06694102015-09-11 13:55:40 -07001633 "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.
1634 "preemptible": True or False, # Whether the instance is preemptible.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001635 "onHostMaintenance": "A String", # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
John Asmuth614db982014-04-24 15:46:26 -04001636}
1637
1638
1639Returns:
1640 An object of the form:
1641
Takashi Matsuo06694102015-09-11 13:55:40 -07001642 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001643 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1644 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001645 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001646 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1647 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1648 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1649 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001650 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001651 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1652 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001653 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001654 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1655 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001656 "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 -04001657 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001658 "message": "A String", # [Output Only] A human-readable description of the warning code.
1659 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1660 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1661 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001662 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001663 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001664 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -04001665 },
1666 ],
1667 },
1668 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001669 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001670 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1671 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001672 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001673 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001674 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001675 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001676 {
Craig Citroe633be12015-03-02 13:40:36 -08001677 "message": "A String", # [Output Only] An optional, human-readable error message.
1678 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001679 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001680 },
1681 ],
1682 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001683 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001684 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001685 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -04001686 }</pre>
1687</div>
1688
1689<div class="method">
1690 <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
1691 <pre>Sets tags for the specified instance to the data included in the request.
1692
1693Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001694 project: string, Project ID for this request. (required)
1695 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001696 instance: string, Name of the instance scoping this request. (required)
1697 body: object, The request body. (required)
1698 The object takes the form of:
1699
1700{ # A set of instance tags.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001701 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1702 "A String",
1703 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001704 "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.
1705 #
1706 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001707}
John Asmuth614db982014-04-24 15:46:26 -04001708
1709
1710Returns:
1711 An object of the form:
1712
Takashi Matsuo06694102015-09-11 13:55:40 -07001713 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001714 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1715 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001716 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001717 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1718 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1719 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1720 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001721 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001722 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1723 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001724 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001725 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1726 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001727 "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 -04001728 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001729 "message": "A String", # [Output Only] A human-readable description of the warning code.
1730 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1731 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1732 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001733 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001734 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001735 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -04001736 },
1737 ],
1738 },
1739 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001740 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001741 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1742 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001743 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001744 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001745 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001746 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001747 {
Craig Citroe633be12015-03-02 13:40:36 -08001748 "message": "A String", # [Output Only] An optional, human-readable error message.
1749 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001750 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001751 },
1752 ],
1753 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001754 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001755 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001756 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Craig Citroe633be12015-03-02 13:40:36 -08001757 }</pre>
1758</div>
1759
1760<div class="method">
1761 <code class="details" id="start">start(project, zone, instance)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001762 <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
Craig Citroe633be12015-03-02 13:40:36 -08001763
1764Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001765 project: string, Project ID for this request. (required)
1766 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001767 instance: string, Name of the instance resource to start. (required)
1768
1769Returns:
1770 An object of the form:
1771
Takashi Matsuo06694102015-09-11 13:55:40 -07001772 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001773 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1774 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001775 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001776 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1777 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1778 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1779 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001780 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001781 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1782 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001783 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001784 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1785 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001786 "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 -08001787 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001788 "message": "A String", # [Output Only] A human-readable description of the warning code.
1789 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1790 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1791 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citroe633be12015-03-02 13:40:36 -08001792 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001793 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001794 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Craig Citroe633be12015-03-02 13:40:36 -08001795 },
1796 ],
1797 },
1798 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001799 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001800 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1801 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001802 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001803 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001804 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001805 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1806 {
1807 "message": "A String", # [Output Only] An optional, human-readable error message.
1808 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001809 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citroe633be12015-03-02 13:40:36 -08001810 },
1811 ],
1812 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001813 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001814 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001815 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Craig Citroe633be12015-03-02 13:40:36 -08001816 }</pre>
1817</div>
1818
1819<div class="method">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001820 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body)</code>
1821 <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
1822
1823Args:
1824 project: string, Project ID for this request. (required)
1825 zone: string, The name of the zone for this request. (required)
1826 instance: string, Name of the instance resource to start. (required)
1827 body: object, The request body. (required)
1828 The object takes the form of:
1829
1830{
1831 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
1832 #
1833 # In order to start the instance, the disk url and its corresponding key must be provided.
1834 #
1835 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
1836 {
1837 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
1838 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1839 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1840 },
1841 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
1842 },
1843 ],
1844 }
1845
1846
1847Returns:
1848 An object of the form:
1849
1850 { # An Operation resource, used to manage asynchronous API requests.
1851 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1852 "clientOperationId": "A String", # [Output Only] Reserved for future use.
1853 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1854 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1855 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1856 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1857 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1858 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1859 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1860 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
1861 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1862 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1863 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1864 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1865 {
1866 "message": "A String", # [Output Only] A human-readable description of the warning code.
1867 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1868 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1869 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1870 {
1871 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1872 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1873 },
1874 ],
1875 },
1876 ],
1877 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1878 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1879 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1880 "name": "A String", # [Output Only] Name of the resource.
1881 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1882 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1883 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1884 {
1885 "message": "A String", # [Output Only] An optional, human-readable error message.
1886 "code": "A String", # [Output Only] The error type identifier for this error.
1887 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1888 },
1889 ],
1890 },
1891 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1892 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001893 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001894 }</pre>
1895</div>
1896
1897<div class="method">
Craig Citroe633be12015-03-02 13:40:36 -08001898 <code class="details" id="stop">stop(project, zone, instance)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001899 <pre>Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Craig Citroe633be12015-03-02 13:40:36 -08001900
1901Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001902 project: string, Project ID for this request. (required)
1903 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001904 instance: string, Name of the instance resource to stop. (required)
Craig Citroe633be12015-03-02 13:40:36 -08001905
1906Returns:
1907 An object of the form:
1908
Takashi Matsuo06694102015-09-11 13:55:40 -07001909 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001910 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1911 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001912 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001913 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1914 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1915 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1916 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001917 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001918 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1919 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001920 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001921 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1922 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001923 "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 -08001924 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001925 "message": "A String", # [Output Only] A human-readable description of the warning code.
1926 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1927 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1928 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citroe633be12015-03-02 13:40:36 -08001929 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001930 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001931 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Craig Citroe633be12015-03-02 13:40:36 -08001932 },
1933 ],
1934 },
1935 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001936 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001937 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1938 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001939 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001940 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001941 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001942 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1943 {
1944 "message": "A String", # [Output Only] An optional, human-readable error message.
1945 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001946 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citroe633be12015-03-02 13:40:36 -08001947 },
1948 ],
1949 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001950 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001951 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001952 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -04001953 }</pre>
1954</div>
1955
1956</body></html>