blob: 82294aeb1babf363d668b1544b3a2d1b56eb854c [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<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, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<p class="firstline">Retrieves aggregated list of instances.</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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040087 <code><a href="#attachDisk">attachDisk(project, zone, instance, body, forceAttach=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070088<p class="firstline">Attaches a Disk resource to an instance.</p>
89<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040090 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
92<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Deletes an access config from an instance's network interface.</p>
95<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040096 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<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. Get a list of available instances by making a list() request.</p>
101<p class="toc_element">
102 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
103<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
104<p class="toc_element">
105 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</a></code></p>
106<p class="firstline">Returns the specified instance's serial port output.</p>
107<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400108 <code><a href="#insert">insert(project, zone, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
110<p class="toc_element">
111 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
112<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
113<p class="toc_element">
114 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
115<p class="firstline">Retrieves the next page of results.</p>
116<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400117 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700118<p class="firstline">Performs a hard reset on the instance.</p>
119<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400120 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700121<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
122<p class="toc_element">
123 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body)</a></code></p>
124<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
125<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400126 <code><a href="#setLabels">setLabels(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700127<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling or Tagging Resources documentation.</p>
128<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400129 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body, requestId=None)</a></code></p>
130<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
131<p class="toc_element">
132 <code><a href="#setMachineType">setMachineType(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
134<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400135 <code><a href="#setMetadata">setMetadata(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700136<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
137<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400138 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body, requestId=None)</a></code></p>
139<p class="firstline">Changes the minimum cpu/platform that this instance should be started as. This is called on a stopped instance.</p>
140<p class="toc_element">
141 <code><a href="#setScheduling">setScheduling(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142<p class="firstline">Sets an instance's scheduling options.</p>
143<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400144 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body, requestId=None)</a></code></p>
145<p class="firstline">Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700146<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400147 <code><a href="#setTags">setTags(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700148<p class="firstline">Sets tags for the specified instance to the data included in the request.</p>
149<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400150 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
151<p class="firstline">Simulates a maintenance event on the instance.</p>
152<p class="toc_element">
153 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154<p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
155<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400156 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157<p class="firstline">Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.</p>
158<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400159 <code><a href="#stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160<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>
161<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400162 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700163<p class="firstline">This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.</p>
164<p class="toc_element">
165 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
166<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
167<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400168 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169<p class="firstline">Updates the specified access config from an instance's network interface with the data included in the request.</p>
170<h3>Method Details</h3>
171<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400172 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700173 <pre>Adds an access config to an instance's network interface.
174
175Args:
176 project: string, Project ID for this request. (required)
177 zone: string, The name of the zone for this request. (required)
178 instance: string, The instance name for this request. (required)
179 networkInterface: string, The name of the network interface to add to this instance. (required)
180 body: object, The request body. (required)
181 The object takes the form of:
182
183{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
184 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
185 "name": "A String", # Name of this access configuration.
186 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400187 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
188 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700189 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400190 "setPublicPtr": True or False, # Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700191 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400192 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700193}
194
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400195 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700196
197Returns:
198 An object of the form:
199
200 { # An Operation resource, used to manage asynchronous API requests.
201 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
202 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400203 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700204 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
205 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
206 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
207 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
208 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
209 "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.
210 "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.
211 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
212 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
213 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
214 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
215 {
216 "message": "A String", # [Output Only] A human-readable description of the warning code.
217 "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.
218 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
219 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
220 {
221 "value": "A String", # [Output Only] A warning data value corresponding to the key.
222 "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).
223 },
224 ],
225 },
226 ],
227 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
228 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
229 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
230 "name": "A String", # [Output Only] Name of the resource.
231 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
232 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
233 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
234 {
235 "message": "A String", # [Output Only] An optional, human-readable error message.
236 "code": "A String", # [Output Only] The error type identifier for this error.
237 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
238 },
239 ],
240 },
241 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
242 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800243 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700244 }</pre>
245</div>
246
247<div class="method">
248 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
249 <pre>Retrieves aggregated list of instances.
250
251Args:
252 project: string, Project ID for this request. (required)
253 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
254
255You 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.
256
257Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400258 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. Acceptable values are 0 to 500, inclusive. (Default: 500)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700259 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.
260 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.
261
262The 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.
263
264For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
265
266You 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.
267
268To 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.
269
270Returns:
271 An object of the form:
272
273 {
274 "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.
275 "items": { # [Output Only] A map of scoped instance lists.
276 "a_key": { # [Output Only] Name of the scope containing this set of instances.
277 "instances": [ # [Output Only] List of instances contained in this scope.
278 { # An Instance resource.
279 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400280 "guestAccelerators": [
281 { # A specification of the type and number of accelerator cards attached to the instance.
282 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
283 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
284 },
285 ],
286 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700287 "a_key": "A String",
288 },
289 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
290 "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.
291 "preemptible": True or False, # Whether the instance is preemptible.
292 "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.
293 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400294 "minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform.
295 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700296 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400297 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700298 { # A service account.
299 "scopes": [ # The list of scopes to be made available for this service account.
300 "A String",
301 ],
302 "email": "A String", # Email address of the service account.
303 },
304 ],
305 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
306 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
307 "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.
308 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400309 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700310 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
311 { # An alias IP range attached to an instance's network interface.
312 "subnetworkRangeName": "A String", # Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
313 "ipCidrRange": "A String", # The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
314 },
315 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400316 "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
317 #
318 # This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.
319 #
320 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
321 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
322 # - projects/project/global/networks/network
323 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700324 "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.
325 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
326 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
327 "name": "A String", # Name of this access configuration.
328 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400329 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
330 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700331 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400332 "setPublicPtr": True or False, # Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700333 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400334 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700335 },
336 ],
337 "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.
338 "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:
339 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
340 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400341 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700342 },
343 ],
344 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
345 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
346 #
347 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
348 #
349 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
350 #
351 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
352 #
353 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
354 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
355 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
356 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
357 #
358 # The key must meet the following requirements before you can provide it to Compute Engine:
359 # - The key is wrapped using a RSA public key certificate provided by Google.
360 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
361 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
362 },
363 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
364 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
365 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
366 {
367 "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.
368 "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.
369 },
370 ],
371 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
372 "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.
373 },
374 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
375 "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.
376 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
377 "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.
378 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
379 "A String",
380 ],
381 "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.
382 #
383 # To see the latest fingerprint, make get() request to the instance.
384 },
385 "labelFingerprint": "A String", # 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.
386 #
387 # To see the latest fingerprint, make get() request to the instance.
388 "host": "A String", # Full or partial URL of the host resource that the instance should be placed on, in the format: zones/zone/hosts/host.
389 #
390 # Optional, Private Host (physical machine) that the instance will be placed on when it's created. The instance is guaranteed to be placed on the same machine as other instances with the same private host.
391 #
392 # The request will be rejected if the private host has run out of resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400393 "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:
394 #
395 # zones/us-central1-f/machineTypes/n1-standard-1
396 #
397 # 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):
398 #
399 # zones/zone/machineTypes/custom-CPUS-MEMORY
400 #
401 # For example: zones/us-central1-f/machineTypes/custom-4-5120
402 #
403 # For a full list of restrictions, read the Specifications for custom machine types.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700404 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
405 "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.
406 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
407 { # An instance-attached disk resource.
408 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
409 #
410 # 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.
411 #
412 # 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.
413 #
414 # 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.
415 #
416 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
417 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
418 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
419 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
420 #
421 # The key must meet the following requirements before you can provide it to Compute Engine:
422 # - The key is wrapped using a RSA public key certificate provided by Google.
423 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
424 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
425 },
426 "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.
427 #
428 # 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.
429 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
430 "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.
431 #
432 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
433 #
434 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
435 "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.
436 #
437 # 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.
438 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
439 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
440 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
441 #
442 # The key must meet the following requirements before you can provide it to Compute Engine:
443 # - The key is wrapped using a RSA public key certificate provided by Google.
444 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
445 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
446 },
447 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
448 "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:
449 #
450 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
451 #
452 # 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:
453 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
454 # - projects/project/zones/zone/diskTypes/diskType
455 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
456 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800457 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700458 #
459 # 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:
460 #
461 # projects/debian-cloud/global/images/family/debian-8
462 #
463 # Alternatively, use a specific version of a public operating system image:
464 #
465 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
466 #
467 # To create a disk with a private image that you created, specify the image name in the following format:
468 #
469 # global/images/my-private-image
470 #
471 # 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:
472 #
473 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800474 #
475 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700476 "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
477 },
478 "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).
479 "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.
480 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800481 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
482 "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.
483 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700484 "licenses": [ # [Output Only] Any valid publicly visible licenses.
485 "A String",
486 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700487 "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 -0800488 "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.
489 #
490 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
491 #
492 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700493 },
494 ],
495 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
496 },
497 ],
498 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
499 "message": "A String", # [Output Only] A human-readable description of the warning code.
500 "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.
501 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
502 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
503 {
504 "value": "A String", # [Output Only] A warning data value corresponding to the key.
505 "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).
506 },
507 ],
508 },
509 },
510 },
511 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
512 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
513 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
514 }</pre>
515</div>
516
517<div class="method">
518 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
519 <pre>Retrieves the next page of results.
520
521Args:
522 previous_request: The request for the previous page. (required)
523 previous_response: The response from the request for the previous page. (required)
524
525Returns:
526 A request object that you can call 'execute()' on to request the next
527 page. Returns None if there are no more items in the collection.
528 </pre>
529</div>
530
531<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400532 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body, forceAttach=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700533 <pre>Attaches a Disk resource to an instance.
534
535Args:
536 project: string, Project ID for this request. (required)
537 zone: string, The name of the zone for this request. (required)
538 instance: string, The instance name for this request. (required)
539 body: object, The request body. (required)
540 The object takes the form of:
541
542{ # An instance-attached disk resource.
543 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
544 #
545 # 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.
546 #
547 # 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.
548 #
549 # 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.
550 #
551 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
552 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
553 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
554 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
555 #
556 # The key must meet the following requirements before you can provide it to Compute Engine:
557 # - The key is wrapped using a RSA public key certificate provided by Google.
558 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
559 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
560 },
561 "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.
562 #
563 # 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.
564 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
565 "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.
566 #
567 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
568 #
569 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
570 "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.
571 #
572 # 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.
573 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
574 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
575 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
576 #
577 # The key must meet the following requirements before you can provide it to Compute Engine:
578 # - The key is wrapped using a RSA public key certificate provided by Google.
579 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
580 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
581 },
582 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
583 "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:
584 #
585 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
586 #
587 # 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:
588 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
589 # - projects/project/zones/zone/diskTypes/diskType
590 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
591 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800592 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700593 #
594 # 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:
595 #
596 # projects/debian-cloud/global/images/family/debian-8
597 #
598 # Alternatively, use a specific version of a public operating system image:
599 #
600 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
601 #
602 # To create a disk with a private image that you created, specify the image name in the following format:
603 #
604 # global/images/my-private-image
605 #
606 # 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:
607 #
608 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800609 #
610 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700611 "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
612 },
613 "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).
614 "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.
615 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800616 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
617 "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.
618 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700619 "licenses": [ # [Output Only] Any valid publicly visible licenses.
620 "A String",
621 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700622 "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 -0800623 "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.
624 #
625 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
626 #
627 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700628}
629
630 forceAttach: boolean, Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400631 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700632
633Returns:
634 An object of the form:
635
636 { # An Operation resource, used to manage asynchronous API requests.
637 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
638 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400639 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700640 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
641 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
642 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
643 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
644 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
645 "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.
646 "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.
647 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
648 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
649 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
650 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
651 {
652 "message": "A String", # [Output Only] A human-readable description of the warning code.
653 "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.
654 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
655 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
656 {
657 "value": "A String", # [Output Only] A warning data value corresponding to the key.
658 "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).
659 },
660 ],
661 },
662 ],
663 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
664 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
665 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
666 "name": "A String", # [Output Only] Name of the resource.
667 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
668 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
669 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
670 {
671 "message": "A String", # [Output Only] An optional, human-readable error message.
672 "code": "A String", # [Output Only] The error type identifier for this error.
673 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
674 },
675 ],
676 },
677 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
678 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800679 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700680 }</pre>
681</div>
682
683<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400684 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700685 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
686
687Args:
688 project: string, Project ID for this request. (required)
689 zone: string, The name of the zone for this request. (required)
690 instance: string, Name of the instance resource to delete. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400691 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700692
693Returns:
694 An object of the form:
695
696 { # An Operation resource, used to manage asynchronous API requests.
697 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
698 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400699 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700700 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
701 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
702 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
703 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
704 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
705 "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.
706 "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.
707 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
708 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
709 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
710 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
711 {
712 "message": "A String", # [Output Only] A human-readable description of the warning code.
713 "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.
714 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
715 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
716 {
717 "value": "A String", # [Output Only] A warning data value corresponding to the key.
718 "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).
719 },
720 ],
721 },
722 ],
723 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
724 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
725 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
726 "name": "A String", # [Output Only] Name of the resource.
727 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
728 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
729 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
730 {
731 "message": "A String", # [Output Only] An optional, human-readable error message.
732 "code": "A String", # [Output Only] The error type identifier for this error.
733 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
734 },
735 ],
736 },
737 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
738 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800739 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700740 }</pre>
741</div>
742
743<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400744 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700745 <pre>Deletes an access config from an instance's network interface.
746
747Args:
748 project: string, Project ID for this request. (required)
749 zone: string, The name of the zone for this request. (required)
750 instance: string, The instance name for this request. (required)
751 accessConfig: string, The name of the access config to delete. (required)
752 networkInterface: string, The name of the network interface. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400753 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700754
755Returns:
756 An object of the form:
757
758 { # An Operation resource, used to manage asynchronous API requests.
759 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
760 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400761 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700762 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
763 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
764 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
765 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
766 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
767 "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.
768 "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.
769 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
770 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
771 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
772 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
773 {
774 "message": "A String", # [Output Only] A human-readable description of the warning code.
775 "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.
776 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
777 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
778 {
779 "value": "A String", # [Output Only] A warning data value corresponding to the key.
780 "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).
781 },
782 ],
783 },
784 ],
785 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
786 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
787 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
788 "name": "A String", # [Output Only] Name of the resource.
789 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
790 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
791 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
792 {
793 "message": "A String", # [Output Only] An optional, human-readable error message.
794 "code": "A String", # [Output Only] The error type identifier for this error.
795 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
796 },
797 ],
798 },
799 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
800 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800801 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700802 }</pre>
803</div>
804
805<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400806 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700807 <pre>Detaches a disk from an instance.
808
809Args:
810 project: string, Project ID for this request. (required)
811 zone: string, The name of the zone for this request. (required)
812 instance: string, Instance name. (required)
813 deviceName: string, Disk device name to detach. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400814 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700815
816Returns:
817 An object of the form:
818
819 { # An Operation resource, used to manage asynchronous API requests.
820 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
821 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400822 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700823 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
824 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
825 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
826 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
827 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
828 "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.
829 "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.
830 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
831 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
832 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
833 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
834 {
835 "message": "A String", # [Output Only] A human-readable description of the warning code.
836 "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.
837 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
838 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
839 {
840 "value": "A String", # [Output Only] A warning data value corresponding to the key.
841 "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).
842 },
843 ],
844 },
845 ],
846 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
847 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
848 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
849 "name": "A String", # [Output Only] Name of the resource.
850 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
851 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
852 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
853 {
854 "message": "A String", # [Output Only] An optional, human-readable error message.
855 "code": "A String", # [Output Only] The error type identifier for this error.
856 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
857 },
858 ],
859 },
860 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
861 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800862 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700863 }</pre>
864</div>
865
866<div class="method">
867 <code class="details" id="get">get(project, zone, instance)</code>
868 <pre>Returns the specified Instance resource. Get a list of available instances by making a list() request.
869
870Args:
871 project: string, Project ID for this request. (required)
872 zone: string, The name of the zone for this request. (required)
873 instance: string, Name of the instance resource to return. (required)
874
875Returns:
876 An object of the form:
877
878 { # An Instance resource.
879 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400880 "guestAccelerators": [
881 { # A specification of the type and number of accelerator cards attached to the instance.
882 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
883 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
884 },
885 ],
886 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700887 "a_key": "A String",
888 },
889 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
890 "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.
891 "preemptible": True or False, # Whether the instance is preemptible.
892 "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.
893 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400894 "minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform.
895 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700896 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400897 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700898 { # A service account.
899 "scopes": [ # The list of scopes to be made available for this service account.
900 "A String",
901 ],
902 "email": "A String", # Email address of the service account.
903 },
904 ],
905 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
906 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
907 "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.
908 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400909 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700910 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
911 { # An alias IP range attached to an instance's network interface.
912 "subnetworkRangeName": "A String", # Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
913 "ipCidrRange": "A String", # The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
914 },
915 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400916 "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
917 #
918 # This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.
919 #
920 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
921 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
922 # - projects/project/global/networks/network
923 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700924 "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.
925 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
926 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
927 "name": "A String", # Name of this access configuration.
928 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400929 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
930 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700931 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400932 "setPublicPtr": True or False, # Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700933 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400934 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700935 },
936 ],
937 "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.
938 "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:
939 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
940 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400941 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700942 },
943 ],
944 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
945 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
946 #
947 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
948 #
949 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
950 #
951 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
952 #
953 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
954 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
955 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
956 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
957 #
958 # The key must meet the following requirements before you can provide it to Compute Engine:
959 # - The key is wrapped using a RSA public key certificate provided by Google.
960 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
961 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
962 },
963 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
964 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
965 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
966 {
967 "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.
968 "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.
969 },
970 ],
971 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
972 "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.
973 },
974 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
975 "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.
976 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
977 "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.
978 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
979 "A String",
980 ],
981 "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.
982 #
983 # To see the latest fingerprint, make get() request to the instance.
984 },
985 "labelFingerprint": "A String", # 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.
986 #
987 # To see the latest fingerprint, make get() request to the instance.
988 "host": "A String", # Full or partial URL of the host resource that the instance should be placed on, in the format: zones/zone/hosts/host.
989 #
990 # Optional, Private Host (physical machine) that the instance will be placed on when it's created. The instance is guaranteed to be placed on the same machine as other instances with the same private host.
991 #
992 # The request will be rejected if the private host has run out of resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400993 "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:
994 #
995 # zones/us-central1-f/machineTypes/n1-standard-1
996 #
997 # 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):
998 #
999 # zones/zone/machineTypes/custom-CPUS-MEMORY
1000 #
1001 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1002 #
1003 # For a full list of restrictions, read the Specifications for custom machine types.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001004 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
1005 "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.
1006 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1007 { # An instance-attached disk resource.
1008 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1009 #
1010 # 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.
1011 #
1012 # 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.
1013 #
1014 # 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.
1015 #
1016 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1017 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1018 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1019 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1020 #
1021 # The key must meet the following requirements before you can provide it to Compute Engine:
1022 # - The key is wrapped using a RSA public key certificate provided by Google.
1023 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
1024 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1025 },
1026 "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.
1027 #
1028 # 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.
1029 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1030 "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.
1031 #
1032 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1033 #
1034 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1035 "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.
1036 #
1037 # 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.
1038 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1039 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1040 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1041 #
1042 # The key must meet the following requirements before you can provide it to Compute Engine:
1043 # - The key is wrapped using a RSA public key certificate provided by Google.
1044 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
1045 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1046 },
1047 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
1048 "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:
1049 #
1050 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1051 #
1052 # 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:
1053 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1054 # - projects/project/zones/zone/diskTypes/diskType
1055 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
1056 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001057 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001058 #
1059 # 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:
1060 #
1061 # projects/debian-cloud/global/images/family/debian-8
1062 #
1063 # Alternatively, use a specific version of a public operating system image:
1064 #
1065 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
1066 #
1067 # To create a disk with a private image that you created, specify the image name in the following format:
1068 #
1069 # global/images/my-private-image
1070 #
1071 # 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:
1072 #
1073 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001074 #
1075 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001076 "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
1077 },
1078 "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).
1079 "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.
1080 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001081 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
1082 "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.
1083 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001084 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1085 "A String",
1086 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001087 "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 -08001088 "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.
1089 #
1090 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1091 #
1092 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001093 },
1094 ],
1095 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1096 }</pre>
1097</div>
1098
1099<div class="method">
1100 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
1101 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1102
1103Args:
1104 project: string, Project ID for this request. (required)
1105 zone: string, The name of the zone for this request. (required)
1106 resource: string, Name of the resource for this request. (required)
1107
1108Returns:
1109 An object of the form:
1110
1111 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
1112 #
1113 #
1114 #
1115 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
1116 #
1117 # **Example**
1118 #
1119 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
1120 #
1121 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001122 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1123 { # Specifies the audit configuration for a service. It consists of which permission types are logged, and what identities, if any, are exempted from logging. An AuditConifg must have one or more AuditLogConfigs.
1124 #
1125 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice@googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
1126 "exemptedMembers": [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001127 "A String",
1128 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001129 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1130 { # Provides the configuration for logging a type of permissions. Example:
1131 #
1132 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
1133 #
1134 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
1135 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001136 "A String",
1137 ],
1138 "logType": "A String", # The log type that this config enables.
1139 },
1140 ],
1141 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001142 },
1143 ],
1144 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1145 { # A rule to be applied in a Policy.
1146 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1147 { # Specifies what kind of log the caller must write
1148 "counter": { # Options for counters # Counter options.
1149 "field": "A String", # The field value to attribute.
1150 "metric": "A String", # The metric to update.
1151 },
1152 },
1153 ],
1154 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1155 "A String",
1156 ],
1157 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1158 "A String",
1159 ],
1160 "action": "A String", # Required
1161 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1162 "A String",
1163 ],
1164 "conditions": [ # Additional restrictions that must be met
1165 { # A condition to be met.
1166 "iam": "A String", # Trusted attributes supplied by the IAM system.
1167 "svc": "A String", # Trusted attributes discharged by the service.
1168 "value": "A String", # DEPRECATED. Use 'values' instead.
1169 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1170 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
1171 "A String",
1172 ],
1173 "op": "A String", # An operator to apply the subject with.
1174 },
1175 ],
1176 "description": "A String", # Human-readable description of the rule.
1177 },
1178 ],
1179 "version": 42, # Version of the `Policy`. The default version is 0.
1180 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1181 #
1182 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
1183 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
1184 { # Associates `members` with a `role`.
1185 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1186 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1187 #
1188 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1189 #
1190 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1191 #
1192 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
1193 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001194 #
1195 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001196 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1197 #
1198 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1199 #
1200 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
1201 "A String",
1202 ],
1203 },
1204 ],
1205 "iamOwned": True or False,
1206 }</pre>
1207</div>
1208
1209<div class="method">
1210 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
1211 <pre>Returns the specified instance's serial port output.
1212
1213Args:
1214 project: string, Project ID for this request. (required)
1215 zone: string, The name of the zone for this request. (required)
1216 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001217 start: string, Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001218 port: integer, Specifies which COM or serial port to retrieve data from.
1219
1220Returns:
1221 An object of the form:
1222
1223 { # An instance's serial console output.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001224 "start": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001225 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
1226 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1227 "contents": "A String", # [Output Only] The contents of the console output.
1228 "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.
1229 }</pre>
1230</div>
1231
1232<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001233 <code class="details" id="insert">insert(project, zone, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001234 <pre>Creates an instance resource in the specified project using the data included in the request.
1235
1236Args:
1237 project: string, Project ID for this request. (required)
1238 zone: string, The name of the zone for this request. (required)
1239 body: object, The request body. (required)
1240 The object takes the form of:
1241
1242{ # An Instance resource.
1243 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001244 "guestAccelerators": [
1245 { # A specification of the type and number of accelerator cards attached to the instance.
1246 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
1247 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
1248 },
1249 ],
1250 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001251 "a_key": "A String",
1252 },
1253 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
1254 "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.
1255 "preemptible": True or False, # Whether the instance is preemptible.
1256 "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.
1257 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001258 "minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform.
1259 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001260 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001261 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001262 { # A service account.
1263 "scopes": [ # The list of scopes to be made available for this service account.
1264 "A String",
1265 ],
1266 "email": "A String", # Email address of the service account.
1267 },
1268 ],
1269 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1270 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1271 "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.
1272 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001273 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001274 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
1275 { # An alias IP range attached to an instance's network interface.
1276 "subnetworkRangeName": "A String", # Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
1277 "ipCidrRange": "A String", # The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
1278 },
1279 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001280 "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
1281 #
1282 # This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.
1283 #
1284 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1285 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1286 # - projects/project/global/networks/network
1287 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001288 "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.
1289 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1290 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1291 "name": "A String", # Name of this access configuration.
1292 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001293 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
1294 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001295 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001296 "setPublicPtr": True or False, # Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001297 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001298 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001299 },
1300 ],
1301 "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.
1302 "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:
1303 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1304 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001305 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001306 },
1307 ],
1308 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
1309 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
1310 #
1311 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
1312 #
1313 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
1314 #
1315 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
1316 #
1317 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
1318 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1319 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1320 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1321 #
1322 # The key must meet the following requirements before you can provide it to Compute Engine:
1323 # - The key is wrapped using a RSA public key certificate provided by Google.
1324 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
1325 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1326 },
1327 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1328 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1329 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1330 {
1331 "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.
1332 "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.
1333 },
1334 ],
1335 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1336 "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.
1337 },
1338 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
1339 "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.
1340 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1341 "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.
1342 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1343 "A String",
1344 ],
1345 "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.
1346 #
1347 # To see the latest fingerprint, make get() request to the instance.
1348 },
1349 "labelFingerprint": "A String", # 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.
1350 #
1351 # To see the latest fingerprint, make get() request to the instance.
1352 "host": "A String", # Full or partial URL of the host resource that the instance should be placed on, in the format: zones/zone/hosts/host.
1353 #
1354 # Optional, Private Host (physical machine) that the instance will be placed on when it's created. The instance is guaranteed to be placed on the same machine as other instances with the same private host.
1355 #
1356 # The request will be rejected if the private host has run out of resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001357 "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:
1358 #
1359 # zones/us-central1-f/machineTypes/n1-standard-1
1360 #
1361 # 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):
1362 #
1363 # zones/zone/machineTypes/custom-CPUS-MEMORY
1364 #
1365 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1366 #
1367 # For a full list of restrictions, read the Specifications for custom machine types.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001368 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
1369 "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.
1370 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1371 { # An instance-attached disk resource.
1372 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1373 #
1374 # 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.
1375 #
1376 # 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.
1377 #
1378 # 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.
1379 #
1380 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1381 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1382 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1383 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1384 #
1385 # The key must meet the following requirements before you can provide it to Compute Engine:
1386 # - The key is wrapped using a RSA public key certificate provided by Google.
1387 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
1388 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1389 },
1390 "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.
1391 #
1392 # 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.
1393 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1394 "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.
1395 #
1396 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1397 #
1398 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1399 "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.
1400 #
1401 # 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.
1402 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1403 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1404 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1405 #
1406 # The key must meet the following requirements before you can provide it to Compute Engine:
1407 # - The key is wrapped using a RSA public key certificate provided by Google.
1408 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
1409 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1410 },
1411 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
1412 "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:
1413 #
1414 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1415 #
1416 # 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:
1417 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1418 # - projects/project/zones/zone/diskTypes/diskType
1419 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
1420 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001421 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001422 #
1423 # 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:
1424 #
1425 # projects/debian-cloud/global/images/family/debian-8
1426 #
1427 # Alternatively, use a specific version of a public operating system image:
1428 #
1429 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
1430 #
1431 # To create a disk with a private image that you created, specify the image name in the following format:
1432 #
1433 # global/images/my-private-image
1434 #
1435 # 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:
1436 #
1437 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001438 #
1439 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001440 "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
1441 },
1442 "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).
1443 "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.
1444 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001445 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
1446 "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.
1447 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001448 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1449 "A String",
1450 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001451 "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 -08001452 "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.
1453 #
1454 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1455 #
1456 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001457 },
1458 ],
1459 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1460}
1461
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001462 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001463
1464Returns:
1465 An object of the form:
1466
1467 { # An Operation resource, used to manage asynchronous API requests.
1468 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1469 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001470 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001471 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1472 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1473 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1474 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1475 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1476 "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.
1477 "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.
1478 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1479 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1480 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1481 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1482 {
1483 "message": "A String", # [Output Only] A human-readable description of the warning code.
1484 "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.
1485 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1486 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1487 {
1488 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1489 "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).
1490 },
1491 ],
1492 },
1493 ],
1494 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1495 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1496 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1497 "name": "A String", # [Output Only] Name of the resource.
1498 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1499 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1500 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1501 {
1502 "message": "A String", # [Output Only] An optional, human-readable error message.
1503 "code": "A String", # [Output Only] The error type identifier for this error.
1504 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1505 },
1506 ],
1507 },
1508 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1509 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001510 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001511 }</pre>
1512</div>
1513
1514<div class="method">
1515 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1516 <pre>Retrieves the list of instances contained within the specified zone.
1517
1518Args:
1519 project: string, Project ID for this request. (required)
1520 zone: string, The name of the zone for this request. (required)
1521 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1522
1523You 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.
1524
1525Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001526 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. Acceptable values are 0 to 500, inclusive. (Default: 500)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001527 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.
1528 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.
1529
1530The 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.
1531
1532For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
1533
1534You 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.
1535
1536To 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.
1537
1538Returns:
1539 An object of the form:
1540
1541 { # Contains a list of instances.
1542 "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.
1543 "items": [ # [Output Only] A list of instances.
1544 { # An Instance resource.
1545 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001546 "guestAccelerators": [
1547 { # A specification of the type and number of accelerator cards attached to the instance.
1548 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
1549 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
1550 },
1551 ],
1552 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001553 "a_key": "A String",
1554 },
1555 "scheduling": { # Sets the scheduling options for an Instance. # Scheduling options for this instance.
1556 "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.
1557 "preemptible": True or False, # Whether the instance is preemptible.
1558 "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.
1559 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001560 "minCpuPlatform": "A String", # Minimum cpu/platform to be used by this instance. We may schedule on the specified or later cpu/platform.
1561 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001562 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001563 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001564 { # A service account.
1565 "scopes": [ # The list of scopes to be made available for this service account.
1566 "A String",
1567 ],
1568 "email": "A String", # Email address of the service account.
1569 },
1570 ],
1571 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1572 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1573 "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.
1574 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001575 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001576 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.
1577 { # An alias IP range attached to an instance's network interface.
1578 "subnetworkRangeName": "A String", # Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.
1579 "ipCidrRange": "A String", # The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
1580 },
1581 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001582 "network": "A String", # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
1583 #
1584 # This field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.
1585 #
1586 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1587 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1588 # - projects/project/global/networks/network
1589 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001590 "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.
1591 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1592 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1593 "name": "A String", # Name of this access configuration.
1594 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001595 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
1596 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001597 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001598 "setPublicPtr": True or False, # Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001599 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001600 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001601 },
1602 ],
1603 "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.
1604 "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:
1605 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1606 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001607 "name": "A String", # [Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001608 },
1609 ],
1610 "zone": "A String", # [Output Only] URL of the zone where the instance resides.
1611 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
1612 #
1613 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
1614 #
1615 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
1616 #
1617 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
1618 #
1619 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
1620 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1621 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1622 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1623 #
1624 # The key must meet the following requirements before you can provide it to Compute Engine:
1625 # - The key is wrapped using a RSA public key certificate provided by Google.
1626 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
1627 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1628 },
1629 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1630 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1631 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1632 {
1633 "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.
1634 "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.
1635 },
1636 ],
1637 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1638 "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.
1639 },
1640 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
1641 "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.
1642 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1643 "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.
1644 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1645 "A String",
1646 ],
1647 "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.
1648 #
1649 # To see the latest fingerprint, make get() request to the instance.
1650 },
1651 "labelFingerprint": "A String", # 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.
1652 #
1653 # To see the latest fingerprint, make get() request to the instance.
1654 "host": "A String", # Full or partial URL of the host resource that the instance should be placed on, in the format: zones/zone/hosts/host.
1655 #
1656 # Optional, Private Host (physical machine) that the instance will be placed on when it's created. The instance is guaranteed to be placed on the same machine as other instances with the same private host.
1657 #
1658 # The request will be rejected if the private host has run out of resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001659 "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:
1660 #
1661 # zones/us-central1-f/machineTypes/n1-standard-1
1662 #
1663 # 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):
1664 #
1665 # zones/zone/machineTypes/custom-CPUS-MEMORY
1666 #
1667 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1668 #
1669 # For a full list of restrictions, read the Specifications for custom machine types.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001670 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
1671 "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.
1672 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1673 { # An instance-attached disk resource.
1674 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1675 #
1676 # 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.
1677 #
1678 # 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.
1679 #
1680 # 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.
1681 #
1682 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1683 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1684 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1685 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1686 #
1687 # The key must meet the following requirements before you can provide it to Compute Engine:
1688 # - The key is wrapped using a RSA public key certificate provided by Google.
1689 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
1690 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1691 },
1692 "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.
1693 #
1694 # 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.
1695 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1696 "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.
1697 #
1698 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1699 #
1700 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1701 "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.
1702 #
1703 # 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.
1704 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1705 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1706 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1707 #
1708 # The key must meet the following requirements before you can provide it to Compute Engine:
1709 # - The key is wrapped using a RSA public key certificate provided by Google.
1710 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
1711 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1712 },
1713 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance.
1714 "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:
1715 #
1716 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1717 #
1718 # 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:
1719 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1720 # - projects/project/zones/zone/diskTypes/diskType
1721 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
1722 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001723 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001724 #
1725 # 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:
1726 #
1727 # projects/debian-cloud/global/images/family/debian-8
1728 #
1729 # Alternatively, use a specific version of a public operating system image:
1730 #
1731 # projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
1732 #
1733 # To create a disk with a private image that you created, specify the image name in the following format:
1734 #
1735 # global/images/my-private-image
1736 #
1737 # 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:
1738 #
1739 # global/images/family/my-private-family
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001740 #
1741 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001742 "diskStorageType": "A String", # [Deprecated] Storage type of the disk.
1743 },
1744 "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).
1745 "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.
1746 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001747 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
1748 "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.
1749 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001750 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1751 "A String",
1752 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001753 "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 -08001754 "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.
1755 #
1756 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1757 #
1758 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001759 },
1760 ],
1761 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1762 },
1763 ],
1764 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
1765 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1766 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1767 }</pre>
1768</div>
1769
1770<div class="method">
1771 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1772 <pre>Retrieves the next page of results.
1773
1774Args:
1775 previous_request: The request for the previous page. (required)
1776 previous_response: The response from the request for the previous page. (required)
1777
1778Returns:
1779 A request object that you can call 'execute()' on to request the next
1780 page. Returns None if there are no more items in the collection.
1781 </pre>
1782</div>
1783
1784<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001785 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001786 <pre>Performs a hard reset on the instance.
1787
1788Args:
1789 project: string, Project ID for this request. (required)
1790 zone: string, The name of the zone for this request. (required)
1791 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001792 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001793
1794Returns:
1795 An object of the form:
1796
1797 { # An Operation resource, used to manage asynchronous API requests.
1798 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1799 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001800 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001801 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1802 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1803 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1804 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1805 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1806 "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.
1807 "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.
1808 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1809 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1810 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1811 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1812 {
1813 "message": "A String", # [Output Only] A human-readable description of the warning code.
1814 "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.
1815 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1816 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1817 {
1818 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1819 "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).
1820 },
1821 ],
1822 },
1823 ],
1824 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1825 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1826 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1827 "name": "A String", # [Output Only] Name of the resource.
1828 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1829 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1830 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1831 {
1832 "message": "A String", # [Output Only] An optional, human-readable error message.
1833 "code": "A String", # [Output Only] The error type identifier for this error.
1834 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1835 },
1836 ],
1837 },
1838 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1839 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001840 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001841 }</pre>
1842</div>
1843
1844<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001845 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001846 <pre>Sets the auto-delete flag for a disk attached to an instance.
1847
1848Args:
1849 project: string, Project ID for this request. (required)
1850 zone: string, The name of the zone for this request. (required)
1851 instance: string, The instance name. (required)
1852 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
1853 deviceName: string, The device name of the disk to modify. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001854 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001855
1856Returns:
1857 An object of the form:
1858
1859 { # An Operation resource, used to manage asynchronous API requests.
1860 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1861 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001862 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001863 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1864 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
1865 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1866 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1867 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1868 "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.
1869 "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.
1870 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1871 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1872 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1873 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1874 {
1875 "message": "A String", # [Output Only] A human-readable description of the warning code.
1876 "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.
1877 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1878 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1879 {
1880 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1881 "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).
1882 },
1883 ],
1884 },
1885 ],
1886 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1887 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1888 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1889 "name": "A String", # [Output Only] Name of the resource.
1890 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1891 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1892 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1893 {
1894 "message": "A String", # [Output Only] An optional, human-readable error message.
1895 "code": "A String", # [Output Only] The error type identifier for this error.
1896 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1897 },
1898 ],
1899 },
1900 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1901 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001902 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001903 }</pre>
1904</div>
1905
1906<div class="method">
1907 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body)</code>
1908 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1909
1910Args:
1911 project: string, Project ID for this request. (required)
1912 zone: string, The name of the zone for this request. (required)
1913 resource: string, Name of the resource for this request. (required)
1914 body: object, The request body. (required)
1915 The object takes the form of:
1916
1917{ # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
1918 #
1919 #
1920 #
1921 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
1922 #
1923 # **Example**
1924 #
1925 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
1926 #
1927 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001928 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1929 { # Specifies the audit configuration for a service. It consists of which permission types are logged, and what identities, if any, are exempted from logging. An AuditConifg must have one or more AuditLogConfigs.
1930 #
1931 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice@googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
1932 "exemptedMembers": [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001933 "A String",
1934 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001935 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1936 { # Provides the configuration for logging a type of permissions. Example:
1937 #
1938 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
1939 #
1940 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
1941 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001942 "A String",
1943 ],
1944 "logType": "A String", # The log type that this config enables.
1945 },
1946 ],
1947 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001948 },
1949 ],
1950 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1951 { # A rule to be applied in a Policy.
1952 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1953 { # Specifies what kind of log the caller must write
1954 "counter": { # Options for counters # Counter options.
1955 "field": "A String", # The field value to attribute.
1956 "metric": "A String", # The metric to update.
1957 },
1958 },
1959 ],
1960 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1961 "A String",
1962 ],
1963 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1964 "A String",
1965 ],
1966 "action": "A String", # Required
1967 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1968 "A String",
1969 ],
1970 "conditions": [ # Additional restrictions that must be met
1971 { # A condition to be met.
1972 "iam": "A String", # Trusted attributes supplied by the IAM system.
1973 "svc": "A String", # Trusted attributes discharged by the service.
1974 "value": "A String", # DEPRECATED. Use 'values' instead.
1975 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1976 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
1977 "A String",
1978 ],
1979 "op": "A String", # An operator to apply the subject with.
1980 },
1981 ],
1982 "description": "A String", # Human-readable description of the rule.
1983 },
1984 ],
1985 "version": 42, # Version of the `Policy`. The default version is 0.
1986 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1987 #
1988 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
1989 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
1990 { # Associates `members` with a `role`.
1991 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1992 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1993 #
1994 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1995 #
1996 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1997 #
1998 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
1999 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002000 #
2001 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002002 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2003 #
2004 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2005 #
2006 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
2007 "A String",
2008 ],
2009 },
2010 ],
2011 "iamOwned": True or False,
2012}
2013
2014
2015Returns:
2016 An object of the form:
2017
2018 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
2019 #
2020 #
2021 #
2022 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
2023 #
2024 # **Example**
2025 #
2026 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
2027 #
2028 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002029 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
2030 { # Specifies the audit configuration for a service. It consists of which permission types are logged, and what identities, if any, are exempted from logging. An AuditConifg must have one or more AuditLogConfigs.
2031 #
2032 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice@googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
2033 "exemptedMembers": [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002034 "A String",
2035 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002036 "auditLogConfigs": [ # The configuration for logging of each type of permission.
2037 { # Provides the configuration for logging a type of permissions. Example:
2038 #
2039 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
2040 #
2041 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
2042 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002043 "A String",
2044 ],
2045 "logType": "A String", # The log type that this config enables.
2046 },
2047 ],
2048 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002049 },
2050 ],
2051 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
2052 { # A rule to be applied in a Policy.
2053 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2054 { # Specifies what kind of log the caller must write
2055 "counter": { # Options for counters # Counter options.
2056 "field": "A String", # The field value to attribute.
2057 "metric": "A String", # The metric to update.
2058 },
2059 },
2060 ],
2061 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2062 "A String",
2063 ],
2064 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
2065 "A String",
2066 ],
2067 "action": "A String", # Required
2068 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
2069 "A String",
2070 ],
2071 "conditions": [ # Additional restrictions that must be met
2072 { # A condition to be met.
2073 "iam": "A String", # Trusted attributes supplied by the IAM system.
2074 "svc": "A String", # Trusted attributes discharged by the service.
2075 "value": "A String", # DEPRECATED. Use 'values' instead.
2076 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2077 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
2078 "A String",
2079 ],
2080 "op": "A String", # An operator to apply the subject with.
2081 },
2082 ],
2083 "description": "A String", # Human-readable description of the rule.
2084 },
2085 ],
2086 "version": 42, # Version of the `Policy`. The default version is 0.
2087 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
2088 #
2089 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
2090 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
2091 { # Associates `members` with a `role`.
2092 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2093 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2094 #
2095 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2096 #
2097 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2098 #
2099 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
2100 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002101 #
2102 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002103 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2104 #
2105 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2106 #
2107 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
2108 "A String",
2109 ],
2110 },
2111 ],
2112 "iamOwned": True or False,
2113 }</pre>
2114</div>
2115
2116<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002117 <code class="details" id="setLabels">setLabels(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002118 <pre>Sets labels on an instance. To learn more about labels, read the Labeling or Tagging Resources documentation.
2119
2120Args:
2121 project: string, Project ID for this request. (required)
2122 zone: string, The name of the zone for this request. (required)
2123 instance: string, Name of the instance scoping this request. (required)
2124 body: object, The request body. (required)
2125 The object takes the form of:
2126
2127{
2128 "labelFingerprint": "A String", # Fingerprint of the previous set of labels for this resource, used to prevent conflicts. Provide the latest fingerprint value when making a request to add or change labels.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002129 "labels": {
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002130 "a_key": "A String",
2131 },
2132 }
2133
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002134 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002135
2136Returns:
2137 An object of the form:
2138
2139 { # An Operation resource, used to manage asynchronous API requests.
2140 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2141 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002142 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002143 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2144 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2145 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2146 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2147 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2148 "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.
2149 "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.
2150 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2151 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2152 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2153 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2154 {
2155 "message": "A String", # [Output Only] A human-readable description of the warning code.
2156 "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.
2157 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2158 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2159 {
2160 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2161 "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).
2162 },
2163 ],
2164 },
2165 ],
2166 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2167 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2168 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2169 "name": "A String", # [Output Only] Name of the resource.
2170 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2171 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2172 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2173 {
2174 "message": "A String", # [Output Only] An optional, human-readable error message.
2175 "code": "A String", # [Output Only] The error type identifier for this error.
2176 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2177 },
2178 ],
2179 },
2180 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2181 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002182 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002183 }</pre>
2184</div>
2185
2186<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002187 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body, requestId=None)</code>
2188 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
2189
2190Args:
2191 project: string, Project ID for this request. (required)
2192 zone: string, The name of the zone for this request. (required)
2193 instance: string, Name of the instance scoping this request. (required)
2194 body: object, The request body. (required)
2195 The object takes the form of:
2196
2197{
2198 "guestAccelerators": [
2199 { # A specification of the type and number of accelerator cards attached to the instance.
2200 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
2201 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to expose to this instance.
2202 },
2203 ],
2204 }
2205
2206 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
2207
2208Returns:
2209 An object of the form:
2210
2211 { # An Operation resource, used to manage asynchronous API requests.
2212 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2213 "clientOperationId": "A String", # [Output Only] Reserved for future use.
2214 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2215 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2216 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2217 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2218 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2219 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2220 "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.
2221 "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.
2222 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2223 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2224 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2225 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2226 {
2227 "message": "A String", # [Output Only] A human-readable description of the warning code.
2228 "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.
2229 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2230 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2231 {
2232 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2233 "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).
2234 },
2235 ],
2236 },
2237 ],
2238 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2239 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2240 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2241 "name": "A String", # [Output Only] Name of the resource.
2242 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2243 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2244 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2245 {
2246 "message": "A String", # [Output Only] An optional, human-readable error message.
2247 "code": "A String", # [Output Only] The error type identifier for this error.
2248 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2249 },
2250 ],
2251 },
2252 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2253 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2254 "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.
2255 }</pre>
2256</div>
2257
2258<div class="method">
2259 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002260 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
2261
2262Args:
2263 project: string, Project ID for this request. (required)
2264 zone: string, The name of the zone for this request. (required)
2265 instance: string, Name of the instance scoping this request. (required)
2266 body: object, The request body. (required)
2267 The object takes the form of:
2268
2269{
2270 "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
2271 }
2272
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002273 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002274
2275Returns:
2276 An object of the form:
2277
2278 { # An Operation resource, used to manage asynchronous API requests.
2279 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2280 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002281 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002282 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2283 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2284 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2285 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2286 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2287 "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.
2288 "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.
2289 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2290 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2291 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2292 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2293 {
2294 "message": "A String", # [Output Only] A human-readable description of the warning code.
2295 "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.
2296 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2297 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2298 {
2299 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2300 "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).
2301 },
2302 ],
2303 },
2304 ],
2305 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2306 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2307 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2308 "name": "A String", # [Output Only] Name of the resource.
2309 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2310 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2311 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2312 {
2313 "message": "A String", # [Output Only] An optional, human-readable error message.
2314 "code": "A String", # [Output Only] The error type identifier for this error.
2315 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2316 },
2317 ],
2318 },
2319 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2320 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002321 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002322 }</pre>
2323</div>
2324
2325<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002326 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002327 <pre>Sets metadata for the specified instance to the data included in the request.
2328
2329Args:
2330 project: string, Project ID for this request. (required)
2331 zone: string, The name of the zone for this request. (required)
2332 instance: string, Name of the instance scoping this request. (required)
2333 body: object, The request body. (required)
2334 The object takes the form of:
2335
2336{ # A metadata key/value entry.
2337 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2338 {
2339 "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.
2340 "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.
2341 },
2342 ],
2343 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
2344 "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.
2345}
2346
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002347 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002348
2349Returns:
2350 An object of the form:
2351
2352 { # An Operation resource, used to manage asynchronous API requests.
2353 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2354 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002355 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002356 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2357 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2358 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2359 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2360 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2361 "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.
2362 "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.
2363 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2364 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2365 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2366 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2367 {
2368 "message": "A String", # [Output Only] A human-readable description of the warning code.
2369 "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.
2370 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2371 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2372 {
2373 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2374 "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).
2375 },
2376 ],
2377 },
2378 ],
2379 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2380 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2381 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2382 "name": "A String", # [Output Only] Name of the resource.
2383 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2384 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2385 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2386 {
2387 "message": "A String", # [Output Only] An optional, human-readable error message.
2388 "code": "A String", # [Output Only] The error type identifier for this error.
2389 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2390 },
2391 ],
2392 },
2393 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2394 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002395 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002396 }</pre>
2397</div>
2398
2399<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002400 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body, requestId=None)</code>
2401 <pre>Changes the minimum cpu/platform that this instance should be started as. This is called on a stopped instance.
2402
2403Args:
2404 project: string, Project ID for this request. (required)
2405 zone: string, The name of the zone for this request. (required)
2406 instance: string, Name of the instance scoping this request. (required)
2407 body: object, The request body. (required)
2408 The object takes the form of:
2409
2410{
2411 "minCpuPlatform": "A String", # Minimum cpu/platform this instance should be started at.
2412 }
2413
2414 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
2415
2416Returns:
2417 An object of the form:
2418
2419 { # An Operation resource, used to manage asynchronous API requests.
2420 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2421 "clientOperationId": "A String", # [Output Only] Reserved for future use.
2422 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2423 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2424 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2425 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2426 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2427 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2428 "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.
2429 "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.
2430 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2431 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2432 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2433 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2434 {
2435 "message": "A String", # [Output Only] A human-readable description of the warning code.
2436 "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.
2437 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2438 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2439 {
2440 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2441 "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).
2442 },
2443 ],
2444 },
2445 ],
2446 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2447 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2448 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2449 "name": "A String", # [Output Only] Name of the resource.
2450 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2451 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2452 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2453 {
2454 "message": "A String", # [Output Only] An optional, human-readable error message.
2455 "code": "A String", # [Output Only] The error type identifier for this error.
2456 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2457 },
2458 ],
2459 },
2460 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2461 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2462 "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.
2463 }</pre>
2464</div>
2465
2466<div class="method">
2467 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002468 <pre>Sets an instance's scheduling options.
2469
2470Args:
2471 project: string, Project ID for this request. (required)
2472 zone: string, The name of the zone for this request. (required)
2473 instance: string, Instance name. (required)
2474 body: object, The request body. (required)
2475 The object takes the form of:
2476
2477{ # Sets the scheduling options for an Instance.
2478 "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.
2479 "preemptible": True or False, # Whether the instance is preemptible.
2480 "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.
2481}
2482
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002483 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002484
2485Returns:
2486 An object of the form:
2487
2488 { # An Operation resource, used to manage asynchronous API requests.
2489 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2490 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002491 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002492 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2493 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2494 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2495 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2496 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2497 "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.
2498 "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.
2499 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2500 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2501 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2502 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2503 {
2504 "message": "A String", # [Output Only] A human-readable description of the warning code.
2505 "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.
2506 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2507 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2508 {
2509 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2510 "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).
2511 },
2512 ],
2513 },
2514 ],
2515 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2516 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2517 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2518 "name": "A String", # [Output Only] Name of the resource.
2519 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2520 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2521 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2522 {
2523 "message": "A String", # [Output Only] An optional, human-readable error message.
2524 "code": "A String", # [Output Only] The error type identifier for this error.
2525 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2526 },
2527 ],
2528 },
2529 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2530 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002531 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002532 }</pre>
2533</div>
2534
2535<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002536 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body, requestId=None)</code>
2537 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002538
2539Args:
2540 project: string, Project ID for this request. (required)
2541 zone: string, The name of the zone for this request. (required)
2542 instance: string, Name of the instance resource to start. (required)
2543 body: object, The request body. (required)
2544 The object takes the form of:
2545
2546{
2547 "scopes": [ # The list of scopes to be made available for this service account.
2548 "A String",
2549 ],
2550 "email": "A String", # Email address of the service account.
2551 }
2552
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002553 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002554
2555Returns:
2556 An object of the form:
2557
2558 { # An Operation resource, used to manage asynchronous API requests.
2559 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2560 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002561 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002562 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2563 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2564 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2565 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2566 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2567 "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.
2568 "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.
2569 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2570 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2571 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2572 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2573 {
2574 "message": "A String", # [Output Only] A human-readable description of the warning code.
2575 "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.
2576 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2577 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2578 {
2579 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2580 "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).
2581 },
2582 ],
2583 },
2584 ],
2585 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2586 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2587 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2588 "name": "A String", # [Output Only] Name of the resource.
2589 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2590 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2591 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2592 {
2593 "message": "A String", # [Output Only] An optional, human-readable error message.
2594 "code": "A String", # [Output Only] The error type identifier for this error.
2595 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2596 },
2597 ],
2598 },
2599 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2600 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002601 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002602 }</pre>
2603</div>
2604
2605<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002606 <code class="details" id="setTags">setTags(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002607 <pre>Sets tags for the specified instance to the data included in the request.
2608
2609Args:
2610 project: string, Project ID for this request. (required)
2611 zone: string, The name of the zone for this request. (required)
2612 instance: string, Name of the instance scoping this request. (required)
2613 body: object, The request body. (required)
2614 The object takes the form of:
2615
2616{ # A set of instance tags.
2617 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2618 "A String",
2619 ],
2620 "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.
2621 #
2622 # To see the latest fingerprint, make get() request to the instance.
2623}
2624
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002625 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002626
2627Returns:
2628 An object of the form:
2629
2630 { # An Operation resource, used to manage asynchronous API requests.
2631 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2632 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002633 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002634 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2635 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2636 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2637 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2638 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2639 "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.
2640 "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.
2641 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2642 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2643 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2644 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2645 {
2646 "message": "A String", # [Output Only] A human-readable description of the warning code.
2647 "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.
2648 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2649 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2650 {
2651 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2652 "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).
2653 },
2654 ],
2655 },
2656 ],
2657 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2658 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2659 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2660 "name": "A String", # [Output Only] Name of the resource.
2661 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2662 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2663 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2664 {
2665 "message": "A String", # [Output Only] An optional, human-readable error message.
2666 "code": "A String", # [Output Only] The error type identifier for this error.
2667 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2668 },
2669 ],
2670 },
2671 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2672 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002673 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002674 }</pre>
2675</div>
2676
2677<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002678 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
2679 <pre>Simulates a maintenance event on the instance.
2680
2681Args:
2682 project: string, Project ID for this request. (required)
2683 zone: string, The name of the zone for this request. (required)
2684 instance: string, Name of the instance scoping this request. (required)
2685
2686Returns:
2687 An object of the form:
2688
2689 { # An Operation resource, used to manage asynchronous API requests.
2690 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2691 "clientOperationId": "A String", # [Output Only] Reserved for future use.
2692 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2693 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2694 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2695 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2696 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2697 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2698 "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.
2699 "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.
2700 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2701 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2702 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2703 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2704 {
2705 "message": "A String", # [Output Only] A human-readable description of the warning code.
2706 "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.
2707 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2708 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2709 {
2710 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2711 "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).
2712 },
2713 ],
2714 },
2715 ],
2716 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2717 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2718 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2719 "name": "A String", # [Output Only] Name of the resource.
2720 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2721 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2722 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2723 {
2724 "message": "A String", # [Output Only] An optional, human-readable error message.
2725 "code": "A String", # [Output Only] The error type identifier for this error.
2726 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2727 },
2728 ],
2729 },
2730 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2731 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2732 "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.
2733 }</pre>
2734</div>
2735
2736<div class="method">
2737 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002738 <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
2739
2740Args:
2741 project: string, Project ID for this request. (required)
2742 zone: string, The name of the zone for this request. (required)
2743 instance: string, Name of the instance resource to start. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002744 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002745
2746Returns:
2747 An object of the form:
2748
2749 { # An Operation resource, used to manage asynchronous API requests.
2750 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2751 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002752 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002753 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2754 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2755 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2756 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2757 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2758 "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.
2759 "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.
2760 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2761 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2762 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2763 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2764 {
2765 "message": "A String", # [Output Only] A human-readable description of the warning code.
2766 "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.
2767 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2768 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2769 {
2770 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2771 "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).
2772 },
2773 ],
2774 },
2775 ],
2776 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2777 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2778 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2779 "name": "A String", # [Output Only] Name of the resource.
2780 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2781 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2782 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2783 {
2784 "message": "A String", # [Output Only] An optional, human-readable error message.
2785 "code": "A String", # [Output Only] The error type identifier for this error.
2786 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2787 },
2788 ],
2789 },
2790 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2791 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002792 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002793 }</pre>
2794</div>
2795
2796<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002797 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002798 <pre>Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.
2799
2800Args:
2801 project: string, Project ID for this request. (required)
2802 zone: string, The name of the zone for this request. (required)
2803 instance: string, Name of the instance resource to start. (required)
2804 body: object, The request body. (required)
2805 The object takes the form of:
2806
2807{
2808 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
2809 #
2810 # If the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance start will not succeed.
2811 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2812 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2813 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2814 #
2815 # The key must meet the following requirements before you can provide it to Compute Engine:
2816 # - The key is wrapped using a RSA public key certificate provided by Google.
2817 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
2818 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2819 },
2820 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
2821 #
2822 # In order to start the instance, the disk url and its corresponding key must be provided.
2823 #
2824 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
2825 {
2826 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
2827 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2828 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2829 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2830 #
2831 # The key must meet the following requirements before you can provide it to Compute Engine:
2832 # - The key is wrapped using a RSA public key certificate provided by Google.
2833 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Get the RSA public key certificate provided by Google at:
2834 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2835 },
2836 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
2837 },
2838 ],
2839 }
2840
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002841 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002842
2843Returns:
2844 An object of the form:
2845
2846 { # An Operation resource, used to manage asynchronous API requests.
2847 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2848 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002849 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002850 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2851 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2852 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2853 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2854 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2855 "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.
2856 "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.
2857 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2858 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2859 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2860 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2861 {
2862 "message": "A String", # [Output Only] A human-readable description of the warning code.
2863 "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.
2864 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2865 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2866 {
2867 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2868 "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).
2869 },
2870 ],
2871 },
2872 ],
2873 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2874 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2875 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2876 "name": "A String", # [Output Only] Name of the resource.
2877 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2878 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2879 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2880 {
2881 "message": "A String", # [Output Only] An optional, human-readable error message.
2882 "code": "A String", # [Output Only] The error type identifier for this error.
2883 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2884 },
2885 ],
2886 },
2887 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2888 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002889 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002890 }</pre>
2891</div>
2892
2893<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002894 <code class="details" id="stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002895 <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.
2896
2897Args:
2898 project: string, Project ID for this request. (required)
2899 zone: string, The name of the zone for this request. (required)
2900 instance: string, Name of the instance resource to stop. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002901 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
2902 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002903
2904Returns:
2905 An object of the form:
2906
2907 { # An Operation resource, used to manage asynchronous API requests.
2908 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2909 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002910 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002911 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2912 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2913 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2914 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2915 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2916 "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.
2917 "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.
2918 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2919 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2920 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2921 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2922 {
2923 "message": "A String", # [Output Only] A human-readable description of the warning code.
2924 "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.
2925 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2926 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2927 {
2928 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2929 "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).
2930 },
2931 ],
2932 },
2933 ],
2934 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2935 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2936 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2937 "name": "A String", # [Output Only] Name of the resource.
2938 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
2939 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2940 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2941 {
2942 "message": "A String", # [Output Only] An optional, human-readable error message.
2943 "code": "A String", # [Output Only] The error type identifier for this error.
2944 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2945 },
2946 ],
2947 },
2948 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2949 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002950 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002951 }</pre>
2952</div>
2953
2954<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002955 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002956 <pre>This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.
2957
2958Args:
2959 project: string, Project ID for this request. (required)
2960 zone: string, The name of the zone for this request. (required)
2961 instance: string, Name of the instance resource to suspend. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002962 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
2963 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002964
2965Returns:
2966 An object of the form:
2967
2968 { # An Operation resource, used to manage asynchronous API requests.
2969 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2970 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002971 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002972 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2973 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
2974 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2975 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2976 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2977 "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.
2978 "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.
2979 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2980 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2981 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2982 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2983 {
2984 "message": "A String", # [Output Only] A human-readable description of the warning code.
2985 "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.
2986 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2987 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2988 {
2989 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2990 "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).
2991 },
2992 ],
2993 },
2994 ],
2995 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2996 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2997 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2998 "name": "A String", # [Output Only] Name of the resource.
2999 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
3000 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3001 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3002 {
3003 "message": "A String", # [Output Only] An optional, human-readable error message.
3004 "code": "A String", # [Output Only] The error type identifier for this error.
3005 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3006 },
3007 ],
3008 },
3009 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3010 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003011 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003012 }</pre>
3013</div>
3014
3015<div class="method">
3016 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
3017 <pre>Returns permissions that a caller has on the specified resource.
3018
3019Args:
3020 project: string, Project ID for this request. (required)
3021 zone: string, The name of the zone for this request. (required)
3022 resource: string, Name of the resource for this request. (required)
3023 body: object, The request body. (required)
3024 The object takes the form of:
3025
3026{
3027 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
3028 "A String",
3029 ],
3030 }
3031
3032
3033Returns:
3034 An object of the form:
3035
3036 {
3037 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
3038 "A String",
3039 ],
3040 }</pre>
3041</div>
3042
3043<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003044 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003045 <pre>Updates the specified access config from an instance's network interface with the data included in the request.
3046
3047Args:
3048 project: string, Project ID for this request. (required)
3049 zone: string, The name of the zone for this request. (required)
3050 instance: string, The instance name for this request. (required)
3051 networkInterface: string, The name of the network interface where the access config is attached. (required)
3052 body: object, The request body. (required)
3053 The object takes the form of:
3054
3055{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
3056 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
3057 "name": "A String", # Name of this access configuration.
3058 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003059 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
3060 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM , SELECT. If this field is not specified, it is assumed to be PREMIUM.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003061 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003062 "setPublicPtr": True or False, # Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003063 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003064 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003065}
3066
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003067 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003068
3069Returns:
3070 An object of the form:
3071
3072 { # An Operation resource, used to manage asynchronous API requests.
3073 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3074 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003075 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003076 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3077 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
3078 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3079 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3080 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3081 "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.
3082 "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.
3083 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3084 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3085 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3086 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3087 {
3088 "message": "A String", # [Output Only] A human-readable description of the warning code.
3089 "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.
3090 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3091 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3092 {
3093 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3094 "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).
3095 },
3096 ],
3097 },
3098 ],
3099 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3100 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3101 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3102 "name": "A String", # [Output Only] Name of the resource.
3103 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
3104 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3105 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3106 {
3107 "message": "A String", # [Output Only] An optional, human-readable error message.
3108 "code": "A String", # [Output Only] The error type identifier for this error.
3109 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3110 },
3111 ],
3112 },
3113 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3114 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003115 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003116 }</pre>
3117</div>
3118
3119</body></html>