blob: 4690d6b8f8f2fd6302562dd258559424befce4c6 [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_beta.html">Compute Engine API</a> . <a href="compute_beta.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Retrieves aggregated list of all of the instances in your project across all regions and zones.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070083<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#attachDisk">attachDisk(project, zone, instance, body, forceAttach=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040088<p class="firstline">Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Returns the specified Instance resource. Gets a list of available instances by making a list() request.</p>
101<p class="toc_element">
102 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</a></code></p>
103<p class="firstline">Returns the specified guest attributes entry.</p>
104<p class="toc_element">
105 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
106<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700107<p class="toc_element">
108 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700110<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
112<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
113<p class="toc_element">
114 <code><a href="#getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</a></code></p>
115<p class="firstline">Returns the Shielded VM Identity of an instance</p>
116<p class="toc_element">
117 <code><a href="#insert">insert(project, zone, body, sourceInstanceTemplate=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700118<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
119<p class="toc_element">
120 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
121<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
122<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400123 <code><a href="#listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, maxResults=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124<p class="firstline">Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400125<p class="toc_element">
126 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
127<p class="firstline">Retrieves the next page of results.</p>
128<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700129 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
130<p class="firstline">Retrieves the next page of results.</p>
131<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
133<p class="firstline">Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700134<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 <code><a href="#resume">resume(project, zone, instance, body, requestId=None)</a></code></p>
136<p class="firstline">Resumes an instance that was suspended using the instances().suspend method.</p>
137<p class="toc_element">
138 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
139<p class="firstline">Sets deletion protection on the instance.</p>
140<p class="toc_element">
141 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700142<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
143<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body)</a></code></p>
145<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700146<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 <code><a href="#setLabels">setLabels(project, zone, instance, body, requestId=None)</a></code></p>
148<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
149<p class="toc_element">
150 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400151<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
152<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 <code><a href="#setMachineType">setMachineType(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
155<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700156 <code><a href="#setMetadata">setMetadata(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
158<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400159 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160<p class="firstline">Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400161<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162 <code><a href="#setScheduling">setScheduling(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700163<p class="firstline">Sets an instance's scheduling options.</p>
164<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700165 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166<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>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800167<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700168 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body, requestId=None)</a></code></p>
169<p class="firstline">Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700170<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700171 <code><a href="#setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body, requestId=None)</a></code></p>
172<p class="firstline">Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700173<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 <code><a href="#setTags">setTags(project, zone, instance, body, requestId=None)</a></code></p>
175<p class="firstline">Sets network tags for the specified instance to the data included in the request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700176<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
178<p class="firstline">Simulates a maintenance event on the instance.</p>
179<p class="toc_element">
180 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
181<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
182<p class="toc_element">
183 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body, requestId=None)</a></code></p>
184<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
185<p class="toc_element">
186 <code><a href="#stop">stop(project, zone, instance, requestId=None)</a></code></p>
187<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 VM usage charges while they are stopped. However, resources that the VM 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>
188<p class="toc_element">
189 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
190<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700191<p class="toc_element">
192 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
193<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194<p class="toc_element">
195 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</a></code></p>
196<p class="firstline">Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
197<p class="toc_element">
198 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body, requestId=None)</a></code></p>
199<p class="firstline">Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
200<p class="toc_element">
201 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body, requestId=None)</a></code></p>
202<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
203<p class="toc_element">
204 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body, requestId=None)</a></code></p>
205<p class="firstline">Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
206<p class="toc_element">
207 <code><a href="#updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body, requestId=None)</a></code></p>
208<p class="firstline">Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700209<h3>Method Details</h3>
210<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700212 <pre>Adds an access config to an instance's network interface.
213
214Args:
215 project: string, Project ID for this request. (required)
216 zone: string, The name of the zone for this request. (required)
217 instance: string, The instance name for this request. (required)
218 networkInterface: string, The name of the network interface to add to this instance. (required)
219 body: object, The request body. (required)
220 The object takes the form of:
221
222{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
223 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224 "name": "A String", # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
225 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
226 #
227 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
228 #
229 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700230 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 "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.
232 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
233 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234}
235
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
237
238For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
239
240The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241
242Returns:
243 An object of the form:
244
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 { # Represents an Operation resource.
246 #
247 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
248 #
249 # Operations can be global, regional or zonal.
250 # - For global operations, use the globalOperations resource.
251 # - For regional operations, use the regionOperations resource.
252 # - For zonal operations, use the zonalOperations resource.
253 #
254 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700255 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400257 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700258 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700260 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
261 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
262 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
263 "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.
264 "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.
265 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
266 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
267 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
268 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
269 {
270 "message": "A String", # [Output Only] A human-readable description of the warning code.
271 "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.
272 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
273 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
274 {
275 "value": "A String", # [Output Only] A warning data value corresponding to the key.
276 "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).
277 },
278 ],
279 },
280 ],
281 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
282 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
283 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
284 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700285 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700286 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
287 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
288 {
289 "message": "A String", # [Output Only] An optional, human-readable error message.
290 "code": "A String", # [Output Only] The error type identifier for this error.
291 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
292 },
293 ],
294 },
295 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
296 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800297 "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 -0700298 }</pre>
299</div>
300
301<div class="method">
302 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700304
305Args:
306 project: string, Project ID for this request. (required)
307 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
308
309You 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.
310
311Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400312 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 -0700313 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700314 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700315
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700317
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700319
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700321
322Returns:
323 An object of the form:
324
325 {
326 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
328 "items": { # A list of InstancesScopedList resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700329 "a_key": { # [Output Only] Name of the scope containing this set of instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 "instances": [ # [Output Only] A list of instances contained in this scope.
331 { # Represents an Instance resource.
332 #
333 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for beta.instances ==) (== resource_for v1.instances ==)
334 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
335 "reservationAffinity": { # AllocationAffinity is the configuration of desired allocation which this instance could take capacity from. # The configuration of desired reservations from which this Instance can consume capacity from.
336 "values": [ # Corresponds to the label values of reservation resource.
337 "A String",
338 ],
339 "key": "A String", # Corresponds to the label key of reservation resource.
340 "consumeReservationType": "A String", # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
341 },
342 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400343 { # A specification of the type and number of accelerator cards attached to the instance.
344 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400346 },
347 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400348 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700349 "a_key": "A String",
350 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700351 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
352 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
353 },
354 "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Sets the scheduling options for this instance.
355 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400356 "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.
357 #
358 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359 "nodeAffinities": [ # A set of node affinity and anti-affinity.
360 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
361 "operator": "A String", # Defines the operation of node selection.
362 "values": [ # Corresponds to the label values of Node resource.
363 "A String",
364 ],
365 "key": "A String", # Corresponds to the label key of Node resource.
366 },
367 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400368 "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.
369 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400371 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
372 #
373 # 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.
374 { # A service account.
375 "scopes": [ # The list of scopes to be made available for this service account.
376 "A String",
377 ],
378 "email": "A String", # Email address of the service account.
379 },
380 ],
381 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
382 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 "networkInterfaces": [ # An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400384 { # A network interface resource attached to an instance.
385 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400387 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 "subnetworkRangeName": "A String", # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
389 "ipCidrRange": "A String", # The IP alias ranges to allocate for this interface. 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 (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400390 },
391 ],
392 "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.
393 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400394 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
395 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
396 # - projects/project/global/networks/network
397 # - global/networks/default
398 "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.
399 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
400 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 "name": "A String", # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
402 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
403 #
404 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
405 #
406 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400407 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 "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.
409 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
410 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400411 },
412 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 "networkIP": "A String", # An IPv4 internal IP 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.
414 "fingerprint": "A String", # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
415 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400416 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
417 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400419 },
420 ],
421 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
423 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
424 },
425 "shieldedInstanceConfig": { # A set of Shielded Instance options.
426 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
427 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
428 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
429 },
430 "zone": "A String", # [Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
431 "hostname": "A String",
432 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
433 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
434 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400435 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
436 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
437 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
438 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 "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 262144 bytes (256 KiB).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400440 "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.
441 },
442 ],
443 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700444 "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, otherwise the request will fail with error 412 conditionNotMet.
445 #
446 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400447 },
448 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700450 "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.
451 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452 "tags": { # A set of instance tags. # 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. Multiple tags can be specified via the 'tags.items' field.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700453 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
454 "A String",
455 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700457 #
458 # To see the latest fingerprint, make get() request to the instance.
459 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700461 #
462 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400463 "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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400464 # zones/us-central1-f/machineTypes/n1-standard-1
465 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400466 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700467 # 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):
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400468 # zones/zone/machineTypes/custom-CPUS-MEMORY
469 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400471 # For example: zones/us-central1-f/machineTypes/custom-4-5120
472 #
473 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474 "shieldedVmConfig": { # A set of Shielded VM options.
475 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
476 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
477 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
478 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400479 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700480 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700481 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
482 { # An instance-attached disk resource.
483 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
484 #
485 # 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.
486 #
487 # 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.
488 #
489 # 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.
490 #
491 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
492 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
493 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
494 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
495 #
496 # The key must meet the following requirements before you can provide it to Compute Engine:
497 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700498 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700499 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700500 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700501 },
502 "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.
503 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700505 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
506 "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.
507 #
508 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
509 #
510 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511 "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.
512 #
513 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
514 # global/snapshots/my-backup
515 #
516 #
517 # If the source snapshot is deleted later, this field will not be set.
518 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
519 "description": "A String", # An optional description. Provide this property when creating the disk.
520 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
521 "a_key": "A String",
522 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700523 "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.
524 #
525 # 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.
526 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
527 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
528 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
529 #
530 # The key must meet the following requirements before you can provide it to Compute Engine:
531 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700533 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700535 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700536 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700537 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
538 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700540 # 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:
541 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
542 # - projects/project/zones/zone/diskTypes/diskType
543 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700544 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
545 #
546 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
547 { # Guest OS features.
548 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
549 },
550 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700551 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700552 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
553 "A String",
554 ],
555 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700556 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
558 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700559 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700560 #
561 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700562 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700563 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700564 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 # To create a disk with a custom image that you created, specify the image name in the following format:
566 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700567 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700568 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 # You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
570 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700571 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800572 #
573 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700574 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
575 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
576 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
577 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
578 #
579 # The key must meet the following requirements before you can provide it to Compute Engine:
580 # - The key is wrapped using a RSA public key certificate provided by Google.
581 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
582 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
583 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
584 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700585 },
586 "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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 "index": 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700588 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
590 { # Guest OS features.
591 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
592 },
593 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700594 "licenses": [ # [Output Only] Any valid publicly visible licenses.
595 "A String",
596 ],
597 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 "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. TODO(b/131765817): Update documentation when NVME is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700599 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 "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 except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800601 #
602 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
603 #
604 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700605 },
606 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400607 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700608 },
609 ],
610 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
611 "message": "A String", # [Output Only] A human-readable description of the warning code.
612 "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.
613 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
614 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
615 {
616 "value": "A String", # [Output Only] A warning data value corresponding to the key.
617 "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).
618 },
619 ],
620 },
621 },
622 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623 "warning": { # [Output Only] Informational warning message.
624 "message": "A String", # [Output Only] A human-readable description of the warning code.
625 "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.
626 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
627 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
628 {
629 "value": "A String", # [Output Only] A warning data value corresponding to the key.
630 "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).
631 },
632 ],
633 },
634 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700635 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
636 }</pre>
637</div>
638
639<div class="method">
640 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
641 <pre>Retrieves the next page of results.
642
643Args:
644 previous_request: The request for the previous page. (required)
645 previous_response: The response from the request for the previous page. (required)
646
647Returns:
648 A request object that you can call 'execute()' on to request the next
649 page. Returns None if there are no more items in the collection.
650 </pre>
651</div>
652
653<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400655 <pre>Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700656
657Args:
658 project: string, Project ID for this request. (required)
659 zone: string, The name of the zone for this request. (required)
660 instance: string, The instance name for this request. (required)
661 body: object, The request body. (required)
662 The object takes the form of:
663
664{ # An instance-attached disk resource.
665 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
666 #
667 # 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.
668 #
669 # 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.
670 #
671 # 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.
672 #
673 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
674 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
675 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
676 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
677 #
678 # The key must meet the following requirements before you can provide it to Compute Engine:
679 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700681 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700683 },
684 "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.
685 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700686 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700687 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
688 "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.
689 #
690 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
691 #
692 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700693 "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.
694 #
695 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
696 # global/snapshots/my-backup
697 #
698 #
699 # If the source snapshot is deleted later, this field will not be set.
700 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
701 "description": "A String", # An optional description. Provide this property when creating the disk.
702 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
703 "a_key": "A String",
704 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700705 "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.
706 #
707 # 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.
708 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
709 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
710 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
711 #
712 # The key must meet the following requirements before you can provide it to Compute Engine:
713 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700715 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700717 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700718 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700719 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
720 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700722 # 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:
723 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
724 # - projects/project/zones/zone/diskTypes/diskType
725 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700726 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
727 #
728 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
729 { # Guest OS features.
730 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
731 },
732 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700733 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
735 "A String",
736 ],
737 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700738 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700739 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
740 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700741 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700742 #
743 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700745 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700746 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700747 # To create a disk with a custom image that you created, specify the image name in the following format:
748 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700749 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700750 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 # You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
752 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700753 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800754 #
755 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700756 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
757 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
758 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
759 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
760 #
761 # The key must meet the following requirements before you can provide it to Compute Engine:
762 # - The key is wrapped using a RSA public key certificate provided by Google.
763 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
764 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
765 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
766 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700767 },
768 "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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 "index": 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700770 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
772 { # Guest OS features.
773 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
774 },
775 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700776 "licenses": [ # [Output Only] Any valid publicly visible licenses.
777 "A String",
778 ],
779 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780 "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. TODO(b/131765817): Update documentation when NVME is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700781 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700782 "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 except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800783 #
784 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
785 #
786 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700787}
788
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700789 forceAttach: boolean, Whether to force attach the disk even if it's currently attached to another instance.
790 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
791
792For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
793
794The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700795
796Returns:
797 An object of the form:
798
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700799 { # Represents an Operation resource.
800 #
801 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
802 #
803 # Operations can be global, regional or zonal.
804 # - For global operations, use the globalOperations resource.
805 # - For regional operations, use the regionOperations resource.
806 # - For zonal operations, use the zonalOperations resource.
807 #
808 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700809 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400811 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700812 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700813 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700814 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
815 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
816 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
817 "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.
818 "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.
819 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
820 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
821 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
822 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
823 {
824 "message": "A String", # [Output Only] A human-readable description of the warning code.
825 "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.
826 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
827 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
828 {
829 "value": "A String", # [Output Only] A warning data value corresponding to the key.
830 "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).
831 },
832 ],
833 },
834 ],
835 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
836 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
837 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
838 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700840 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
841 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
842 {
843 "message": "A String", # [Output Only] An optional, human-readable error message.
844 "code": "A String", # [Output Only] The error type identifier for this error.
845 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
846 },
847 ],
848 },
849 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
850 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800851 "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 -0700852 }</pre>
853</div>
854
855<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700857 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
858
859Args:
860 project: string, Project ID for this request. (required)
861 zone: string, The name of the zone for this request. (required)
862 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700863 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
864
865For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
866
867The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700868
869Returns:
870 An object of the form:
871
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700872 { # Represents an Operation resource.
873 #
874 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
875 #
876 # Operations can be global, regional or zonal.
877 # - For global operations, use the globalOperations resource.
878 # - For regional operations, use the regionOperations resource.
879 # - For zonal operations, use the zonalOperations resource.
880 #
881 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700882 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400884 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700885 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700887 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
888 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
889 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
890 "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.
891 "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.
892 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
893 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
894 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
895 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
896 {
897 "message": "A String", # [Output Only] A human-readable description of the warning code.
898 "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.
899 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
900 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
901 {
902 "value": "A String", # [Output Only] A warning data value corresponding to the key.
903 "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).
904 },
905 ],
906 },
907 ],
908 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
909 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
910 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
911 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700913 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
914 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
915 {
916 "message": "A String", # [Output Only] An optional, human-readable error message.
917 "code": "A String", # [Output Only] The error type identifier for this error.
918 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
919 },
920 ],
921 },
922 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
923 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800924 "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 -0700925 }</pre>
926</div>
927
928<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700929 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700930 <pre>Deletes an access config from an instance's network interface.
931
932Args:
933 project: string, Project ID for this request. (required)
934 zone: string, The name of the zone for this request. (required)
935 instance: string, The instance name for this request. (required)
936 accessConfig: string, The name of the access config to delete. (required)
937 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700938 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
939
940For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
941
942The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700943
944Returns:
945 An object of the form:
946
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700947 { # Represents an Operation resource.
948 #
949 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
950 #
951 # Operations can be global, regional or zonal.
952 # - For global operations, use the globalOperations resource.
953 # - For regional operations, use the regionOperations resource.
954 # - For zonal operations, use the zonalOperations resource.
955 #
956 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700957 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400959 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700960 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700961 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700962 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
963 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
964 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
965 "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.
966 "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.
967 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
968 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
969 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
970 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
971 {
972 "message": "A String", # [Output Only] A human-readable description of the warning code.
973 "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.
974 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
975 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
976 {
977 "value": "A String", # [Output Only] A warning data value corresponding to the key.
978 "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).
979 },
980 ],
981 },
982 ],
983 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
984 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
985 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
986 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700987 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700988 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
989 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
990 {
991 "message": "A String", # [Output Only] An optional, human-readable error message.
992 "code": "A String", # [Output Only] The error type identifier for this error.
993 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
994 },
995 ],
996 },
997 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
998 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800999 "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 -07001000 }</pre>
1001</div>
1002
1003<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001004 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001005 <pre>Detaches a disk from an instance.
1006
1007Args:
1008 project: string, Project ID for this request. (required)
1009 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001010 instance: string, Instance name for this request. (required)
1011 deviceName: string, The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. (required)
1012 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1013
1014For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1015
1016The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001017
1018Returns:
1019 An object of the form:
1020
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001021 { # Represents an Operation resource.
1022 #
1023 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1024 #
1025 # Operations can be global, regional or zonal.
1026 # - For global operations, use the globalOperations resource.
1027 # - For regional operations, use the regionOperations resource.
1028 # - For zonal operations, use the zonalOperations resource.
1029 #
1030 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001031 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001032 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001033 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001034 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001035 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001036 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1037 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1038 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1039 "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.
1040 "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.
1041 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1042 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1043 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1044 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1045 {
1046 "message": "A String", # [Output Only] A human-readable description of the warning code.
1047 "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.
1048 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1049 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1050 {
1051 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1052 "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).
1053 },
1054 ],
1055 },
1056 ],
1057 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1058 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1059 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1060 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001061 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001062 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1063 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1064 {
1065 "message": "A String", # [Output Only] An optional, human-readable error message.
1066 "code": "A String", # [Output Only] The error type identifier for this error.
1067 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1068 },
1069 ],
1070 },
1071 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1072 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001073 "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 -07001074 }</pre>
1075</div>
1076
1077<div class="method">
1078 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001080
1081Args:
1082 project: string, Project ID for this request. (required)
1083 zone: string, The name of the zone for this request. (required)
1084 instance: string, Name of the instance resource to return. (required)
1085
1086Returns:
1087 An object of the form:
1088
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001089 { # Represents an Instance resource.
1090 #
1091 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for beta.instances ==) (== resource_for v1.instances ==)
1092 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
1093 "reservationAffinity": { # AllocationAffinity is the configuration of desired allocation which this instance could take capacity from. # The configuration of desired reservations from which this Instance can consume capacity from.
1094 "values": [ # Corresponds to the label values of reservation resource.
1095 "A String",
1096 ],
1097 "key": "A String", # Corresponds to the label key of reservation resource.
1098 "consumeReservationType": "A String", # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
1099 },
1100 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001101 { # A specification of the type and number of accelerator cards attached to the instance.
1102 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001103 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001104 },
1105 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001106 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001107 "a_key": "A String",
1108 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001109 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
1110 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
1111 },
1112 "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Sets the scheduling options for this instance.
1113 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001114 "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.
1115 #
1116 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001117 "nodeAffinities": [ # A set of node affinity and anti-affinity.
1118 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1119 "operator": "A String", # Defines the operation of node selection.
1120 "values": [ # Corresponds to the label values of Node resource.
1121 "A String",
1122 ],
1123 "key": "A String", # Corresponds to the label key of Node resource.
1124 },
1125 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001126 "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.
1127 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001128 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001129 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
1130 #
1131 # 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.
1132 { # A service account.
1133 "scopes": [ # The list of scopes to be made available for this service account.
1134 "A String",
1135 ],
1136 "email": "A String", # Email address of the service account.
1137 },
1138 ],
1139 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1140 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001141 "networkInterfaces": [ # An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001142 { # A network interface resource attached to an instance.
1143 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001144 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001145 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001146 "subnetworkRangeName": "A String", # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
1147 "ipCidrRange": "A String", # The IP alias ranges to allocate for this interface. 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 (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001148 },
1149 ],
1150 "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.
1151 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001152 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1153 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1154 # - projects/project/global/networks/network
1155 # - global/networks/default
1156 "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.
1157 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1158 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001159 "name": "A String", # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
1160 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1161 #
1162 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1163 #
1164 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001165 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001166 "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.
1167 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1168 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001169 },
1170 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001171 "networkIP": "A String", # An IPv4 internal IP 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.
1172 "fingerprint": "A String", # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
1173 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001174 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1175 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001176 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001177 },
1178 ],
1179 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001180 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
1181 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1182 },
1183 "shieldedInstanceConfig": { # A set of Shielded Instance options.
1184 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1185 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1186 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1187 },
1188 "zone": "A String", # [Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1189 "hostname": "A String",
1190 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
1191 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1192 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001193 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1194 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1195 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1196 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001197 "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 262144 bytes (256 KiB).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001198 "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.
1199 },
1200 ],
1201 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001202 "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, otherwise the request will fail with error 412 conditionNotMet.
1203 #
1204 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001205 },
1206 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001208 "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.
1209 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001210 "tags": { # A set of instance tags. # 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. Multiple tags can be specified via the 'tags.items' field.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001211 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1212 "A String",
1213 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001214 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001215 #
1216 # To see the latest fingerprint, make get() request to the instance.
1217 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001218 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001219 #
1220 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001221 "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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001222 # zones/us-central1-f/machineTypes/n1-standard-1
1223 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001224 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001225 # 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):
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001226 # zones/zone/machineTypes/custom-CPUS-MEMORY
1227 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001228 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001229 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1230 #
1231 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001232 "shieldedVmConfig": { # A set of Shielded VM options.
1233 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1234 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1235 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1236 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001237 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001238 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001239 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1240 { # An instance-attached disk resource.
1241 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1242 #
1243 # 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.
1244 #
1245 # 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.
1246 #
1247 # 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.
1248 #
1249 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1250 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1251 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1252 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1253 #
1254 # The key must meet the following requirements before you can provide it to Compute Engine:
1255 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001256 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001257 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001258 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001259 },
1260 "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.
1261 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001262 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001263 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1264 "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.
1265 #
1266 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1267 #
1268 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001269 "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.
1270 #
1271 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1272 # global/snapshots/my-backup
1273 #
1274 #
1275 # If the source snapshot is deleted later, this field will not be set.
1276 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
1277 "description": "A String", # An optional description. Provide this property when creating the disk.
1278 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
1279 "a_key": "A String",
1280 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001281 "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.
1282 #
1283 # 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.
1284 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1285 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1286 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1287 #
1288 # The key must meet the following requirements before you can provide it to Compute Engine:
1289 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001291 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001292 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001293 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001294 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001295 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1296 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001297 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001298 # 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:
1299 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1300 # - projects/project/zones/zone/diskTypes/diskType
1301 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001302 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
1303 #
1304 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1305 { # Guest OS features.
1306 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1307 },
1308 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001309 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
1311 "A String",
1312 ],
1313 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001314 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001315 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
1316 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001317 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001318 #
1319 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001320 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001321 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001322 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001323 # To create a disk with a custom image that you created, specify the image name in the following format:
1324 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001325 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001326 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001327 # You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
1328 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001329 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001330 #
1331 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001332 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1333 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1334 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1335 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1336 #
1337 # The key must meet the following requirements before you can provide it to Compute Engine:
1338 # - The key is wrapped using a RSA public key certificate provided by Google.
1339 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1340 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1341 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1342 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001343 },
1344 "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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001345 "index": 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001346 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001347 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
1348 { # Guest OS features.
1349 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1350 },
1351 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001352 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1353 "A String",
1354 ],
1355 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 "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. TODO(b/131765817): Update documentation when NVME is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001357 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001358 "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 except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001359 #
1360 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1361 #
1362 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001363 },
1364 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001365 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001366 }</pre>
1367</div>
1368
1369<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001370 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</code>
1371 <pre>Returns the specified guest attributes entry.
1372
1373Args:
1374 project: string, Project ID for this request. (required)
1375 zone: string, The name of the zone for this request. (required)
1376 instance: string, Name of the instance scoping this request. (required)
1377 variableKey: string, Specifies the key for the guest attributes entry.
1378 queryPath: string, Specifies the guest attributes path to be queried.
1379
1380Returns:
1381 An object of the form:
1382
1383 { # A guest attributes entry.
1384 "kind": "compute#guestAttributes", # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
1385 "variableKey": "A String", # The key to search for.
1386 "queryValue": { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
1387 "items": [
1388 { # A guest attributes namespace/key/value entry.
1389 "namespace": "A String", # Namespace for the guest attribute entry.
1390 "value": "A String", # Value for the guest attribute entry.
1391 "key": "A String", # Key for the guest attribute entry.
1392 },
1393 ],
1394 },
1395 "variableValue": "A String", # [Output Only] The value found for the requested key.
1396 "queryPath": "A String", # The path to be queried. This can be the default namespace ('/') or a nested namespace ('//') or a specified key ('//')
1397 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1398 }</pre>
1399</div>
1400
1401<div class="method">
1402 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
1403 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1404
1405Args:
1406 project: string, Project ID for this request. (required)
1407 zone: string, The name of the zone for this request. (required)
1408 resource: string, Name or id of the resource for this request. (required)
1409
1410Returns:
1411 An object of the form:
1412
1413 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
1414 #
1415 #
1416 #
1417 # 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.
1418 #
1419 # **JSON Example**
1420 #
1421 # { "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"] } ] }
1422 #
1423 # **YAML Example**
1424 #
1425 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
1426 #
1427 #
1428 #
1429 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
1430 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1431 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
1432 #
1433 # 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 AuditLogConfig are exempted.
1434 #
1435 # Example Policy with multiple AuditConfigs:
1436 #
1437 # { "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" ] } ] } ] }
1438 #
1439 # 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.
1440 "exemptedMembers": [
1441 "A String",
1442 ],
1443 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1444 { # Provides the configuration for logging a type of permissions. Example:
1445 #
1446 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
1447 #
1448 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
1449 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1450 "A String",
1451 ],
1452 "logType": "A String", # The log type that this config enables.
1453 },
1454 ],
1455 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
1456 },
1457 ],
1458 "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.
1459 { # A rule to be applied in a Policy.
1460 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1461 { # Specifies what kind of log the caller must write
1462 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1463 #
1464 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
1465 #
1466 # Field names correspond to IAM request parameters and field values are their respective values.
1467 #
1468 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
1469 #
1470 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
1471 #
1472 # At this time we do not support multiple field names (though this may be supported in the future).
1473 "field": "A String", # The field value to attribute.
1474 "metric": "A String", # The metric to update.
1475 },
1476 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
1477 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
1478 },
1479 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1480 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1481 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1482 "permissionType": "A String", # The type of the permission that was checked.
1483 },
1484 },
1485 },
1486 ],
1487 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1488 "A String",
1489 ],
1490 "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.
1491 "A String",
1492 ],
1493 "action": "A String", # Required
1494 "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.
1495 "A String",
1496 ],
1497 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1498 { # A condition to be met.
1499 "iam": "A String", # Trusted attributes supplied by the IAM system.
1500 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1501 "values": [ # The objects of the condition.
1502 "A String",
1503 ],
1504 "svc": "A String", # Trusted attributes discharged by the service.
1505 "op": "A String", # An operator to apply the subject with.
1506 },
1507 ],
1508 "description": "A String", # Human-readable description of the rule.
1509 },
1510 ],
1511 "version": 42, # Deprecated.
1512 "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.
1513 #
1514 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
1515 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
1516 { # Associates `members` with a `role`.
1517 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1518 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1519 #
1520 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1521 #
1522 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1523 #
1524 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
1525 #
1526 #
1527 #
1528 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1529 #
1530 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1531 #
1532 #
1533 #
1534 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1535 "A String",
1536 ],
1537 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
1538 #
1539 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
1540 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1541 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
1542 #
1543 # The application context of the containing message determines which well-known feature set of CEL is supported.
1544 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1545 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1546 },
1547 },
1548 ],
1549 "iamOwned": True or False,
1550 }</pre>
1551</div>
1552
1553<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001554 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001555 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001556
1557Args:
1558 project: string, Project ID for this request. (required)
1559 zone: string, The name of the zone for this request. (required)
1560 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001561 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 -07001562 port: integer, Specifies which COM or serial port to retrieve data from.
1563
1564Returns:
1565 An object of the form:
1566
1567 { # An instance's serial console output.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001568 "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 -07001569 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
1570 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1571 "contents": "A String", # [Output Only] The contents of the console output.
1572 "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.
1573 }</pre>
1574</div>
1575
1576<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001577 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
1578 <pre>Returns the Shielded Instance Identity of an instance
1579
1580Args:
1581 project: string, Project ID for this request. (required)
1582 zone: string, The name of the zone for this request. (required)
1583 instance: string, Name or id of the instance scoping this request. (required)
1584
1585Returns:
1586 An object of the form:
1587
1588 { # A shielded Instance identity entry.
1589 "signingKey": { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded Instance's vTPM.
1590 "ekPub": "A String", # A PEM-encoded public key.
1591 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
1592 },
1593 "kind": "compute#shieldedInstanceIdentity", # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
1594 "encryptionKey": { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded Instance's vTPM.
1595 "ekPub": "A String", # A PEM-encoded public key.
1596 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
1597 },
1598 }</pre>
1599</div>
1600
1601<div class="method">
1602 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
1603 <pre>Returns the Shielded VM Identity of an instance
1604
1605Args:
1606 project: string, Project ID for this request. (required)
1607 zone: string, The name of the zone for this request. (required)
1608 instance: string, Name of the instance scoping this request. (required)
1609
1610Returns:
1611 An object of the form:
1612
1613 { # A shielded VM identity entry.
1614 "signingKey": { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM's vTPM.
1615 "ekPub": "A String", # A PEM-encoded public key.
1616 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
1617 },
1618 "kind": "compute#shieldedVmIdentity", # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
1619 "encryptionKey": { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM's vTPM.
1620 "ekPub": "A String", # A PEM-encoded public key.
1621 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
1622 },
1623 }</pre>
1624</div>
1625
1626<div class="method">
1627 <code class="details" id="insert">insert(project, zone, body, sourceInstanceTemplate=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001628 <pre>Creates an instance resource in the specified project using the data included in the request.
1629
1630Args:
1631 project: string, Project ID for this request. (required)
1632 zone: string, The name of the zone for this request. (required)
1633 body: object, The request body. (required)
1634 The object takes the form of:
1635
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001636{ # Represents an Instance resource.
1637 #
1638 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for beta.instances ==) (== resource_for v1.instances ==)
1639 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
1640 "reservationAffinity": { # AllocationAffinity is the configuration of desired allocation which this instance could take capacity from. # The configuration of desired reservations from which this Instance can consume capacity from.
1641 "values": [ # Corresponds to the label values of reservation resource.
1642 "A String",
1643 ],
1644 "key": "A String", # Corresponds to the label key of reservation resource.
1645 "consumeReservationType": "A String", # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
1646 },
1647 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001648 { # A specification of the type and number of accelerator cards attached to the instance.
1649 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001650 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001651 },
1652 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001653 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001654 "a_key": "A String",
1655 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001656 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
1657 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
1658 },
1659 "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Sets the scheduling options for this instance.
1660 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001661 "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.
1662 #
1663 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001664 "nodeAffinities": [ # A set of node affinity and anti-affinity.
1665 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1666 "operator": "A String", # Defines the operation of node selection.
1667 "values": [ # Corresponds to the label values of Node resource.
1668 "A String",
1669 ],
1670 "key": "A String", # Corresponds to the label key of Node resource.
1671 },
1672 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001673 "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.
1674 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001675 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001676 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
1677 #
1678 # 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.
1679 { # A service account.
1680 "scopes": [ # The list of scopes to be made available for this service account.
1681 "A String",
1682 ],
1683 "email": "A String", # Email address of the service account.
1684 },
1685 ],
1686 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1687 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001688 "networkInterfaces": [ # An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001689 { # A network interface resource attached to an instance.
1690 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001691 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001692 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001693 "subnetworkRangeName": "A String", # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
1694 "ipCidrRange": "A String", # The IP alias ranges to allocate for this interface. 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 (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001695 },
1696 ],
1697 "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.
1698 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001699 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1700 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1701 # - projects/project/global/networks/network
1702 # - global/networks/default
1703 "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.
1704 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1705 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001706 "name": "A String", # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
1707 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1708 #
1709 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1710 #
1711 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001712 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001713 "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.
1714 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1715 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001716 },
1717 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001718 "networkIP": "A String", # An IPv4 internal IP 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.
1719 "fingerprint": "A String", # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
1720 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001721 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1722 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001723 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001724 },
1725 ],
1726 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001727 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
1728 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1729 },
1730 "shieldedInstanceConfig": { # A set of Shielded Instance options.
1731 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1732 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1733 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1734 },
1735 "zone": "A String", # [Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1736 "hostname": "A String",
1737 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
1738 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1739 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001740 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1741 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1742 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1743 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001744 "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 262144 bytes (256 KiB).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001745 "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.
1746 },
1747 ],
1748 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001749 "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, otherwise the request will fail with error 412 conditionNotMet.
1750 #
1751 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001752 },
1753 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001754 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001755 "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.
1756 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001757 "tags": { # A set of instance tags. # 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. Multiple tags can be specified via the 'tags.items' field.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001758 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1759 "A String",
1760 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001761 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001762 #
1763 # To see the latest fingerprint, make get() request to the instance.
1764 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001765 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001766 #
1767 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001768 "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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001769 # zones/us-central1-f/machineTypes/n1-standard-1
1770 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001771 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001772 # 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):
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001773 # zones/zone/machineTypes/custom-CPUS-MEMORY
1774 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001775 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001776 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1777 #
1778 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001779 "shieldedVmConfig": { # A set of Shielded VM options.
1780 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1781 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1782 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1783 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001784 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001785 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001786 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1787 { # An instance-attached disk resource.
1788 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1789 #
1790 # 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.
1791 #
1792 # 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.
1793 #
1794 # 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.
1795 #
1796 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1797 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1798 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1799 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1800 #
1801 # The key must meet the following requirements before you can provide it to Compute Engine:
1802 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001803 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001804 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001805 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001806 },
1807 "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.
1808 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001809 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001810 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1811 "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.
1812 #
1813 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1814 #
1815 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001816 "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.
1817 #
1818 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1819 # global/snapshots/my-backup
1820 #
1821 #
1822 # If the source snapshot is deleted later, this field will not be set.
1823 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
1824 "description": "A String", # An optional description. Provide this property when creating the disk.
1825 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
1826 "a_key": "A String",
1827 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001828 "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.
1829 #
1830 # 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.
1831 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1832 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1833 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1834 #
1835 # The key must meet the following requirements before you can provide it to Compute Engine:
1836 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001837 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001838 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001839 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001840 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001841 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001842 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1843 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001844 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001845 # 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:
1846 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1847 # - projects/project/zones/zone/diskTypes/diskType
1848 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001849 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
1850 #
1851 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1852 { # Guest OS features.
1853 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1854 },
1855 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001856 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001857 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
1858 "A String",
1859 ],
1860 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001861 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001862 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
1863 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001864 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001865 #
1866 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001867 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001868 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001869 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001870 # To create a disk with a custom image that you created, specify the image name in the following format:
1871 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001872 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001873 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001874 # You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
1875 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001876 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001877 #
1878 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001879 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1880 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1881 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1882 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1883 #
1884 # The key must meet the following requirements before you can provide it to Compute Engine:
1885 # - The key is wrapped using a RSA public key certificate provided by Google.
1886 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1887 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1888 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1889 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001890 },
1891 "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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001892 "index": 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001893 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001894 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
1895 { # Guest OS features.
1896 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1897 },
1898 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001899 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1900 "A String",
1901 ],
1902 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001903 "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. TODO(b/131765817): Update documentation when NVME is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001904 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001905 "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 except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001906 #
1907 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1908 #
1909 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001910 },
1911 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001912 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001913}
1914
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001915 sourceInstanceTemplate: string, Specifies instance template to create the instance.
1916
1917This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
1918- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
1919- projects/project/global/instanceTemplates/instanceTemplate
1920- global/instanceTemplates/instanceTemplate
1921 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1922
1923For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1924
1925The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001926
1927Returns:
1928 An object of the form:
1929
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001930 { # Represents an Operation resource.
1931 #
1932 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1933 #
1934 # Operations can be global, regional or zonal.
1935 # - For global operations, use the globalOperations resource.
1936 # - For regional operations, use the regionOperations resource.
1937 # - For zonal operations, use the zonalOperations resource.
1938 #
1939 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001940 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001941 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001942 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001943 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001944 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001945 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1946 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1947 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1948 "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.
1949 "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.
1950 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1951 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1952 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1953 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1954 {
1955 "message": "A String", # [Output Only] A human-readable description of the warning code.
1956 "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.
1957 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1958 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1959 {
1960 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1961 "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).
1962 },
1963 ],
1964 },
1965 ],
1966 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1967 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1968 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1969 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001970 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001971 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1972 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1973 {
1974 "message": "A String", # [Output Only] An optional, human-readable error message.
1975 "code": "A String", # [Output Only] The error type identifier for this error.
1976 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1977 },
1978 ],
1979 },
1980 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1981 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001982 "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 -07001983 }</pre>
1984</div>
1985
1986<div class="method">
1987 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
1988 <pre>Retrieves the list of instances contained within the specified zone.
1989
1990Args:
1991 project: string, Project ID for this request. (required)
1992 zone: string, The name of the zone for this request. (required)
1993 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1994
1995You 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.
1996
1997Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001998 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 -07001999 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002000 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002001
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002002For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002003
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002004You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002005
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002006To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002007
2008Returns:
2009 An object of the form:
2010
2011 { # Contains a list of instances.
2012 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002013 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
2014 "items": [ # A list of Instance resources.
2015 { # Represents an Instance resource.
2016 #
2017 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for beta.instances ==) (== resource_for v1.instances ==)
2018 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
2019 "reservationAffinity": { # AllocationAffinity is the configuration of desired allocation which this instance could take capacity from. # The configuration of desired reservations from which this Instance can consume capacity from.
2020 "values": [ # Corresponds to the label values of reservation resource.
2021 "A String",
2022 ],
2023 "key": "A String", # Corresponds to the label key of reservation resource.
2024 "consumeReservationType": "A String", # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
2025 },
2026 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002027 { # A specification of the type and number of accelerator cards attached to the instance.
2028 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002029 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002030 },
2031 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002032 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002033 "a_key": "A String",
2034 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002035 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
2036 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
2037 },
2038 "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Sets the scheduling options for this instance.
2039 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002040 "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.
2041 #
2042 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002043 "nodeAffinities": [ # A set of node affinity and anti-affinity.
2044 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2045 "operator": "A String", # Defines the operation of node selection.
2046 "values": [ # Corresponds to the label values of Node resource.
2047 "A String",
2048 ],
2049 "key": "A String", # Corresponds to the label key of Node resource.
2050 },
2051 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002052 "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.
2053 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002054 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002055 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
2056 #
2057 # 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.
2058 { # A service account.
2059 "scopes": [ # The list of scopes to be made available for this service account.
2060 "A String",
2061 ],
2062 "email": "A String", # Email address of the service account.
2063 },
2064 ],
2065 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2066 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002067 "networkInterfaces": [ # An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002068 { # A network interface resource attached to an instance.
2069 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002070 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002071 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002072 "subnetworkRangeName": "A String", # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
2073 "ipCidrRange": "A String", # The IP alias ranges to allocate for this interface. 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 (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002074 },
2075 ],
2076 "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.
2077 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002078 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2079 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2080 # - projects/project/global/networks/network
2081 # - global/networks/default
2082 "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.
2083 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
2084 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002085 "name": "A String", # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
2086 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2087 #
2088 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2089 #
2090 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002091 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002092 "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.
2093 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2094 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002095 },
2096 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002097 "networkIP": "A String", # An IPv4 internal IP 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.
2098 "fingerprint": "A String", # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
2099 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002100 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2101 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002102 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002103 },
2104 ],
2105 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002106 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
2107 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2108 },
2109 "shieldedInstanceConfig": { # A set of Shielded Instance options.
2110 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2111 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2112 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2113 },
2114 "zone": "A String", # [Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
2115 "hostname": "A String",
2116 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
2117 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2118 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002119 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
2120 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2121 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2122 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002123 "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 262144 bytes (256 KiB).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002124 "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.
2125 },
2126 ],
2127 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002128 "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, otherwise the request will fail with error 412 conditionNotMet.
2129 #
2130 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002131 },
2132 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002133 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002134 "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.
2135 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002136 "tags": { # A set of instance tags. # 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. Multiple tags can be specified via the 'tags.items' field.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002137 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2138 "A String",
2139 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002140 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002141 #
2142 # To see the latest fingerprint, make get() request to the instance.
2143 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002144 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002145 #
2146 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002147 "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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002148 # zones/us-central1-f/machineTypes/n1-standard-1
2149 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002150 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002151 # 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):
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002152 # zones/zone/machineTypes/custom-CPUS-MEMORY
2153 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002154 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002155 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2156 #
2157 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002158 "shieldedVmConfig": { # A set of Shielded VM options.
2159 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2160 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2161 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2162 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002163 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002164 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002165 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
2166 { # An instance-attached disk resource.
2167 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
2168 #
2169 # 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.
2170 #
2171 # 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.
2172 #
2173 # 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.
2174 #
2175 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
2176 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2177 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2178 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2179 #
2180 # The key must meet the following requirements before you can provide it to Compute Engine:
2181 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002182 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002183 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002184 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002185 },
2186 "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.
2187 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002188 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002189 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2190 "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.
2191 #
2192 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2193 #
2194 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002195 "sourceSnapshot": "A String", # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.
2196 #
2197 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2198 # global/snapshots/my-backup
2199 #
2200 #
2201 # If the source snapshot is deleted later, this field will not be set.
2202 "diskName": "A String", # Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
2203 "description": "A String", # An optional description. Provide this property when creating the disk.
2204 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
2205 "a_key": "A String",
2206 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002207 "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.
2208 #
2209 # 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.
2210 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2211 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2212 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2213 #
2214 # The key must meet the following requirements before you can provide it to Compute Engine:
2215 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002216 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002217 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002218 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002219 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002220 "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:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002221 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2222 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002223 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002224 # 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:
2225 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2226 # - projects/project/zones/zone/diskTypes/diskType
2227 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002228 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
2229 #
2230 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2231 { # Guest OS features.
2232 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2233 },
2234 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002235 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002236 "resourcePolicies": [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
2237 "A String",
2238 ],
2239 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002240 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002241 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
2242 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002243 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002244 #
2245 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002246 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002247 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002248 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002249 # To create a disk with a custom image that you created, specify the image name in the following format:
2250 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002251 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002252 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002253 # You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
2254 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002255 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002256 #
2257 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002258 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2259 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2260 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2261 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2262 #
2263 # The key must meet the following requirements before you can provide it to Compute Engine:
2264 # - The key is wrapped using a RSA public key certificate provided by Google.
2265 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2266 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2267 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2268 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002269 },
2270 "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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002271 "index": 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002272 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002273 "guestOsFeatures": [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
2274 { # Guest OS features.
2275 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2276 },
2277 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002278 "licenses": [ # [Output Only] Any valid publicly visible licenses.
2279 "A String",
2280 ],
2281 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002282 "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. TODO(b/131765817): Update documentation when NVME is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002283 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002284 "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 except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002285 #
2286 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2287 #
2288 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002289 },
2290 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002291 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002292 },
2293 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002294 "warning": { # [Output Only] Informational warning message.
2295 "message": "A String", # [Output Only] A human-readable description of the warning code.
2296 "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.
2297 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2298 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2299 {
2300 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2301 "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).
2302 },
2303 ],
2304 },
2305 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002306 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2307 }</pre>
2308</div>
2309
2310<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002311 <code class="details" id="listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, maxResults=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002312 <pre>Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002313
2314Args:
2315 project: string, Project ID for this request. (required)
2316 zone: string, The name of the zone for this request. (required)
2317 instance: string, Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. (required)
2318 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2319
2320You 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.
2321
2322Currently, only sorting by name or creationTimestamp desc is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002323 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002324
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002325For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002326
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002327You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002328
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002329To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002330 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)
2331 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.
2332
2333Returns:
2334 An object of the form:
2335
2336 { # Contains a list of instance referrers.
2337 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002338 "kind": "compute#instanceListReferrers", # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
2339 "items": [ # A list of Reference resources.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002340 { # Represents a reference to a resource.
2341 "referrer": "A String", # URL of the resource which refers to the target.
2342 "kind": "compute#reference", # [Output Only] Type of the resource. Always compute#reference for references.
2343 "referenceType": "A String", # A description of the reference type with no implied semantics. Possible values include:
2344 # - MEMBER_OF
2345 "target": "A String", # URL of the resource to which this reference points.
2346 },
2347 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002348 "warning": { # [Output Only] Informational warning message.
2349 "message": "A String", # [Output Only] A human-readable description of the warning code.
2350 "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.
2351 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2352 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2353 {
2354 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2355 "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).
2356 },
2357 ],
2358 },
2359 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002360 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2361 }</pre>
2362</div>
2363
2364<div class="method">
2365 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
2366 <pre>Retrieves the next page of results.
2367
2368Args:
2369 previous_request: The request for the previous page. (required)
2370 previous_response: The response from the request for the previous page. (required)
2371
2372Returns:
2373 A request object that you can call 'execute()' on to request the next
2374 page. Returns None if there are no more items in the collection.
2375 </pre>
2376</div>
2377
2378<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002379 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2380 <pre>Retrieves the next page of results.
2381
2382Args:
2383 previous_request: The request for the previous page. (required)
2384 previous_response: The response from the request for the previous page. (required)
2385
2386Returns:
2387 A request object that you can call 'execute()' on to request the next
2388 page. Returns None if there are no more items in the collection.
2389 </pre>
2390</div>
2391
2392<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002393 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
2394 <pre>Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002395
2396Args:
2397 project: string, Project ID for this request. (required)
2398 zone: string, The name of the zone for this request. (required)
2399 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002400 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2401
2402For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2403
2404The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002405
2406Returns:
2407 An object of the form:
2408
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002409 { # Represents an Operation resource.
2410 #
2411 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2412 #
2413 # Operations can be global, regional or zonal.
2414 # - For global operations, use the globalOperations resource.
2415 # - For regional operations, use the regionOperations resource.
2416 # - For zonal operations, use the zonalOperations resource.
2417 #
2418 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002419 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002420 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002421 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002422 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002423 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002424 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2425 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2426 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2427 "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.
2428 "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.
2429 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2430 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2431 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2432 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2433 {
2434 "message": "A String", # [Output Only] A human-readable description of the warning code.
2435 "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.
2436 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2437 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2438 {
2439 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2440 "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).
2441 },
2442 ],
2443 },
2444 ],
2445 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2446 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2447 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2448 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002449 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002450 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2451 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2452 {
2453 "message": "A String", # [Output Only] An optional, human-readable error message.
2454 "code": "A String", # [Output Only] The error type identifier for this error.
2455 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2456 },
2457 ],
2458 },
2459 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2460 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002461 "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 -07002462 }</pre>
2463</div>
2464
2465<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002466 <code class="details" id="resume">resume(project, zone, instance, body, requestId=None)</code>
2467 <pre>Resumes an instance that was suspended using the instances().suspend method.
2468
2469Args:
2470 project: string, Project ID for this request. (required)
2471 zone: string, The name of the zone for this request. (required)
2472 instance: string, Name of the instance resource to resume. (required)
2473 body: object, The request body. (required)
2474 The object takes the form of:
2475
2476{
2477 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
2478 #
2479 # If the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance resume will not succeed.
2480 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2481 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2482 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2483 #
2484 # The key must meet the following requirements before you can provide it to Compute Engine:
2485 # - The key is wrapped using a RSA public key certificate provided by Google.
2486 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2487 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2488 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2489 },
2490 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
2491 #
2492 # In order to resume the instance, the disk url and its corresponding key must be provided.
2493 #
2494 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
2495 {
2496 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
2497 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2498 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2499 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2500 #
2501 # The key must meet the following requirements before you can provide it to Compute Engine:
2502 # - The key is wrapped using a RSA public key certificate provided by Google.
2503 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2504 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2505 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2506 },
2507 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
2508 },
2509 ],
2510 }
2511
2512 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2513
2514For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2515
2516The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2517
2518Returns:
2519 An object of the form:
2520
2521 { # Represents an Operation resource.
2522 #
2523 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2524 #
2525 # Operations can be global, regional or zonal.
2526 # - For global operations, use the globalOperations resource.
2527 # - For regional operations, use the regionOperations resource.
2528 # - For zonal operations, use the zonalOperations resource.
2529 #
2530 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
2531 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2532 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2533 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2534 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2535 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2536 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2537 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2538 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2539 "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.
2540 "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.
2541 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2542 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2543 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2544 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2545 {
2546 "message": "A String", # [Output Only] A human-readable description of the warning code.
2547 "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.
2548 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2549 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2550 {
2551 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2552 "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).
2553 },
2554 ],
2555 },
2556 ],
2557 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2558 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2559 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2560 "name": "A String", # [Output Only] Name of the resource.
2561 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2562 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2563 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2564 {
2565 "message": "A String", # [Output Only] An optional, human-readable error message.
2566 "code": "A String", # [Output Only] The error type identifier for this error.
2567 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2568 },
2569 ],
2570 },
2571 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2572 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2573 "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.
2574 }</pre>
2575</div>
2576
2577<div class="method">
2578 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
2579 <pre>Sets deletion protection on the instance.
2580
2581Args:
2582 project: string, Project ID for this request. (required)
2583 zone: string, The name of the zone for this request. (required)
2584 resource: string, Name or id of the resource for this request. (required)
2585 deletionProtection: boolean, Whether the resource should be protected against deletion.
2586 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2587
2588For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2589
2590The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2591
2592Returns:
2593 An object of the form:
2594
2595 { # Represents an Operation resource.
2596 #
2597 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2598 #
2599 # Operations can be global, regional or zonal.
2600 # - For global operations, use the globalOperations resource.
2601 # - For regional operations, use the regionOperations resource.
2602 # - For zonal operations, use the zonalOperations resource.
2603 #
2604 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
2605 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2606 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2607 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2608 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2609 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2610 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2611 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2612 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2613 "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.
2614 "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.
2615 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2616 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2617 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2618 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2619 {
2620 "message": "A String", # [Output Only] A human-readable description of the warning code.
2621 "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.
2622 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2623 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2624 {
2625 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2626 "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).
2627 },
2628 ],
2629 },
2630 ],
2631 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2632 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2633 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2634 "name": "A String", # [Output Only] Name of the resource.
2635 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2636 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2637 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2638 {
2639 "message": "A String", # [Output Only] An optional, human-readable error message.
2640 "code": "A String", # [Output Only] The error type identifier for this error.
2641 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2642 },
2643 ],
2644 },
2645 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2646 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2647 "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.
2648 }</pre>
2649</div>
2650
2651<div class="method">
2652 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002653 <pre>Sets the auto-delete flag for a disk attached to an instance.
2654
2655Args:
2656 project: string, Project ID for this request. (required)
2657 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002658 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002659 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002660 deviceName: string, The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. (required)
2661 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2662
2663For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2664
2665The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002666
2667Returns:
2668 An object of the form:
2669
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002670 { # Represents an Operation resource.
2671 #
2672 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2673 #
2674 # Operations can be global, regional or zonal.
2675 # - For global operations, use the globalOperations resource.
2676 # - For regional operations, use the regionOperations resource.
2677 # - For zonal operations, use the zonalOperations resource.
2678 #
2679 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002680 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002681 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002682 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002683 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002684 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002685 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2686 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2687 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2688 "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.
2689 "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.
2690 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2691 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2692 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2693 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2694 {
2695 "message": "A String", # [Output Only] A human-readable description of the warning code.
2696 "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.
2697 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2698 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2699 {
2700 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2701 "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).
2702 },
2703 ],
2704 },
2705 ],
2706 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2707 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2708 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2709 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002710 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002711 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2712 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2713 {
2714 "message": "A String", # [Output Only] An optional, human-readable error message.
2715 "code": "A String", # [Output Only] The error type identifier for this error.
2716 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2717 },
2718 ],
2719 },
2720 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2721 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002722 "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 -07002723 }</pre>
2724</div>
2725
2726<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002727 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body)</code>
2728 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
2729
2730Args:
2731 project: string, Project ID for this request. (required)
2732 zone: string, The name of the zone for this request. (required)
2733 resource: string, Name or id of the resource for this request. (required)
2734 body: object, The request body. (required)
2735 The object takes the form of:
2736
2737{
2738 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
2739 #
2740 #
2741 #
2742 # 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.
2743 #
2744 # **JSON Example**
2745 #
2746 # { "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"] } ] }
2747 #
2748 # **YAML Example**
2749 #
2750 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
2751 #
2752 #
2753 #
2754 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
2755 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
2756 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
2757 #
2758 # 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 AuditLogConfig are exempted.
2759 #
2760 # Example Policy with multiple AuditConfigs:
2761 #
2762 # { "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" ] } ] } ] }
2763 #
2764 # 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.
2765 "exemptedMembers": [
2766 "A String",
2767 ],
2768 "auditLogConfigs": [ # The configuration for logging of each type of permission.
2769 { # Provides the configuration for logging a type of permissions. Example:
2770 #
2771 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
2772 #
2773 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
2774 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2775 "A String",
2776 ],
2777 "logType": "A String", # The log type that this config enables.
2778 },
2779 ],
2780 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
2781 },
2782 ],
2783 "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.
2784 { # A rule to be applied in a Policy.
2785 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2786 { # Specifies what kind of log the caller must write
2787 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
2788 #
2789 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
2790 #
2791 # Field names correspond to IAM request parameters and field values are their respective values.
2792 #
2793 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
2794 #
2795 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
2796 #
2797 # At this time we do not support multiple field names (though this may be supported in the future).
2798 "field": "A String", # The field value to attribute.
2799 "metric": "A String", # The metric to update.
2800 },
2801 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
2802 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
2803 },
2804 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
2805 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
2806 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2807 "permissionType": "A String", # The type of the permission that was checked.
2808 },
2809 },
2810 },
2811 ],
2812 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2813 "A String",
2814 ],
2815 "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.
2816 "A String",
2817 ],
2818 "action": "A String", # Required
2819 "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.
2820 "A String",
2821 ],
2822 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2823 { # A condition to be met.
2824 "iam": "A String", # Trusted attributes supplied by the IAM system.
2825 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2826 "values": [ # The objects of the condition.
2827 "A String",
2828 ],
2829 "svc": "A String", # Trusted attributes discharged by the service.
2830 "op": "A String", # An operator to apply the subject with.
2831 },
2832 ],
2833 "description": "A String", # Human-readable description of the rule.
2834 },
2835 ],
2836 "version": 42, # Deprecated.
2837 "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.
2838 #
2839 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
2840 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
2841 { # Associates `members` with a `role`.
2842 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2843 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2844 #
2845 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2846 #
2847 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2848 #
2849 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
2850 #
2851 #
2852 #
2853 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2854 #
2855 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2856 #
2857 #
2858 #
2859 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2860 "A String",
2861 ],
2862 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
2863 #
2864 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
2865 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
2866 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
2867 #
2868 # The application context of the containing message determines which well-known feature set of CEL is supported.
2869 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2870 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2871 },
2872 },
2873 ],
2874 "iamOwned": True or False,
2875 },
2876 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.
2877 { # Associates `members` with a `role`.
2878 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2879 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2880 #
2881 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2882 #
2883 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2884 #
2885 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
2886 #
2887 #
2888 #
2889 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2890 #
2891 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2892 #
2893 #
2894 #
2895 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2896 "A String",
2897 ],
2898 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
2899 #
2900 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
2901 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
2902 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
2903 #
2904 # The application context of the containing message determines which well-known feature set of CEL is supported.
2905 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2906 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2907 },
2908 },
2909 ],
2910 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
2911 }
2912
2913
2914Returns:
2915 An object of the form:
2916
2917 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
2918 #
2919 #
2920 #
2921 # 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.
2922 #
2923 # **JSON Example**
2924 #
2925 # { "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"] } ] }
2926 #
2927 # **YAML Example**
2928 #
2929 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
2930 #
2931 #
2932 #
2933 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
2934 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
2935 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
2936 #
2937 # 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 AuditLogConfig are exempted.
2938 #
2939 # Example Policy with multiple AuditConfigs:
2940 #
2941 # { "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" ] } ] } ] }
2942 #
2943 # 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.
2944 "exemptedMembers": [
2945 "A String",
2946 ],
2947 "auditLogConfigs": [ # The configuration for logging of each type of permission.
2948 { # Provides the configuration for logging a type of permissions. Example:
2949 #
2950 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
2951 #
2952 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
2953 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2954 "A String",
2955 ],
2956 "logType": "A String", # The log type that this config enables.
2957 },
2958 ],
2959 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
2960 },
2961 ],
2962 "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.
2963 { # A rule to be applied in a Policy.
2964 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2965 { # Specifies what kind of log the caller must write
2966 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
2967 #
2968 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
2969 #
2970 # Field names correspond to IAM request parameters and field values are their respective values.
2971 #
2972 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
2973 #
2974 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
2975 #
2976 # At this time we do not support multiple field names (though this may be supported in the future).
2977 "field": "A String", # The field value to attribute.
2978 "metric": "A String", # The metric to update.
2979 },
2980 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
2981 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
2982 },
2983 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
2984 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
2985 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2986 "permissionType": "A String", # The type of the permission that was checked.
2987 },
2988 },
2989 },
2990 ],
2991 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2992 "A String",
2993 ],
2994 "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.
2995 "A String",
2996 ],
2997 "action": "A String", # Required
2998 "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.
2999 "A String",
3000 ],
3001 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3002 { # A condition to be met.
3003 "iam": "A String", # Trusted attributes supplied by the IAM system.
3004 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3005 "values": [ # The objects of the condition.
3006 "A String",
3007 ],
3008 "svc": "A String", # Trusted attributes discharged by the service.
3009 "op": "A String", # An operator to apply the subject with.
3010 },
3011 ],
3012 "description": "A String", # Human-readable description of the rule.
3013 },
3014 ],
3015 "version": 42, # Deprecated.
3016 "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.
3017 #
3018 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
3019 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
3020 { # Associates `members` with a `role`.
3021 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3022 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3023 #
3024 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3025 #
3026 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3027 #
3028 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
3029 #
3030 #
3031 #
3032 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3033 #
3034 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3035 #
3036 #
3037 #
3038 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3039 "A String",
3040 ],
3041 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
3042 #
3043 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
3044 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
3045 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
3046 #
3047 # The application context of the containing message determines which well-known feature set of CEL is supported.
3048 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
3049 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
3050 },
3051 },
3052 ],
3053 "iamOwned": True or False,
3054 }</pre>
3055</div>
3056
3057<div class="method">
3058 <code class="details" id="setLabels">setLabels(project, zone, instance, body, requestId=None)</code>
3059 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003060
3061Args:
3062 project: string, Project ID for this request. (required)
3063 zone: string, The name of the zone for this request. (required)
3064 instance: string, Name of the instance scoping this request. (required)
3065 body: object, The request body. (required)
3066 The object takes the form of:
3067
3068{
3069 "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 -04003070 "labels": {
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003071 "a_key": "A String",
3072 },
3073 }
3074
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003075 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3076
3077For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3078
3079The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003080
3081Returns:
3082 An object of the form:
3083
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003084 { # Represents an Operation resource.
3085 #
3086 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3087 #
3088 # Operations can be global, regional or zonal.
3089 # - For global operations, use the globalOperations resource.
3090 # - For regional operations, use the regionOperations resource.
3091 # - For zonal operations, use the zonalOperations resource.
3092 #
3093 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003094 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003095 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003096 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3097 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003098 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003099 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3100 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3101 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3102 "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.
3103 "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.
3104 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3105 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3106 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3107 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3108 {
3109 "message": "A String", # [Output Only] A human-readable description of the warning code.
3110 "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.
3111 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3112 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3113 {
3114 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3115 "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).
3116 },
3117 ],
3118 },
3119 ],
3120 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3121 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3122 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3123 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003124 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003125 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3126 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3127 {
3128 "message": "A String", # [Output Only] An optional, human-readable error message.
3129 "code": "A String", # [Output Only] The error type identifier for this error.
3130 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3131 },
3132 ],
3133 },
3134 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3135 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3136 "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.
3137 }</pre>
3138</div>
3139
3140<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003141 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003142 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
3143
3144Args:
3145 project: string, Project ID for this request. (required)
3146 zone: string, The name of the zone for this request. (required)
3147 instance: string, Name of the instance scoping this request. (required)
3148 body: object, The request body. (required)
3149 The object takes the form of:
3150
3151{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003152 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003153 { # A specification of the type and number of accelerator cards attached to the instance.
3154 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003155 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003156 },
3157 ],
3158 }
3159
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003160 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3161
3162For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3163
3164The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003165
3166Returns:
3167 An object of the form:
3168
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003169 { # Represents an Operation resource.
3170 #
3171 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3172 #
3173 # Operations can be global, regional or zonal.
3174 # - For global operations, use the globalOperations resource.
3175 # - For regional operations, use the regionOperations resource.
3176 # - For zonal operations, use the zonalOperations resource.
3177 #
3178 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003179 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003180 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003181 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003182 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003183 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003184 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3185 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3186 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3187 "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.
3188 "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.
3189 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3190 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3191 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3192 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3193 {
3194 "message": "A String", # [Output Only] A human-readable description of the warning code.
3195 "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.
3196 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3197 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3198 {
3199 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3200 "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).
3201 },
3202 ],
3203 },
3204 ],
3205 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3206 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3207 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3208 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003209 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003210 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3211 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3212 {
3213 "message": "A String", # [Output Only] An optional, human-readable error message.
3214 "code": "A String", # [Output Only] The error type identifier for this error.
3215 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3216 },
3217 ],
3218 },
3219 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3220 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003221 "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 -07003222 }</pre>
3223</div>
3224
3225<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003226 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003227 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
3228
3229Args:
3230 project: string, Project ID for this request. (required)
3231 zone: string, The name of the zone for this request. (required)
3232 instance: string, Name of the instance scoping this request. (required)
3233 body: object, The request body. (required)
3234 The object takes the form of:
3235
3236{
3237 "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
3238 }
3239
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003240 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3241
3242For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3243
3244The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003245
3246Returns:
3247 An object of the form:
3248
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003249 { # Represents an Operation resource.
3250 #
3251 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3252 #
3253 # Operations can be global, regional or zonal.
3254 # - For global operations, use the globalOperations resource.
3255 # - For regional operations, use the regionOperations resource.
3256 # - For zonal operations, use the zonalOperations resource.
3257 #
3258 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003259 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003260 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003261 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003262 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003263 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003264 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3265 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3266 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3267 "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.
3268 "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.
3269 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3270 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3271 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3272 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3273 {
3274 "message": "A String", # [Output Only] A human-readable description of the warning code.
3275 "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.
3276 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3277 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3278 {
3279 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3280 "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).
3281 },
3282 ],
3283 },
3284 ],
3285 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3286 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3287 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3288 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003289 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003290 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3291 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3292 {
3293 "message": "A String", # [Output Only] An optional, human-readable error message.
3294 "code": "A String", # [Output Only] The error type identifier for this error.
3295 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3296 },
3297 ],
3298 },
3299 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3300 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003301 "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 -07003302 }</pre>
3303</div>
3304
3305<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003306 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003307 <pre>Sets metadata for the specified instance to the data included in the request.
3308
3309Args:
3310 project: string, Project ID for this request. (required)
3311 zone: string, The name of the zone for this request. (required)
3312 instance: string, Name of the instance scoping this request. (required)
3313 body: object, The request body. (required)
3314 The object takes the form of:
3315
3316{ # A metadata key/value entry.
3317 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3318 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003319 "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 262144 bytes (256 KiB).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003320 "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.
3321 },
3322 ],
3323 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003324 "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, otherwise the request will fail with error 412 conditionNotMet.
3325 #
3326 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003327}
3328
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003329 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3330
3331For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3332
3333The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003334
3335Returns:
3336 An object of the form:
3337
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003338 { # Represents an Operation resource.
3339 #
3340 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3341 #
3342 # Operations can be global, regional or zonal.
3343 # - For global operations, use the globalOperations resource.
3344 # - For regional operations, use the regionOperations resource.
3345 # - For zonal operations, use the zonalOperations resource.
3346 #
3347 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003348 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003349 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003350 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003351 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003352 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003353 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3354 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3355 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3356 "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.
3357 "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.
3358 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3359 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3360 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3361 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3362 {
3363 "message": "A String", # [Output Only] A human-readable description of the warning code.
3364 "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.
3365 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3366 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3367 {
3368 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3369 "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).
3370 },
3371 ],
3372 },
3373 ],
3374 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3375 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3376 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3377 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003378 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003379 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3380 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3381 {
3382 "message": "A String", # [Output Only] An optional, human-readable error message.
3383 "code": "A String", # [Output Only] The error type identifier for this error.
3384 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3385 },
3386 ],
3387 },
3388 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3389 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003390 "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 -07003391 }</pre>
3392</div>
3393
3394<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003395 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003396 <pre>Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003397
3398Args:
3399 project: string, Project ID for this request. (required)
3400 zone: string, The name of the zone for this request. (required)
3401 instance: string, Name of the instance scoping this request. (required)
3402 body: object, The request body. (required)
3403 The object takes the form of:
3404
3405{
3406 "minCpuPlatform": "A String", # Minimum cpu/platform this instance should be started at.
3407 }
3408
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003409 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3410
3411For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3412
3413The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003414
3415Returns:
3416 An object of the form:
3417
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003418 { # Represents an Operation resource.
3419 #
3420 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3421 #
3422 # Operations can be global, regional or zonal.
3423 # - For global operations, use the globalOperations resource.
3424 # - For regional operations, use the regionOperations resource.
3425 # - For zonal operations, use the zonalOperations resource.
3426 #
3427 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003428 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003429 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003430 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3431 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003432 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003433 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3434 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3435 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3436 "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.
3437 "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.
3438 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3439 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3440 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3441 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3442 {
3443 "message": "A String", # [Output Only] A human-readable description of the warning code.
3444 "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.
3445 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3446 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3447 {
3448 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3449 "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).
3450 },
3451 ],
3452 },
3453 ],
3454 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3455 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3456 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3457 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003458 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003459 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3460 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3461 {
3462 "message": "A String", # [Output Only] An optional, human-readable error message.
3463 "code": "A String", # [Output Only] The error type identifier for this error.
3464 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3465 },
3466 ],
3467 },
3468 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3469 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3470 "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.
3471 }</pre>
3472</div>
3473
3474<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003475 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003476 <pre>Sets an instance's scheduling options.
3477
3478Args:
3479 project: string, Project ID for this request. (required)
3480 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003481 instance: string, Instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003482 body: object, The request body. (required)
3483 The object takes the form of:
3484
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003485{ # Sets the scheduling options for an Instance. NextID: 9
3486 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003487 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003488 #
3489 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003490 "nodeAffinities": [ # A set of node affinity and anti-affinity.
3491 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
3492 "operator": "A String", # Defines the operation of node selection.
3493 "values": [ # Corresponds to the label values of Node resource.
3494 "A String",
3495 ],
3496 "key": "A String", # Corresponds to the label key of Node resource.
3497 },
3498 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003499 "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.
3500}
3501
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003502 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3503
3504For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3505
3506The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003507
3508Returns:
3509 An object of the form:
3510
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003511 { # Represents an Operation resource.
3512 #
3513 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3514 #
3515 # Operations can be global, regional or zonal.
3516 # - For global operations, use the globalOperations resource.
3517 # - For regional operations, use the regionOperations resource.
3518 # - For zonal operations, use the zonalOperations resource.
3519 #
3520 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003521 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003522 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003523 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003524 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003525 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003526 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3527 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3528 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3529 "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.
3530 "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.
3531 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3532 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3533 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3534 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3535 {
3536 "message": "A String", # [Output Only] A human-readable description of the warning code.
3537 "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.
3538 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3539 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3540 {
3541 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3542 "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).
3543 },
3544 ],
3545 },
3546 ],
3547 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3548 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3549 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3550 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003551 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003552 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3553 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3554 {
3555 "message": "A String", # [Output Only] An optional, human-readable error message.
3556 "code": "A String", # [Output Only] The error type identifier for this error.
3557 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3558 },
3559 ],
3560 },
3561 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3562 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003563 "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.
3564 }</pre>
3565</div>
3566
3567<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003568 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003569 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003570
3571Args:
3572 project: string, Project ID for this request. (required)
3573 zone: string, The name of the zone for this request. (required)
3574 instance: string, Name of the instance resource to start. (required)
3575 body: object, The request body. (required)
3576 The object takes the form of:
3577
3578{
3579 "scopes": [ # The list of scopes to be made available for this service account.
3580 "A String",
3581 ],
3582 "email": "A String", # Email address of the service account.
3583 }
3584
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003585 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3586
3587For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3588
3589The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003590
3591Returns:
3592 An object of the form:
3593
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003594 { # Represents an Operation resource.
3595 #
3596 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3597 #
3598 # Operations can be global, regional or zonal.
3599 # - For global operations, use the globalOperations resource.
3600 # - For regional operations, use the regionOperations resource.
3601 # - For zonal operations, use the zonalOperations resource.
3602 #
3603 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003604 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003605 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003606 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003607 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003608 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003609 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3610 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3611 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3612 "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.
3613 "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.
3614 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3615 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3616 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3617 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3618 {
3619 "message": "A String", # [Output Only] A human-readable description of the warning code.
3620 "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.
3621 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3622 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3623 {
3624 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3625 "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).
3626 },
3627 ],
3628 },
3629 ],
3630 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3631 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3632 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3633 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003634 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003635 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3636 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3637 {
3638 "message": "A String", # [Output Only] An optional, human-readable error message.
3639 "code": "A String", # [Output Only] The error type identifier for this error.
3640 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3641 },
3642 ],
3643 },
3644 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3645 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3646 "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 -07003647 }</pre>
3648</div>
3649
3650<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003651 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body, requestId=None)</code>
3652 <pre>Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
3653
3654Args:
3655 project: string, Project ID for this request. (required)
3656 zone: string, The name of the zone for this request. (required)
3657 instance: string, Name or id of the instance scoping this request. (required)
3658 body: object, The request body. (required)
3659 The object takes the form of:
3660
3661{ # The policy describes the baseline against which Instance boot integrity is measured.
3662 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
3663 }
3664
3665 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3666
3667For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3668
3669The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3670
3671Returns:
3672 An object of the form:
3673
3674 { # Represents an Operation resource.
3675 #
3676 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3677 #
3678 # Operations can be global, regional or zonal.
3679 # - For global operations, use the globalOperations resource.
3680 # - For regional operations, use the regionOperations resource.
3681 # - For zonal operations, use the zonalOperations resource.
3682 #
3683 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
3684 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3685 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3686 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3687 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3688 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3689 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3690 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3691 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3692 "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.
3693 "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.
3694 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3695 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3696 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3697 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3698 {
3699 "message": "A String", # [Output Only] A human-readable description of the warning code.
3700 "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.
3701 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3702 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3703 {
3704 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3705 "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).
3706 },
3707 ],
3708 },
3709 ],
3710 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3711 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3712 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3713 "name": "A String", # [Output Only] Name of the resource.
3714 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3715 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3716 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3717 {
3718 "message": "A String", # [Output Only] An optional, human-readable error message.
3719 "code": "A String", # [Output Only] The error type identifier for this error.
3720 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3721 },
3722 ],
3723 },
3724 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3725 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3726 "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.
3727 }</pre>
3728</div>
3729
3730<div class="method">
3731 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body, requestId=None)</code>
3732 <pre>Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
3733
3734Args:
3735 project: string, Project ID for this request. (required)
3736 zone: string, The name of the zone for this request. (required)
3737 instance: string, Name of the instance scoping this request. (required)
3738 body: object, The request body. (required)
3739 The object takes the form of:
3740
3741{ # The policy describes the baseline against which VM instance boot integrity is measured.
3742 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
3743 }
3744
3745 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3746
3747For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3748
3749The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3750
3751Returns:
3752 An object of the form:
3753
3754 { # Represents an Operation resource.
3755 #
3756 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3757 #
3758 # Operations can be global, regional or zonal.
3759 # - For global operations, use the globalOperations resource.
3760 # - For regional operations, use the regionOperations resource.
3761 # - For zonal operations, use the zonalOperations resource.
3762 #
3763 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
3764 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3765 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3766 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3767 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3768 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3769 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3770 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3771 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3772 "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.
3773 "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.
3774 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3775 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3776 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3777 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3778 {
3779 "message": "A String", # [Output Only] A human-readable description of the warning code.
3780 "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.
3781 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3782 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3783 {
3784 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3785 "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).
3786 },
3787 ],
3788 },
3789 ],
3790 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3791 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3792 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3793 "name": "A String", # [Output Only] Name of the resource.
3794 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3795 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3796 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3797 {
3798 "message": "A String", # [Output Only] An optional, human-readable error message.
3799 "code": "A String", # [Output Only] The error type identifier for this error.
3800 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3801 },
3802 ],
3803 },
3804 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3805 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3806 "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.
3807 }</pre>
3808</div>
3809
3810<div class="method">
3811 <code class="details" id="setTags">setTags(project, zone, instance, body, requestId=None)</code>
3812 <pre>Sets network tags for the specified instance to the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003813
3814Args:
3815 project: string, Project ID for this request. (required)
3816 zone: string, The name of the zone for this request. (required)
3817 instance: string, Name of the instance scoping this request. (required)
3818 body: object, The request body. (required)
3819 The object takes the form of:
3820
3821{ # A set of instance tags.
3822 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3823 "A String",
3824 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003825 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003826 #
3827 # To see the latest fingerprint, make get() request to the instance.
3828}
3829
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003830 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3831
3832For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3833
3834The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003835
3836Returns:
3837 An object of the form:
3838
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003839 { # Represents an Operation resource.
3840 #
3841 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3842 #
3843 # Operations can be global, regional or zonal.
3844 # - For global operations, use the globalOperations resource.
3845 # - For regional operations, use the regionOperations resource.
3846 # - For zonal operations, use the zonalOperations resource.
3847 #
3848 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003849 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003850 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003851 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003852 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003853 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003854 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3855 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3856 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3857 "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.
3858 "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.
3859 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3860 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3861 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3862 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3863 {
3864 "message": "A String", # [Output Only] A human-readable description of the warning code.
3865 "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.
3866 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3867 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3868 {
3869 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3870 "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).
3871 },
3872 ],
3873 },
3874 ],
3875 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3876 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3877 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3878 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003879 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003880 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3881 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3882 {
3883 "message": "A String", # [Output Only] An optional, human-readable error message.
3884 "code": "A String", # [Output Only] The error type identifier for this error.
3885 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3886 },
3887 ],
3888 },
3889 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3890 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003891 "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 -07003892 }</pre>
3893</div>
3894
3895<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003896 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
3897 <pre>Simulates a maintenance event on the instance.
3898
3899Args:
3900 project: string, Project ID for this request. (required)
3901 zone: string, The name of the zone for this request. (required)
3902 instance: string, Name of the instance scoping this request. (required)
3903
3904Returns:
3905 An object of the form:
3906
3907 { # Represents an Operation resource.
3908 #
3909 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3910 #
3911 # Operations can be global, regional or zonal.
3912 # - For global operations, use the globalOperations resource.
3913 # - For regional operations, use the regionOperations resource.
3914 # - For zonal operations, use the zonalOperations resource.
3915 #
3916 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
3917 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3918 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3919 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3920 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3921 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3922 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3923 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3924 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3925 "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.
3926 "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.
3927 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3928 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3929 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3930 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3931 {
3932 "message": "A String", # [Output Only] A human-readable description of the warning code.
3933 "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.
3934 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3935 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3936 {
3937 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3938 "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).
3939 },
3940 ],
3941 },
3942 ],
3943 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3944 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3945 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3946 "name": "A String", # [Output Only] Name of the resource.
3947 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3948 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3949 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3950 {
3951 "message": "A String", # [Output Only] An optional, human-readable error message.
3952 "code": "A String", # [Output Only] The error type identifier for this error.
3953 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3954 },
3955 ],
3956 },
3957 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3958 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3959 "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.
3960 }</pre>
3961</div>
3962
3963<div class="method">
3964 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
3965 <pre>Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003966
3967Args:
3968 project: string, Project ID for this request. (required)
3969 zone: string, The name of the zone for this request. (required)
3970 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003971 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3972
3973For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3974
3975The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003976
3977Returns:
3978 An object of the form:
3979
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003980 { # Represents an Operation resource.
3981 #
3982 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3983 #
3984 # Operations can be global, regional or zonal.
3985 # - For global operations, use the globalOperations resource.
3986 # - For regional operations, use the regionOperations resource.
3987 # - For zonal operations, use the zonalOperations resource.
3988 #
3989 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003990 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003991 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003992 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003993 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003994 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003995 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3996 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3997 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3998 "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.
3999 "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.
4000 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4001 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4002 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4003 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4004 {
4005 "message": "A String", # [Output Only] A human-readable description of the warning code.
4006 "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.
4007 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4008 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4009 {
4010 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4011 "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).
4012 },
4013 ],
4014 },
4015 ],
4016 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4017 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4018 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4019 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004020 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004021 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4022 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4023 {
4024 "message": "A String", # [Output Only] An optional, human-readable error message.
4025 "code": "A String", # [Output Only] The error type identifier for this error.
4026 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4027 },
4028 ],
4029 },
4030 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4031 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004032 "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 -07004033 }</pre>
4034</div>
4035
4036<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004037 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body, requestId=None)</code>
4038 <pre>Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004039
4040Args:
4041 project: string, Project ID for this request. (required)
4042 zone: string, The name of the zone for this request. (required)
4043 instance: string, Name of the instance resource to start. (required)
4044 body: object, The request body. (required)
4045 The object takes the form of:
4046
4047{
4048 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
4049 #
4050 # In order to start the instance, the disk url and its corresponding key must be provided.
4051 #
4052 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
4053 {
4054 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
4055 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
4056 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
4057 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
4058 #
4059 # The key must meet the following requirements before you can provide it to Compute Engine:
4060 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004061 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004062 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004063 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004064 },
4065 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
4066 },
4067 ],
4068 }
4069
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004070 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4071
4072For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4073
4074The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004075
4076Returns:
4077 An object of the form:
4078
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004079 { # Represents an Operation resource.
4080 #
4081 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4082 #
4083 # Operations can be global, regional or zonal.
4084 # - For global operations, use the globalOperations resource.
4085 # - For regional operations, use the regionOperations resource.
4086 # - For zonal operations, use the zonalOperations resource.
4087 #
4088 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004089 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004090 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004091 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004092 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004093 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004094 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4095 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4096 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4097 "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.
4098 "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.
4099 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4100 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4101 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4102 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4103 {
4104 "message": "A String", # [Output Only] A human-readable description of the warning code.
4105 "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.
4106 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4107 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4108 {
4109 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4110 "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).
4111 },
4112 ],
4113 },
4114 ],
4115 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4116 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4117 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4118 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004119 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004120 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4121 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4122 {
4123 "message": "A String", # [Output Only] An optional, human-readable error message.
4124 "code": "A String", # [Output Only] The error type identifier for this error.
4125 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4126 },
4127 ],
4128 },
4129 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4130 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004131 "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 -07004132 }</pre>
4133</div>
4134
4135<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004136 <code class="details" id="stop">stop(project, zone, instance, requestId=None)</code>
4137 <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 VM usage charges while they are stopped. However, resources that the VM 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004138
4139Args:
4140 project: string, Project ID for this request. (required)
4141 zone: string, The name of the zone for this request. (required)
4142 instance: string, Name of the instance resource to stop. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004143 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4144
4145For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4146
4147The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004148
4149Returns:
4150 An object of the form:
4151
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004152 { # Represents an Operation resource.
4153 #
4154 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4155 #
4156 # Operations can be global, regional or zonal.
4157 # - For global operations, use the globalOperations resource.
4158 # - For regional operations, use the regionOperations resource.
4159 # - For zonal operations, use the zonalOperations resource.
4160 #
4161 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004162 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004163 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004164 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004165 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004166 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004167 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4168 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4169 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4170 "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.
4171 "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.
4172 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4173 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4174 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4175 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4176 {
4177 "message": "A String", # [Output Only] A human-readable description of the warning code.
4178 "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.
4179 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4180 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4181 {
4182 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4183 "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).
4184 },
4185 ],
4186 },
4187 ],
4188 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4189 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4190 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4191 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004192 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4193 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4194 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4195 {
4196 "message": "A String", # [Output Only] An optional, human-readable error message.
4197 "code": "A String", # [Output Only] The error type identifier for this error.
4198 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4199 },
4200 ],
4201 },
4202 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4203 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4204 "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.
4205 }</pre>
4206</div>
4207
4208<div class="method">
4209 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
4210 <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.
4211
4212Args:
4213 project: string, Project ID for this request. (required)
4214 zone: string, The name of the zone for this request. (required)
4215 instance: string, Name of the instance resource to suspend. (required)
4216 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
4217 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4218
4219For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4220
4221The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4222
4223Returns:
4224 An object of the form:
4225
4226 { # Represents an Operation resource.
4227 #
4228 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4229 #
4230 # Operations can be global, regional or zonal.
4231 # - For global operations, use the globalOperations resource.
4232 # - For regional operations, use the regionOperations resource.
4233 # - For zonal operations, use the zonalOperations resource.
4234 #
4235 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
4236 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4237 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4238 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4239 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4240 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4241 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4242 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4243 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4244 "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.
4245 "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.
4246 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4247 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4248 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4249 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4250 {
4251 "message": "A String", # [Output Only] A human-readable description of the warning code.
4252 "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.
4253 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4254 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4255 {
4256 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4257 "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).
4258 },
4259 ],
4260 },
4261 ],
4262 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4263 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4264 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4265 "name": "A String", # [Output Only] Name of the resource.
4266 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004267 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4268 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4269 {
4270 "message": "A String", # [Output Only] An optional, human-readable error message.
4271 "code": "A String", # [Output Only] The error type identifier for this error.
4272 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4273 },
4274 ],
4275 },
4276 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4277 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004278 "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 -07004279 }</pre>
4280</div>
4281
4282<div class="method">
4283 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
4284 <pre>Returns permissions that a caller has on the specified resource.
4285
4286Args:
4287 project: string, Project ID for this request. (required)
4288 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004289 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004290 body: object, The request body. (required)
4291 The object takes the form of:
4292
4293{
4294 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
4295 "A String",
4296 ],
4297 }
4298
4299
4300Returns:
4301 An object of the form:
4302
4303 {
4304 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4305 "A String",
4306 ],
4307 }</pre>
4308</div>
4309
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004310<div class="method">
4311 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</code>
4312 <pre>Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
4313
4314Args:
4315 project: string, Project ID for this request. (required)
4316 zone: string, The name of the zone for this request. (required)
4317 instance: string, The instance name for this request. (required)
4318 networkInterface: string, The name of the network interface where the access config is attached. (required)
4319 body: object, The request body. (required)
4320 The object takes the form of:
4321
4322{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
4323 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4324 "name": "A String", # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
4325 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
4326 #
4327 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4328 #
4329 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
4330 "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.
4331 "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.
4332 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
4333 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
4334}
4335
4336 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4337
4338For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4339
4340The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4341
4342Returns:
4343 An object of the form:
4344
4345 { # Represents an Operation resource.
4346 #
4347 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4348 #
4349 # Operations can be global, regional or zonal.
4350 # - For global operations, use the globalOperations resource.
4351 # - For regional operations, use the regionOperations resource.
4352 # - For zonal operations, use the zonalOperations resource.
4353 #
4354 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
4355 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4356 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4357 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4358 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4359 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4360 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4361 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4362 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4363 "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.
4364 "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.
4365 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4366 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4367 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4368 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4369 {
4370 "message": "A String", # [Output Only] A human-readable description of the warning code.
4371 "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.
4372 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4373 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4374 {
4375 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4376 "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).
4377 },
4378 ],
4379 },
4380 ],
4381 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4382 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4383 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4384 "name": "A String", # [Output Only] Name of the resource.
4385 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4386 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4387 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4388 {
4389 "message": "A String", # [Output Only] An optional, human-readable error message.
4390 "code": "A String", # [Output Only] The error type identifier for this error.
4391 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4392 },
4393 ],
4394 },
4395 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4396 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4397 "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.
4398 }</pre>
4399</div>
4400
4401<div class="method">
4402 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body, requestId=None)</code>
4403 <pre>Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
4404
4405Args:
4406 project: string, Project ID for this request. (required)
4407 zone: string, The name of the zone for this request. (required)
4408 instance: string, Name of the instance scoping this request. (required)
4409 body: object, The request body. (required)
4410 The object takes the form of:
4411
4412{ # A set of Display Device options
4413 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
4414}
4415
4416 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4417
4418For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4419
4420The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4421
4422Returns:
4423 An object of the form:
4424
4425 { # Represents an Operation resource.
4426 #
4427 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4428 #
4429 # Operations can be global, regional or zonal.
4430 # - For global operations, use the globalOperations resource.
4431 # - For regional operations, use the regionOperations resource.
4432 # - For zonal operations, use the zonalOperations resource.
4433 #
4434 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
4435 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4436 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4437 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4438 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4439 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4440 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4441 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4442 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4443 "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.
4444 "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.
4445 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4446 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4447 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4448 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4449 {
4450 "message": "A String", # [Output Only] A human-readable description of the warning code.
4451 "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.
4452 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4453 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4454 {
4455 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4456 "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).
4457 },
4458 ],
4459 },
4460 ],
4461 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4462 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4463 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4464 "name": "A String", # [Output Only] Name of the resource.
4465 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4466 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4467 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4468 {
4469 "message": "A String", # [Output Only] An optional, human-readable error message.
4470 "code": "A String", # [Output Only] The error type identifier for this error.
4471 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4472 },
4473 ],
4474 },
4475 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4476 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4477 "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.
4478 }</pre>
4479</div>
4480
4481<div class="method">
4482 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body, requestId=None)</code>
4483 <pre>Updates an instance's network interface. This method follows PATCH semantics.
4484
4485Args:
4486 project: string, Project ID for this request. (required)
4487 zone: string, The name of the zone for this request. (required)
4488 instance: string, The instance name for this request. (required)
4489 networkInterface: string, The name of the network interface to update. (required)
4490 body: object, The request body. (required)
4491 The object takes the form of:
4492
4493{ # A network interface resource attached to an instance.
4494 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
4495 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
4496 { # An alias IP range attached to an instance's network interface.
4497 "subnetworkRangeName": "A String", # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
4498 "ipCidrRange": "A String", # The IP alias ranges to allocate for this interface. 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 (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
4499 },
4500 ],
4501 "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.
4502 #
4503 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
4504 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
4505 # - projects/project/global/networks/network
4506 # - global/networks/default
4507 "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.
4508 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
4509 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4510 "name": "A String", # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
4511 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
4512 #
4513 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4514 #
4515 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
4516 "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.
4517 "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.
4518 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
4519 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
4520 },
4521 ],
4522 "networkIP": "A String", # An IPv4 internal IP 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.
4523 "fingerprint": "A String", # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
4524 "subnetwork": "A String", # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
4525 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
4526 # - regions/region/subnetworks/subnetwork
4527 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
4528}
4529
4530 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4531
4532For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4533
4534The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4535
4536Returns:
4537 An object of the form:
4538
4539 { # Represents an Operation resource.
4540 #
4541 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4542 #
4543 # Operations can be global, regional or zonal.
4544 # - For global operations, use the globalOperations resource.
4545 # - For regional operations, use the regionOperations resource.
4546 # - For zonal operations, use the zonalOperations resource.
4547 #
4548 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
4549 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4550 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4551 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4552 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4553 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4554 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4555 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4556 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4557 "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.
4558 "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.
4559 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4560 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4561 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4562 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4563 {
4564 "message": "A String", # [Output Only] A human-readable description of the warning code.
4565 "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.
4566 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4567 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4568 {
4569 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4570 "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).
4571 },
4572 ],
4573 },
4574 ],
4575 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4576 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4577 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4578 "name": "A String", # [Output Only] Name of the resource.
4579 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4580 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4581 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4582 {
4583 "message": "A String", # [Output Only] An optional, human-readable error message.
4584 "code": "A String", # [Output Only] The error type identifier for this error.
4585 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4586 },
4587 ],
4588 },
4589 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4590 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4591 "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.
4592 }</pre>
4593</div>
4594
4595<div class="method">
4596 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body, requestId=None)</code>
4597 <pre>Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
4598
4599Args:
4600 project: string, Project ID for this request. (required)
4601 zone: string, The name of the zone for this request. (required)
4602 instance: string, Name or id of the instance scoping this request. (required)
4603 body: object, The request body. (required)
4604 The object takes the form of:
4605
4606{ # A set of Shielded Instance options.
4607 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
4608 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
4609 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
4610}
4611
4612 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4613
4614For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4615
4616The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4617
4618Returns:
4619 An object of the form:
4620
4621 { # Represents an Operation resource.
4622 #
4623 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4624 #
4625 # Operations can be global, regional or zonal.
4626 # - For global operations, use the globalOperations resource.
4627 # - For regional operations, use the regionOperations resource.
4628 # - For zonal operations, use the zonalOperations resource.
4629 #
4630 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
4631 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4632 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4633 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4634 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4635 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4636 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4637 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4638 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4639 "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.
4640 "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.
4641 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4642 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4643 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4644 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4645 {
4646 "message": "A String", # [Output Only] A human-readable description of the warning code.
4647 "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.
4648 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4649 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4650 {
4651 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4652 "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).
4653 },
4654 ],
4655 },
4656 ],
4657 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4658 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4659 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4660 "name": "A String", # [Output Only] Name of the resource.
4661 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4662 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4663 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4664 {
4665 "message": "A String", # [Output Only] An optional, human-readable error message.
4666 "code": "A String", # [Output Only] The error type identifier for this error.
4667 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4668 },
4669 ],
4670 },
4671 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4672 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4673 "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.
4674 }</pre>
4675</div>
4676
4677<div class="method">
4678 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body, requestId=None)</code>
4679 <pre>Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
4680
4681Args:
4682 project: string, Project ID for this request. (required)
4683 zone: string, The name of the zone for this request. (required)
4684 instance: string, Name of the instance scoping this request. (required)
4685 body: object, The request body. (required)
4686 The object takes the form of:
4687
4688{ # A set of Shielded VM options.
4689 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
4690 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
4691 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
4692}
4693
4694 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4695
4696For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4697
4698The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4699
4700Returns:
4701 An object of the form:
4702
4703 { # Represents an Operation resource.
4704 #
4705 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4706 #
4707 # Operations can be global, regional or zonal.
4708 # - For global operations, use the globalOperations resource.
4709 # - For regional operations, use the regionOperations resource.
4710 # - For zonal operations, use the zonalOperations resource.
4711 #
4712 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
4713 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4714 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4715 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4716 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4717 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4718 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4719 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4720 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4721 "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.
4722 "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.
4723 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4724 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4725 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4726 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4727 {
4728 "message": "A String", # [Output Only] A human-readable description of the warning code.
4729 "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.
4730 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4731 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4732 {
4733 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4734 "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).
4735 },
4736 ],
4737 },
4738 ],
4739 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4740 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4741 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4742 "name": "A String", # [Output Only] Name of the resource.
4743 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4744 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4745 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4746 {
4747 "message": "A String", # [Output Only] An optional, human-readable error message.
4748 "code": "A String", # [Output Only] The error type identifier for this error.
4749 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4750 },
4751 ],
4752 },
4753 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4754 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4755 "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.
4756 }</pre>
4757</div>
4758
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004759</body></html>