blob: 4a6f91d5c0b95b44724b971ce70b463a53b52631 [file] [log] [blame]
Joe Gregorio37802c32013-08-06 12:24:05 -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_v1beta15.html">Compute Engine API</a> . <a href="compute_v1beta15.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</a></code></p>
79<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">A description of how to use this function</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
87 <code><a href="#attachDisk">attachDisk(project, zone, instance, body)</a></code></p>
88<p class="firstline">Attaches a disk resource to an instance.</p>
89<p class="toc_element">
90 <code><a href="#delete">delete(project, zone, instance)</a></code></p>
91<p class="firstline">Deletes the specified instance resource.</p>
92<p class="toc_element">
93 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</a></code></p>
94<p class="firstline">Deletes an access config from an instance's network interface.</p>
95<p class="toc_element">
96 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName)</a></code></p>
97<p class="firstline">Detaches a disk from an instance.</p>
98<p class="toc_element">
99 <code><a href="#get">get(project, zone, instance)</a></code></p>
100<p class="firstline">Returns the specified instance resource.</p>
101<p class="toc_element">
102 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance)</a></code></p>
103<p class="firstline">Returns the specified instance's serial port output.</p>
104<p class="toc_element">
105 <code><a href="#insert">insert(project, zone, body)</a></code></p>
106<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
107<p class="toc_element">
108 <code><a href="#list">list(project, zone, maxResults=None, pageToken=None, filter=None)</a></code></p>
109<p class="firstline">Retrieves the list of instance resources contained within the specified zone.</p>
110<p class="toc_element">
111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114 <code><a href="#reset">reset(project, zone, instance)</a></code></p>
115<p class="firstline">Performs a hard reset on the instance.</p>
116<p class="toc_element">
117 <code><a href="#setMetadata">setMetadata(project, zone, instance, body)</a></code></p>
118<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
119<p class="toc_element">
120 <code><a href="#setTags">setTags(project, zone, instance, body)</a></code></p>
121<p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
122<h3>Method Details</h3>
123<div class="method">
124 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body)</code>
125 <pre>Adds an access config to an instance's network interface.
126
127Args:
128 project: string, Project name. (required)
129 zone: string, Name of the zone scoping this request. (required)
130 instance: string, Instance name. (required)
131 networkInterface: string, Network interface name. (required)
132 body: object, The request body. (required)
133 The object takes the form of:
134
135{ # An access configuration attached to an instance's network interface.
136 "kind": "compute#accessConfig", # Type of the resource.
137 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
138 "name": "A String", # Name of this access configuration.
139 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
140}
141
142
143Returns:
144 An object of the form:
145
146 { # An operation resource, used to manage asynchronous API requests.
147 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
148 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
149 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
150 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
151 "zone": "A String", # URL of the zone where the operation resides (output only).
152 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
153 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
154 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
155 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
156 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
157 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
158 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
159 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
160 {
161 "message": "A String", # Optional human-readable details for this warning.
162 "code": "A String", # The warning type identifier for this warning.
163 "data": [ # Metadata for this warning in 'key: value' format.
164 {
165 "value": "A String", # A warning data value corresponding to the key.
166 "key": "A String", # A key for the warning data.
167 },
168 ],
169 },
170 ],
171 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
172 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
173 "kind": "compute#operation", # Type of the resource.
174 "name": "A String", # Name of the resource (output only).
175 "region": "A String", # URL of the region where the operation resides (output only).
176 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
177 "errors": [ # The array of errors encountered while processing this operation.
178 {
179 "message": "A String", # An optional, human-readable error message.
180 "code": "A String", # The error type identifier for this error.
181 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
182 },
183 ],
184 },
185 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
186 "selfLink": "A String", # Server defined URL for the resource (output only).
187 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
188 }</pre>
189</div>
190
191<div class="method">
192 <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code>
193 <pre>A description of how to use this function
194
195Args:
196 project: string, Name of the project scoping this request. (required)
197 maxResults: integer, Optional. Maximum count of results to be returned. Maximum and default value is 100.
198 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
199 filter: string, Optional. Filter expression for filtering listed resources.
200
201Returns:
202 An object of the form:
203
204 {
205 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
206 "items": { # A map of scoped instance lists.
207 "a_key": { # Name of the scope containing this set of instances.
208 "instances": [ # List of instances contained in this scope.
209 { # An instance resource.
210 "status": "A String", # Instance status. One of the following values: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only).
211 "kernel": "A String", # URL of the kernel resource to use when booting. In case of booting from persistent disk, this parameter is required. When booting from a disk image, it is optional, but may be provided to use a different kernel than the one associated with the image.
212 "kind": "compute#instance", # Type of the resource.
213 "canIpForward": True or False, # Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false.
214 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
215 "zone": "A String", # URL of the zone where the instance resides (output only).
216 "tags": { # A set of instance tags. # A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
217 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
218 "A String",
219 ],
220 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
221 },
222 "image": "A String", # An optional URL of the disk image resource to be installed on this instance; provided by the client when the instance is created. Alternatively to passing the image, the client may choose to boot from a persistent disk, by setting boot=true flag on one of the entries in disks[] collection.
223 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
224 { # An instance-attached disk resource.
225 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
226 "kind": "compute#attachedDisk", # Type of the resource.
227 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
228 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
229 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
230 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
231 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
232 },
233 ],
234 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.
235 "statusMessage": "A String", # An optional, human-readable explanation of the status (output only).
236 "machineType": "A String", # URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.
237 "serviceAccounts": [ # A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.
238 { # A service account.
239 "scopes": [ # The list of scopes to be made available for this service account.
240 "A String",
241 ],
242 "email": "A String", # Email address of the service account.
243 },
244 ],
245 "networkInterfaces": [ # Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
246 { # A network interface resource attached to an instance.
247 "accessConfigs": [ # Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
248 { # An access configuration attached to an instance's network interface.
249 "kind": "compute#accessConfig", # Type of the resource.
250 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
251 "name": "A String", # Name of this access configuration.
252 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
253 },
254 ],
255 "networkIP": "A String", # An optional IPV4 internal network address assigned to the instance for this network interface (output only).
256 "name": "A String", # Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only).
257 "network": "A String", # URL of the network resource attached to this interface.
258 },
259 ],
260 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
261 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
262 "selfLink": "A String", # Server defined URL for this resource (output only).
263 "metadata": { # A metadata key/value entry. # Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information.
264 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
265 {
266 "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.
267 "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.
268 },
269 ],
270 "kind": "compute#metadata", # Type of the resource.
271 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
272 },
273 },
274 ],
275 "warning": { # Informational warning which replaces the list of instances when the list is empty.
276 "message": "A String", # Optional human-readable details for this warning.
277 "code": "A String", # The warning type identifier for this warning.
278 "data": [ # Metadata for this warning in 'key: value' format.
279 {
280 "value": "A String", # A warning data value corresponding to the key.
281 "key": "A String", # A key for the warning data.
282 },
283 ],
284 },
285 },
286 },
287 "kind": "compute#instanceAggregatedList", # Type of resource.
288 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
289 "selfLink": "A String", # Server defined URL for this resource (output only).
290 }</pre>
291</div>
292
293<div class="method">
294 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
295 <pre>Retrieves the next page of results.
296
297Args:
298 previous_request: The request for the previous page. (required)
299 previous_response: The response from the request for the previous page. (required)
300
301Returns:
302 A request object that you can call 'execute()' on to request the next
303 page. Returns None if there are no more items in the collection.
304 </pre>
305</div>
306
307<div class="method">
308 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body)</code>
309 <pre>Attaches a disk resource to an instance.
310
311Args:
312 project: string, Project name. (required)
313 zone: string, Name of the zone scoping this request. (required)
314 instance: string, Instance name. (required)
315 body: object, The request body. (required)
316 The object takes the form of:
317
318{ # An instance-attached disk resource.
319 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
320 "kind": "compute#attachedDisk", # Type of the resource.
321 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
322 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
323 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
324 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
325 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
326 }
327
328
329Returns:
330 An object of the form:
331
332 { # An operation resource, used to manage asynchronous API requests.
333 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
334 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
335 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
336 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
337 "zone": "A String", # URL of the zone where the operation resides (output only).
338 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
339 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
340 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
341 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
342 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
343 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
344 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
345 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
346 {
347 "message": "A String", # Optional human-readable details for this warning.
348 "code": "A String", # The warning type identifier for this warning.
349 "data": [ # Metadata for this warning in 'key: value' format.
350 {
351 "value": "A String", # A warning data value corresponding to the key.
352 "key": "A String", # A key for the warning data.
353 },
354 ],
355 },
356 ],
357 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
358 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
359 "kind": "compute#operation", # Type of the resource.
360 "name": "A String", # Name of the resource (output only).
361 "region": "A String", # URL of the region where the operation resides (output only).
362 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
363 "errors": [ # The array of errors encountered while processing this operation.
364 {
365 "message": "A String", # An optional, human-readable error message.
366 "code": "A String", # The error type identifier for this error.
367 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
368 },
369 ],
370 },
371 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
372 "selfLink": "A String", # Server defined URL for the resource (output only).
373 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
374 }</pre>
375</div>
376
377<div class="method">
378 <code class="details" id="delete">delete(project, zone, instance)</code>
379 <pre>Deletes the specified instance resource.
380
381Args:
382 project: string, Name of the project scoping this request. (required)
383 zone: string, Name of the zone scoping this request. (required)
384 instance: string, Name of the instance resource to delete. (required)
385
386Returns:
387 An object of the form:
388
389 { # An operation resource, used to manage asynchronous API requests.
390 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
391 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
392 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
393 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
394 "zone": "A String", # URL of the zone where the operation resides (output only).
395 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
396 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
397 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
398 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
399 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
400 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
401 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
402 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
403 {
404 "message": "A String", # Optional human-readable details for this warning.
405 "code": "A String", # The warning type identifier for this warning.
406 "data": [ # Metadata for this warning in 'key: value' format.
407 {
408 "value": "A String", # A warning data value corresponding to the key.
409 "key": "A String", # A key for the warning data.
410 },
411 ],
412 },
413 ],
414 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
415 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
416 "kind": "compute#operation", # Type of the resource.
417 "name": "A String", # Name of the resource (output only).
418 "region": "A String", # URL of the region where the operation resides (output only).
419 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
420 "errors": [ # The array of errors encountered while processing this operation.
421 {
422 "message": "A String", # An optional, human-readable error message.
423 "code": "A String", # The error type identifier for this error.
424 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
425 },
426 ],
427 },
428 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
429 "selfLink": "A String", # Server defined URL for the resource (output only).
430 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
431 }</pre>
432</div>
433
434<div class="method">
435 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface)</code>
436 <pre>Deletes an access config from an instance's network interface.
437
438Args:
439 project: string, Project name. (required)
440 zone: string, Name of the zone scoping this request. (required)
441 instance: string, Instance name. (required)
442 accessConfig: string, Access config name. (required)
443 networkInterface: string, Network interface name. (required)
444
445Returns:
446 An object of the form:
447
448 { # An operation resource, used to manage asynchronous API requests.
449 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
450 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
451 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
452 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
453 "zone": "A String", # URL of the zone where the operation resides (output only).
454 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
455 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
456 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
457 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
458 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
459 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
460 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
461 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
462 {
463 "message": "A String", # Optional human-readable details for this warning.
464 "code": "A String", # The warning type identifier for this warning.
465 "data": [ # Metadata for this warning in 'key: value' format.
466 {
467 "value": "A String", # A warning data value corresponding to the key.
468 "key": "A String", # A key for the warning data.
469 },
470 ],
471 },
472 ],
473 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
474 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
475 "kind": "compute#operation", # Type of the resource.
476 "name": "A String", # Name of the resource (output only).
477 "region": "A String", # URL of the region where the operation resides (output only).
478 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
479 "errors": [ # The array of errors encountered while processing this operation.
480 {
481 "message": "A String", # An optional, human-readable error message.
482 "code": "A String", # The error type identifier for this error.
483 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
484 },
485 ],
486 },
487 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
488 "selfLink": "A String", # Server defined URL for the resource (output only).
489 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
490 }</pre>
491</div>
492
493<div class="method">
494 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName)</code>
495 <pre>Detaches a disk from an instance.
496
497Args:
498 project: string, Project name. (required)
499 zone: string, Name of the zone scoping this request. (required)
500 instance: string, Instance name. (required)
501 deviceName: string, Disk device name to detach. (required)
502
503Returns:
504 An object of the form:
505
506 { # An operation resource, used to manage asynchronous API requests.
507 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
508 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
509 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
510 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
511 "zone": "A String", # URL of the zone where the operation resides (output only).
512 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
513 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
514 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
515 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
516 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
517 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
518 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
519 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
520 {
521 "message": "A String", # Optional human-readable details for this warning.
522 "code": "A String", # The warning type identifier for this warning.
523 "data": [ # Metadata for this warning in 'key: value' format.
524 {
525 "value": "A String", # A warning data value corresponding to the key.
526 "key": "A String", # A key for the warning data.
527 },
528 ],
529 },
530 ],
531 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
532 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
533 "kind": "compute#operation", # Type of the resource.
534 "name": "A String", # Name of the resource (output only).
535 "region": "A String", # URL of the region where the operation resides (output only).
536 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
537 "errors": [ # The array of errors encountered while processing this operation.
538 {
539 "message": "A String", # An optional, human-readable error message.
540 "code": "A String", # The error type identifier for this error.
541 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
542 },
543 ],
544 },
545 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
546 "selfLink": "A String", # Server defined URL for the resource (output only).
547 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
548 }</pre>
549</div>
550
551<div class="method">
552 <code class="details" id="get">get(project, zone, instance)</code>
553 <pre>Returns the specified instance resource.
554
555Args:
556 project: string, Name of the project scoping this request. (required)
557 zone: string, Name of the zone scoping this request. (required)
558 instance: string, Name of the instance resource to return. (required)
559
560Returns:
561 An object of the form:
562
563 { # An instance resource.
564 "status": "A String", # Instance status. One of the following values: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only).
565 "kernel": "A String", # URL of the kernel resource to use when booting. In case of booting from persistent disk, this parameter is required. When booting from a disk image, it is optional, but may be provided to use a different kernel than the one associated with the image.
566 "kind": "compute#instance", # Type of the resource.
567 "canIpForward": True or False, # Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false.
568 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
569 "zone": "A String", # URL of the zone where the instance resides (output only).
570 "tags": { # A set of instance tags. # A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
571 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
572 "A String",
573 ],
574 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
575 },
576 "image": "A String", # An optional URL of the disk image resource to be installed on this instance; provided by the client when the instance is created. Alternatively to passing the image, the client may choose to boot from a persistent disk, by setting boot=true flag on one of the entries in disks[] collection.
577 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
578 { # An instance-attached disk resource.
579 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
580 "kind": "compute#attachedDisk", # Type of the resource.
581 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
582 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
583 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
584 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
585 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
586 },
587 ],
588 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.
589 "statusMessage": "A String", # An optional, human-readable explanation of the status (output only).
590 "machineType": "A String", # URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.
591 "serviceAccounts": [ # A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.
592 { # A service account.
593 "scopes": [ # The list of scopes to be made available for this service account.
594 "A String",
595 ],
596 "email": "A String", # Email address of the service account.
597 },
598 ],
599 "networkInterfaces": [ # Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
600 { # A network interface resource attached to an instance.
601 "accessConfigs": [ # Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
602 { # An access configuration attached to an instance's network interface.
603 "kind": "compute#accessConfig", # Type of the resource.
604 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
605 "name": "A String", # Name of this access configuration.
606 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
607 },
608 ],
609 "networkIP": "A String", # An optional IPV4 internal network address assigned to the instance for this network interface (output only).
610 "name": "A String", # Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only).
611 "network": "A String", # URL of the network resource attached to this interface.
612 },
613 ],
614 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
615 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
616 "selfLink": "A String", # Server defined URL for this resource (output only).
617 "metadata": { # A metadata key/value entry. # Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information.
618 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
619 {
620 "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.
621 "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.
622 },
623 ],
624 "kind": "compute#metadata", # Type of the resource.
625 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
626 },
627 }</pre>
628</div>
629
630<div class="method">
631 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance)</code>
632 <pre>Returns the specified instance's serial port output.
633
634Args:
635 project: string, Name of the project scoping this request. (required)
636 zone: string, Name of the zone scoping this request. (required)
637 instance: string, Name of the instance scoping this request. (required)
638
639Returns:
640 An object of the form:
641
642 { # An instance serial console output.
643 "kind": "compute#serialPortOutput", # Type of the resource.
644 "selfLink": "A String", # Server defined URL for the resource (output only).
645 "contents": "A String", # The contents of the console output.
646 }</pre>
647</div>
648
649<div class="method">
650 <code class="details" id="insert">insert(project, zone, body)</code>
651 <pre>Creates an instance resource in the specified project using the data included in the request.
652
653Args:
654 project: string, Name of the project scoping this request. (required)
655 zone: string, Name of the zone scoping this request. (required)
656 body: object, The request body. (required)
657 The object takes the form of:
658
659{ # An instance resource.
660 "status": "A String", # Instance status. One of the following values: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only).
661 "kernel": "A String", # URL of the kernel resource to use when booting. In case of booting from persistent disk, this parameter is required. When booting from a disk image, it is optional, but may be provided to use a different kernel than the one associated with the image.
662 "kind": "compute#instance", # Type of the resource.
663 "canIpForward": True or False, # Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false.
664 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
665 "zone": "A String", # URL of the zone where the instance resides (output only).
666 "tags": { # A set of instance tags. # A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
667 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
668 "A String",
669 ],
670 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
671 },
672 "image": "A String", # An optional URL of the disk image resource to be installed on this instance; provided by the client when the instance is created. Alternatively to passing the image, the client may choose to boot from a persistent disk, by setting boot=true flag on one of the entries in disks[] collection.
673 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
674 { # An instance-attached disk resource.
675 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
676 "kind": "compute#attachedDisk", # Type of the resource.
677 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
678 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
679 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
680 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
681 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
682 },
683 ],
684 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.
685 "statusMessage": "A String", # An optional, human-readable explanation of the status (output only).
686 "machineType": "A String", # URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.
687 "serviceAccounts": [ # A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.
688 { # A service account.
689 "scopes": [ # The list of scopes to be made available for this service account.
690 "A String",
691 ],
692 "email": "A String", # Email address of the service account.
693 },
694 ],
695 "networkInterfaces": [ # Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
696 { # A network interface resource attached to an instance.
697 "accessConfigs": [ # Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
698 { # An access configuration attached to an instance's network interface.
699 "kind": "compute#accessConfig", # Type of the resource.
700 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
701 "name": "A String", # Name of this access configuration.
702 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
703 },
704 ],
705 "networkIP": "A String", # An optional IPV4 internal network address assigned to the instance for this network interface (output only).
706 "name": "A String", # Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only).
707 "network": "A String", # URL of the network resource attached to this interface.
708 },
709 ],
710 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
711 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
712 "selfLink": "A String", # Server defined URL for this resource (output only).
713 "metadata": { # A metadata key/value entry. # Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information.
714 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
715 {
716 "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.
717 "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.
718 },
719 ],
720 "kind": "compute#metadata", # Type of the resource.
721 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
722 },
723}
724
725
726Returns:
727 An object of the form:
728
729 { # An operation resource, used to manage asynchronous API requests.
730 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
731 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
732 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
733 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
734 "zone": "A String", # URL of the zone where the operation resides (output only).
735 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
736 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
737 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
738 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
739 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
740 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
741 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
742 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
743 {
744 "message": "A String", # Optional human-readable details for this warning.
745 "code": "A String", # The warning type identifier for this warning.
746 "data": [ # Metadata for this warning in 'key: value' format.
747 {
748 "value": "A String", # A warning data value corresponding to the key.
749 "key": "A String", # A key for the warning data.
750 },
751 ],
752 },
753 ],
754 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
755 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
756 "kind": "compute#operation", # Type of the resource.
757 "name": "A String", # Name of the resource (output only).
758 "region": "A String", # URL of the region where the operation resides (output only).
759 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
760 "errors": [ # The array of errors encountered while processing this operation.
761 {
762 "message": "A String", # An optional, human-readable error message.
763 "code": "A String", # The error type identifier for this error.
764 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
765 },
766 ],
767 },
768 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
769 "selfLink": "A String", # Server defined URL for the resource (output only).
770 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
771 }</pre>
772</div>
773
774<div class="method">
775 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
776 <pre>Retrieves the list of instance resources contained within the specified zone.
777
778Args:
779 project: string, Name of the project scoping this request. (required)
780 zone: string, Name of the zone scoping this request. (required)
781 maxResults: integer, Optional. Maximum count of results to be returned. Maximum and default value is 100.
782 pageToken: string, Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.
783 filter: string, Optional. Filter expression for filtering listed resources.
784
785Returns:
786 An object of the form:
787
788 { # Contains a list of instance resources.
789 "nextPageToken": "A String", # A token used to continue a truncated list request (output only).
790 "items": [ # A list of instance resources.
791 { # An instance resource.
792 "status": "A String", # Instance status. One of the following values: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only).
793 "kernel": "A String", # URL of the kernel resource to use when booting. In case of booting from persistent disk, this parameter is required. When booting from a disk image, it is optional, but may be provided to use a different kernel than the one associated with the image.
794 "kind": "compute#instance", # Type of the resource.
795 "canIpForward": True or False, # Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false.
796 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
797 "zone": "A String", # URL of the zone where the instance resides (output only).
798 "tags": { # A set of instance tags. # A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035.
799 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
800 "A String",
801 ],
802 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
803 },
804 "image": "A String", # An optional URL of the disk image resource to be installed on this instance; provided by the client when the instance is created. Alternatively to passing the image, the client may choose to boot from a persistent disk, by setting boot=true flag on one of the entries in disks[] collection.
805 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
806 { # An instance-attached disk resource.
807 "deviceName": "A String", # Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system.
808 "kind": "compute#attachedDisk", # Type of the resource.
809 "index": 42, # A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).
810 "boot": True or False, # Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
811 "source": "A String", # Persistent disk only; the URL of the persistent disk resource.
812 "mode": "A String", # The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY".
813 "type": "A String", # Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent disks must be created before you can specify them here.
814 },
815 ],
816 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.
817 "statusMessage": "A String", # An optional, human-readable explanation of the status (output only).
818 "machineType": "A String", # URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.
819 "serviceAccounts": [ # A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.
820 { # A service account.
821 "scopes": [ # The list of scopes to be made available for this service account.
822 "A String",
823 ],
824 "email": "A String", # Email address of the service account.
825 },
826 ],
827 "networkInterfaces": [ # Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
828 { # A network interface resource attached to an instance.
829 "accessConfigs": [ # Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.
830 { # An access configuration attached to an instance's network interface.
831 "kind": "compute#accessConfig", # Type of the resource.
832 "type": "ONE_TO_ONE_NAT", # Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures port-for-port NAT to the internet.
833 "name": "A String", # Name of this access configuration.
834 "natIP": "A String", # An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool.
835 },
836 ],
837 "networkIP": "A String", # An optional IPV4 internal network address assigned to the instance for this network interface (output only).
838 "name": "A String", # Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only).
839 "network": "A String", # URL of the network resource attached to this interface.
840 },
841 ],
842 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
843 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
844 "selfLink": "A String", # Server defined URL for this resource (output only).
845 "metadata": { # A metadata key/value entry. # Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information.
846 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
847 {
848 "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.
849 "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.
850 },
851 ],
852 "kind": "compute#metadata", # Type of the resource.
853 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
854 },
855 },
856 ],
857 "kind": "compute#instanceList", # Type of resource.
858 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
859 "selfLink": "A String", # Server defined URL for this resource (output only).
860 }</pre>
861</div>
862
863<div class="method">
864 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
865 <pre>Retrieves the next page of results.
866
867Args:
868 previous_request: The request for the previous page. (required)
869 previous_response: The response from the request for the previous page. (required)
870
871Returns:
872 A request object that you can call 'execute()' on to request the next
873 page. Returns None if there are no more items in the collection.
874 </pre>
875</div>
876
877<div class="method">
878 <code class="details" id="reset">reset(project, zone, instance)</code>
879 <pre>Performs a hard reset on the instance.
880
881Args:
882 project: string, Name of the project scoping this request. (required)
883 zone: string, Name of the zone scoping this request. (required)
884 instance: string, Name of the instance scoping this request. (required)
885
886Returns:
887 An object of the form:
888
889 { # An operation resource, used to manage asynchronous API requests.
890 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
891 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
892 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
893 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
894 "zone": "A String", # URL of the zone where the operation resides (output only).
895 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
896 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
897 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
898 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
899 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
900 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
901 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
902 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
903 {
904 "message": "A String", # Optional human-readable details for this warning.
905 "code": "A String", # The warning type identifier for this warning.
906 "data": [ # Metadata for this warning in 'key: value' format.
907 {
908 "value": "A String", # A warning data value corresponding to the key.
909 "key": "A String", # A key for the warning data.
910 },
911 ],
912 },
913 ],
914 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
915 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
916 "kind": "compute#operation", # Type of the resource.
917 "name": "A String", # Name of the resource (output only).
918 "region": "A String", # URL of the region where the operation resides (output only).
919 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
920 "errors": [ # The array of errors encountered while processing this operation.
921 {
922 "message": "A String", # An optional, human-readable error message.
923 "code": "A String", # The error type identifier for this error.
924 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
925 },
926 ],
927 },
928 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
929 "selfLink": "A String", # Server defined URL for the resource (output only).
930 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
931 }</pre>
932</div>
933
934<div class="method">
935 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body)</code>
936 <pre>Sets metadata for the specified instance to the data included in the request.
937
938Args:
939 project: string, Name of the project scoping this request. (required)
940 zone: string, Name of the zone scoping this request. (required)
941 instance: string, Name of the instance scoping this request. (required)
942 body: object, The request body. (required)
943 The object takes the form of:
944
945{ # A metadata key/value entry.
946 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
947 {
948 "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.
949 "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.
950 },
951 ],
952 "kind": "compute#metadata", # Type of the resource.
953 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
954}
955
956
957Returns:
958 An object of the form:
959
960 { # An operation resource, used to manage asynchronous API requests.
961 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
962 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
963 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
964 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
965 "zone": "A String", # URL of the zone where the operation resides (output only).
966 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
967 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
968 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
969 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
970 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
971 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
972 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
973 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
974 {
975 "message": "A String", # Optional human-readable details for this warning.
976 "code": "A String", # The warning type identifier for this warning.
977 "data": [ # Metadata for this warning in 'key: value' format.
978 {
979 "value": "A String", # A warning data value corresponding to the key.
980 "key": "A String", # A key for the warning data.
981 },
982 ],
983 },
984 ],
985 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
986 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
987 "kind": "compute#operation", # Type of the resource.
988 "name": "A String", # Name of the resource (output only).
989 "region": "A String", # URL of the region where the operation resides (output only).
990 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
991 "errors": [ # The array of errors encountered while processing this operation.
992 {
993 "message": "A String", # An optional, human-readable error message.
994 "code": "A String", # The error type identifier for this error.
995 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
996 },
997 ],
998 },
999 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
1000 "selfLink": "A String", # Server defined URL for the resource (output only).
1001 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
1002 }</pre>
1003</div>
1004
1005<div class="method">
1006 <code class="details" id="setTags">setTags(project, zone, instance, body)</code>
1007 <pre>Sets tags for the specified instance to the data included in the request.
1008
1009Args:
1010 project: string, Name of the project scoping this request. (required)
1011 zone: string, Name of the zone scoping this request. (required)
1012 instance: string, Name of the instance scoping this request. (required)
1013 body: object, The request body. (required)
1014 The object takes the form of:
1015
1016{ # A set of instance tags.
1017 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1018 "A String",
1019 ],
1020 "fingerprint": "A String", # Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.
1021 }
1022
1023
1024Returns:
1025 An object of the form:
1026
1027 { # An operation resource, used to manage asynchronous API requests.
1028 "targetId": "A String", # Unique target id which identifies a particular incarnation of the target (output only).
1029 "clientOperationId": "A String", # An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only).
1030 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
1031 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
1032 "zone": "A String", # URL of the zone where the operation resides (output only).
1033 "operationType": "A String", # Type of the operation. Examples include "insert", "update", and "delete" (output only).
1034 "httpErrorMessage": "A String", # If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only).
1035 "progress": 42, # An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).
1036 "httpErrorStatusCode": 42, # If operation fails, the HTTP error status code returned, e.g. 404. (output only).
1037 "statusMessage": "A String", # An optional textual description of the current status of the operation (output only).
1038 "status": "A String", # Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE" (output only).
1039 "insertTime": "A String", # The time that this operation was requested. This is in RFC 3339 format (output only).
1040 "warnings": [ # If warning messages generated during processing of this operation, this field will be populated (output only).
1041 {
1042 "message": "A String", # Optional human-readable details for this warning.
1043 "code": "A String", # The warning type identifier for this warning.
1044 "data": [ # Metadata for this warning in 'key: value' format.
1045 {
1046 "value": "A String", # A warning data value corresponding to the key.
1047 "key": "A String", # A key for the warning data.
1048 },
1049 ],
1050 },
1051 ],
1052 "user": "A String", # User who requested the operation, for example "user@example.com" (output only).
1053 "startTime": "A String", # The time that this operation was started by the server. This is in RFC 3339 format (output only).
1054 "kind": "compute#operation", # Type of the resource.
1055 "name": "A String", # Name of the resource (output only).
1056 "region": "A String", # URL of the region where the operation resides (output only).
1057 "error": { # If errors occurred during processing of this operation, this field will be populated (output only).
1058 "errors": [ # The array of errors encountered while processing this operation.
1059 {
1060 "message": "A String", # An optional, human-readable error message.
1061 "code": "A String", # The error type identifier for this error.
1062 "location": "A String", # Indicates the field in the request which caused the error. This property is optional.
1063 },
1064 ],
1065 },
1066 "endTime": "A String", # The time that this operation was completed. This is in RFC 3339 format (output only).
1067 "selfLink": "A String", # Server defined URL for the resource (output only).
1068 "targetLink": "A String", # URL of the resource the operation is mutating (output only).
1069 }</pre>
1070</div>
1071
1072</body></html>