blob: 7f68579413894f8e17a72bd7ca1bc3e7f1e27d62 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, instance, body, requestId=None)</a></code></p>
82<p class="firstline">Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.</p>
83<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070084 <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 -070085<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 -070086<p class="toc_element">
87 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040090 <code><a href="#attachDisk">attachDisk(project, zone, instance, body, forceAttach=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040091<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 -070092<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
95<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040096 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Deletes an access config from an instance's network interface.</p>
98<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Detaches a disk from an instance.</p>
101<p class="toc_element">
102 <code><a href="#get">get(project, zone, instance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Returns the specified Instance resource. Gets a list of available instances by making a list() request.</p>
104<p class="toc_element">
105 <code><a href="#getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</a></code></p>
106<p class="firstline">Returns effective firewalls applied to an interface of the instance.</p>
107<p class="toc_element">
108 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</a></code></p>
109<p class="firstline">Returns the specified guest attributes entry.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700110<p class="toc_element">
111 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
112<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
113<p class="toc_element">
114 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
118<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
119<p class="toc_element">
120 <code><a href="#getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</a></code></p>
121<p class="firstline">Returns the Shielded VM Identity of an instance</p>
122<p class="toc_element">
123 <code><a href="#insert">insert(project, zone, body, sourceInstanceTemplate=None, sourceMachineImage=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700124<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
125<p class="toc_element">
126 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
127<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
128<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400129 <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 -0700130<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 -0400131<p class="toc_element">
132 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
133<p class="firstline">Retrieves the next page of results.</p>
134<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700135 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
136<p class="firstline">Retrieves the next page of results.</p>
137<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body, requestId=None)</a></code></p>
139<p class="firstline">Removes resource policies from an instance.</p>
140<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400141 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142<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>
143<p class="toc_element">
144 <code><a href="#resume">resume(project, zone, instance, body, requestId=None)</a></code></p>
145<p class="firstline">Resumes an instance that was suspended using the instances().suspend method.</p>
146<p class="toc_element">
147 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
148<p class="firstline">Sets deletion protection on the instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700149<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400150 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700151<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
152<p class="toc_element">
153 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body)</a></code></p>
154<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
155<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400156 <code><a href="#setLabels">setLabels(project, zone, instance, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700158<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400159 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body, requestId=None)</a></code></p>
160<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
161<p class="toc_element">
162 <code><a href="#setMachineType">setMachineType(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700163<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
164<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400165 <code><a href="#setMetadata">setMetadata(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700166<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
167<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400168 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700169<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>
170<p class="toc_element">
171 <code><a href="#setName">setName(project, zone, instance, body, requestId=None)</a></code></p>
172<p class="firstline">Sets name of an instance.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400173<p class="toc_element">
174 <code><a href="#setScheduling">setScheduling(project, zone, instance, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700175<p class="firstline">Sets an instance's scheduling options.</p>
176<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400177 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body, requestId=None)</a></code></p>
178<p class="firstline">Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700179<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body, requestId=None)</a></code></p>
181<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>
182<p class="toc_element">
183 <code><a href="#setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body, requestId=None)</a></code></p>
184<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>
185<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400186 <code><a href="#setTags">setTags(project, zone, instance, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187<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 -0700188<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400189 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
190<p class="firstline">Simulates a maintenance event on the instance.</p>
191<p class="toc_element">
192 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700194<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400195 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700197<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400198 <code><a href="#stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700200<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400201 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700202<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>
203<p class="toc_element">
204 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
205<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
206<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400207 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208<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>
209<p class="toc_element">
210 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body, requestId=None)</a></code></p>
211<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>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400212<p class="toc_element">
213 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body, requestId=None)</a></code></p>
214<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700215<p class="toc_element">
216 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body, requestId=None)</a></code></p>
217<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>
218<p class="toc_element">
219 <code><a href="#updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body, requestId=None)</a></code></p>
220<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 -0700221<h3>Method Details</h3>
222<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400223 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700224 <pre>Adds an access config to an instance's network interface.
225
226Args:
227 project: string, Project ID for this request. (required)
228 zone: string, The name of the zone for this request. (required)
229 instance: string, The instance name for this request. (required)
230 networkInterface: string, The name of the network interface to add to this instance. (required)
231 body: object, The request body. (required)
232 The object takes the form of:
233
234{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
235 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700237 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400238 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
240 #
241 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
242 #
243 # 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 -0700244 "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 -0700245 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700246 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 "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 -0700248}
249
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 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.
251
252For 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.
253
254The 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 -0700255
256Returns:
257 An object of the form:
258
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 { # Represents an Operation resource.
260 #
261 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
262 #
263 # Operations can be global, regional or zonal.
264 # - For global operations, use the globalOperations resource.
265 # - For regional operations, use the regionOperations resource.
266 # - For zonal operations, use the zonalOperations resource.
267 #
268 # 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 -0700269 "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 -0700270 "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 -0400271 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700272 "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 -0700273 "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 -0700274 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
275 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
276 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
277 "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.
278 "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.
279 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
280 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
281 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
282 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
283 {
284 "message": "A String", # [Output Only] A human-readable description of the warning code.
285 "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.
286 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
287 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
288 {
289 "value": "A String", # [Output Only] A warning data value corresponding to the key.
290 "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).
291 },
292 ],
293 },
294 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700296 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
297 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
298 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
299 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
301 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
302 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
303 {
304 "message": "A String", # [Output Only] An optional, human-readable error message.
305 "code": "A String", # [Output Only] The error type identifier for this error.
306 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
307 },
308 ],
309 },
310 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
311 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
312 "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.
313 }</pre>
314</div>
315
316<div class="method">
317 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body, requestId=None)</code>
318 <pre>Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
319
320Args:
321 project: string, Project ID for this request. (required)
322 zone: string, The name of the zone for this request. (required)
323 instance: string, The instance name for this request. (required)
324 body: object, The request body. (required)
325 The object takes the form of:
326
327{
328 "resourcePolicies": [ # Resource policies to be added to this instance.
329 "A String",
330 ],
331 }
332
333 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.
334
335For 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.
336
337The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
338
339Returns:
340 An object of the form:
341
342 { # Represents an Operation resource.
343 #
344 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
345 #
346 # Operations can be global, regional or zonal.
347 # - For global operations, use the globalOperations resource.
348 # - For regional operations, use the regionOperations resource.
349 # - For zonal operations, use the zonalOperations resource.
350 #
351 # 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 ==)
352 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
353 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
354 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
355 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
356 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
357 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
358 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
359 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
360 "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.
361 "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.
362 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
363 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
364 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
365 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
366 {
367 "message": "A String", # [Output Only] A human-readable description of the warning code.
368 "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.
369 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
370 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
371 {
372 "value": "A String", # [Output Only] A warning data value corresponding to the key.
373 "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).
374 },
375 ],
376 },
377 ],
378 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
379 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
380 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
381 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
382 "name": "A String", # [Output Only] Name of the resource.
383 "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 -0700384 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
385 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
386 {
387 "message": "A String", # [Output Only] An optional, human-readable error message.
388 "code": "A String", # [Output Only] The error type identifier for this error.
389 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
390 },
391 ],
392 },
393 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
394 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800395 "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 -0700396 }</pre>
397</div>
398
399<div class="method">
400 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700402
403Args:
404 project: string, Project ID for this request. (required)
405 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
406
407You 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.
408
409Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400410 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 -0700411 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 -0700412 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 -0700413
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414For 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 -0700415
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416You 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 -0700417
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418To 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 -0700419
420Returns:
421 An object of the form:
422
423 {
424 "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 -0700425 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
426 "items": { # A list of InstancesScopedList resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700427 "a_key": { # [Output Only] Name of the scope containing this set of instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700428 "instances": [ # [Output Only] A list of instances contained in this scope.
429 { # Represents an Instance resource.
430 #
431 # 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 ==)
432 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
433 "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.
434 "values": [ # Corresponds to the label values of reservation resource.
435 "A String",
436 ],
437 "key": "A String", # Corresponds to the label key of reservation resource.
438 "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.
439 },
440 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400441 { # A specification of the type and number of accelerator cards attached to the instance.
442 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 "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 -0400444 },
445 ],
446 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700447 "a_key": "A String",
448 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
450 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
451 },
452 "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Sets the scheduling options for this instance.
453 "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.
454 "nodeAffinities": [ # A set of node affinity and anti-affinity.
455 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
456 "operator": "A String", # Defines the operation of node selection.
457 "values": [ # Corresponds to the label values of Node resource.
458 "A String",
459 ],
460 "key": "A String", # Corresponds to the label key of Node resource.
461 },
462 ],
463 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700464 "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 -0400465 #
466 # 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 -0700467 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
468 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700469 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400471 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700472 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400473 # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 { # A service account.
475 "scopes": [ # The list of scopes to be made available for this service account.
476 "A String",
477 ],
478 "email": "A String", # Email address of the service account.
479 },
480 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700482 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
483 "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 -0700484 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700485 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400486 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700487 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700488 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 "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.
490 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700491 },
492 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700493 "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.
494 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
495 "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.
496 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
497 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
498 "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.
499 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
500 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
501 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
502 #
503 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
504 #
505 # 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.
506 "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.
507 "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.
508 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
509 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
510 },
511 ],
512 "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.
513 "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.
514 "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:
515 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
516 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400517 "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.
518 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400519 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
520 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
521 # - projects/project/global/networks/network
522 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700523 },
524 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400525 "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 -0700526 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
527 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
528 },
529 "shieldedInstanceConfig": { # A set of Shielded Instance options.
530 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
531 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
532 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
533 },
534 "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.
535 "hostname": "A String",
536 "sourceMachineImage": "A String", # Source machine image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700537 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
538 #
539 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
540 #
541 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
542 #
543 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
544 #
545 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
546 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700547 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700548 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
549 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
550 #
551 # The key must meet the following requirements before you can provide it to Compute Engine:
552 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 # - 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 -0700554 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400555 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700556 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
558 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
559 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700560 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
561 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
562 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
563 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700564 "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 -0700565 "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.
566 },
567 ],
568 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 "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.
570 #
571 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700572 },
573 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700574 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700575 "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.
576 "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 -0700577 "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 -0700578 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
579 "A String",
580 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700581 "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 -0700582 #
583 # To see the latest fingerprint, make get() request to the instance.
584 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
586 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
587 "kmsKeyServiceAccount": "A String",
588 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
589 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
590 #
591 # The key must meet the following requirements before you can provide it to Compute Engine:
592 # - The key is wrapped using a RSA public key certificate provided by Google.
593 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
594 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
595 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
596 },
597 "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 -0700598 #
599 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
601 "resourcePolicies": [ # Resource policies applied to this instance.
602 "A String",
603 ],
604 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400605 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400606 # zones/us-central1-f/machineTypes/n1-standard-1
607 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400608 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400610 # zones/zone/machineTypes/custom-CPUS-MEMORY
611 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700612 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400613 # For example: zones/us-central1-f/machineTypes/custom-4-5120
614 #
615 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 "shieldedVmConfig": { # A set of Shielded VM options.
617 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
618 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
619 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
620 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700621 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 "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 -0700623 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
624 { # An instance-attached disk resource.
625 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
626 #
627 # 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.
628 #
629 # 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.
630 #
631 # 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.
632 #
633 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
634 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700636 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
637 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
638 #
639 # The key must meet the following requirements before you can provide it to Compute Engine:
640 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700641 # - 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 -0700642 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400643 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700644 },
645 "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.
646 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700647 # 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 -0700648 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
649 "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.
650 #
651 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
652 #
653 # 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 -0700654 "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.
655 #
656 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
657 # global/snapshots/my-backup
658 #
659 #
660 # If the source snapshot is deleted later, this field will not be set.
661 "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.
662 "description": "A String", # An optional description. Provide this property when creating the disk.
663 "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.
664 "a_key": "A String",
665 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700666 "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.
667 #
668 # 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.
669 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700671 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
672 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
673 #
674 # The key must meet the following requirements before you can provide it to Compute Engine:
675 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 # - 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 -0700677 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400678 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700679 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700680 "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 -0700681 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
682 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700683 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700684 # 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:
685 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
686 # - projects/project/zones/zone/diskTypes/diskType
687 # - 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 -0700688 "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.
689 #
690 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
691 { # Guest OS features.
692 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
693 },
694 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700695 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700696 "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.
697 "A String",
698 ],
699 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
700 "A String",
701 ],
702 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
703 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
704 "kmsKeyServiceAccount": "A String",
705 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
706 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
707 #
708 # The key must meet the following requirements before you can provide it to Compute Engine:
709 # - The key is wrapped using a RSA public key certificate provided by Google.
710 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
711 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
712 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
713 },
714 "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 -0700715 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 # 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:
717 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700718 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700719 #
720 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700722 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700723 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700724 # To create a disk with a custom image that you created, specify the image name in the following format:
725 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700726 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700727 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700728 # 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:
729 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700730 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800731 #
732 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700733 },
734 "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 -0700735 "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 -0700736 "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 -0700737 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
738 "dbxs": [ # The forbidden key database (dbx).
739 {
740 "content": "A String", # The raw content in the secure keys file.
741 "fileType": "A String",
742 },
743 ],
744 "dbs": [ # The Key Database (db).
745 {
746 "content": "A String", # The raw content in the secure keys file.
747 "fileType": "A String",
748 },
749 ],
750 "keks": [ # The Key Exchange Key (KEK).
751 {
752 "content": "A String", # The raw content in the secure keys file.
753 "fileType": "A String",
754 },
755 ],
756 "pk": { # The Platform Key (PK).
757 "content": "A String", # The raw content in the secure keys file.
758 "fileType": "A String",
759 },
760 },
761 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
762 "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.
763 { # Guest OS features.
764 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
765 },
766 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800767 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
768 "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 -0700769 "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 -0700770 "licenses": [ # [Output Only] Any valid publicly visible licenses.
771 "A String",
772 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700773 "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 -0700774 "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 -0800775 #
776 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
777 #
778 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700779 },
780 ],
781 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
782 },
783 ],
784 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
785 "message": "A String", # [Output Only] A human-readable description of the warning code.
786 "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.
787 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
788 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
789 {
790 "value": "A String", # [Output Only] A warning data value corresponding to the key.
791 "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).
792 },
793 ],
794 },
795 },
796 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700797 "warning": { # [Output Only] Informational warning message.
798 "message": "A String", # [Output Only] A human-readable description of the warning code.
799 "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.
800 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
801 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
802 {
803 "value": "A String", # [Output Only] A warning data value corresponding to the key.
804 "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).
805 },
806 ],
807 },
808 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700809 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
810 }</pre>
811</div>
812
813<div class="method">
814 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
815 <pre>Retrieves the next page of results.
816
817Args:
818 previous_request: The request for the previous page. (required)
819 previous_response: The response from the request for the previous page. (required)
820
821Returns:
822 A request object that you can call 'execute()' on to request the next
823 page. Returns None if there are no more items in the collection.
824 </pre>
825</div>
826
827<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400828 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400829 <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 -0700830
831Args:
832 project: string, Project ID for this request. (required)
833 zone: string, The name of the zone for this request. (required)
834 instance: string, The instance name for this request. (required)
835 body: object, The request body. (required)
836 The object takes the form of:
837
838{ # An instance-attached disk resource.
839 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
840 #
841 # 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.
842 #
843 # 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.
844 #
845 # 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.
846 #
847 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
848 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700849 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700850 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
851 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
852 #
853 # The key must meet the following requirements before you can provide it to Compute Engine:
854 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700855 # - 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 -0700856 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400857 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700858 },
859 "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.
860 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 # 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 -0700862 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
863 "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.
864 #
865 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
866 #
867 # 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 -0700868 "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.
869 #
870 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
871 # global/snapshots/my-backup
872 #
873 #
874 # If the source snapshot is deleted later, this field will not be set.
875 "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.
876 "description": "A String", # An optional description. Provide this property when creating the disk.
877 "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.
878 "a_key": "A String",
879 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700880 "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.
881 #
882 # 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.
883 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700884 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700885 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
886 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
887 #
888 # The key must meet the following requirements before you can provide it to Compute Engine:
889 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700890 # - 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 -0700891 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400892 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700893 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700894 "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 -0700895 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
896 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700897 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700898 # 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:
899 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
900 # - projects/project/zones/zone/diskTypes/diskType
901 # - 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 -0700902 "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.
903 #
904 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
905 { # Guest OS features.
906 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
907 },
908 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700909 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700910 "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.
911 "A String",
912 ],
913 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
914 "A String",
915 ],
916 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
917 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
918 "kmsKeyServiceAccount": "A String",
919 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
920 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
921 #
922 # The key must meet the following requirements before you can provide it to Compute Engine:
923 # - The key is wrapped using a RSA public key certificate provided by Google.
924 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
925 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
926 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
927 },
928 "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 -0700929 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 # 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:
931 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700932 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700933 #
934 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700936 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700937 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700938 # To create a disk with a custom image that you created, specify the image name in the following format:
939 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700940 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700941 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700942 # 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:
943 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700944 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800945 #
946 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700947 },
948 "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 -0700949 "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 -0700950 "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 -0700951 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
952 "dbxs": [ # The forbidden key database (dbx).
953 {
954 "content": "A String", # The raw content in the secure keys file.
955 "fileType": "A String",
956 },
957 ],
958 "dbs": [ # The Key Database (db).
959 {
960 "content": "A String", # The raw content in the secure keys file.
961 "fileType": "A String",
962 },
963 ],
964 "keks": [ # The Key Exchange Key (KEK).
965 {
966 "content": "A String", # The raw content in the secure keys file.
967 "fileType": "A String",
968 },
969 ],
970 "pk": { # The Platform Key (PK).
971 "content": "A String", # The raw content in the secure keys file.
972 "fileType": "A String",
973 },
974 },
975 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
976 "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.
977 { # Guest OS features.
978 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
979 },
980 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800981 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
982 "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 -0700983 "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 -0700984 "licenses": [ # [Output Only] Any valid publicly visible licenses.
985 "A String",
986 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700987 "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 -0700988 "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 -0800989 #
990 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
991 #
992 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700993}
994
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700995 forceAttach: boolean, Whether to force attach the disk even if it's currently attached to another instance.
996 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.
997
998For 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.
999
1000The 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 -07001001
1002Returns:
1003 An object of the form:
1004
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001005 { # Represents an Operation resource.
1006 #
1007 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1008 #
1009 # Operations can be global, regional or zonal.
1010 # - For global operations, use the globalOperations resource.
1011 # - For regional operations, use the regionOperations resource.
1012 # - For zonal operations, use the zonalOperations resource.
1013 #
1014 # 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 -07001015 "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 -07001016 "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 -04001017 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001018 "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 -07001019 "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 -07001020 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1021 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1022 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1023 "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.
1024 "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.
1025 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1026 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1027 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1028 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1029 {
1030 "message": "A String", # [Output Only] A human-readable description of the warning code.
1031 "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.
1032 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1033 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1034 {
1035 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1036 "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).
1037 },
1038 ],
1039 },
1040 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001042 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1043 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1044 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1045 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 "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 -07001047 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1048 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1049 {
1050 "message": "A String", # [Output Only] An optional, human-readable error message.
1051 "code": "A String", # [Output Only] The error type identifier for this error.
1052 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1053 },
1054 ],
1055 },
1056 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1057 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001058 "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 -07001059 }</pre>
1060</div>
1061
1062<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001063 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001064 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
1065
1066Args:
1067 project: string, Project ID for this request. (required)
1068 zone: string, The name of the zone for this request. (required)
1069 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001070 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.
1071
1072For 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.
1073
1074The 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 -07001075
1076Returns:
1077 An object of the form:
1078
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 { # Represents an Operation resource.
1080 #
1081 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1082 #
1083 # Operations can be global, regional or zonal.
1084 # - For global operations, use the globalOperations resource.
1085 # - For regional operations, use the regionOperations resource.
1086 # - For zonal operations, use the zonalOperations resource.
1087 #
1088 # 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 -07001089 "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 -07001090 "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 -04001091 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001092 "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 -07001093 "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 -07001094 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1095 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1096 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1097 "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.
1098 "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.
1099 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1100 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1101 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1102 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1103 {
1104 "message": "A String", # [Output Only] A human-readable description of the warning code.
1105 "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.
1106 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1107 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1108 {
1109 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1110 "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).
1111 },
1112 ],
1113 },
1114 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001115 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001116 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1117 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1118 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1119 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001120 "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 -07001121 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1122 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1123 {
1124 "message": "A String", # [Output Only] An optional, human-readable error message.
1125 "code": "A String", # [Output Only] The error type identifier for this error.
1126 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1127 },
1128 ],
1129 },
1130 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1131 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001132 "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 -07001133 }</pre>
1134</div>
1135
1136<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001137 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001138 <pre>Deletes an access config from an instance's network interface.
1139
1140Args:
1141 project: string, Project ID for this request. (required)
1142 zone: string, The name of the zone for this request. (required)
1143 instance: string, The instance name for this request. (required)
1144 accessConfig: string, The name of the access config to delete. (required)
1145 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001146 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.
1147
1148For 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.
1149
1150The 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 -07001151
1152Returns:
1153 An object of the form:
1154
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001155 { # Represents an Operation resource.
1156 #
1157 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1158 #
1159 # Operations can be global, regional or zonal.
1160 # - For global operations, use the globalOperations resource.
1161 # - For regional operations, use the regionOperations resource.
1162 # - For zonal operations, use the zonalOperations resource.
1163 #
1164 # 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 -07001165 "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 -07001166 "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 -04001167 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001168 "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 -07001169 "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 -07001170 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1171 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1172 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1173 "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.
1174 "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.
1175 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1176 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1177 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1178 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1179 {
1180 "message": "A String", # [Output Only] A human-readable description of the warning code.
1181 "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.
1182 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1183 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1184 {
1185 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1186 "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).
1187 },
1188 ],
1189 },
1190 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001191 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001192 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1193 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1194 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1195 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001196 "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 -07001197 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1198 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1199 {
1200 "message": "A String", # [Output Only] An optional, human-readable error message.
1201 "code": "A String", # [Output Only] The error type identifier for this error.
1202 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1203 },
1204 ],
1205 },
1206 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1207 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001208 "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 -07001209 }</pre>
1210</div>
1211
1212<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001213 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001214 <pre>Detaches a disk from an instance.
1215
1216Args:
1217 project: string, Project ID for this request. (required)
1218 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001219 instance: string, Instance name for this request. (required)
1220 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)
1221 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.
1222
1223For 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.
1224
1225The 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 -07001226
1227Returns:
1228 An object of the form:
1229
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001230 { # Represents an Operation resource.
1231 #
1232 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1233 #
1234 # Operations can be global, regional or zonal.
1235 # - For global operations, use the globalOperations resource.
1236 # - For regional operations, use the regionOperations resource.
1237 # - For zonal operations, use the zonalOperations resource.
1238 #
1239 # 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 -07001240 "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 -07001241 "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 -04001242 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001243 "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 -07001244 "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 -07001245 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1246 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1247 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1248 "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.
1249 "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.
1250 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1251 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1252 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1253 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1254 {
1255 "message": "A String", # [Output Only] A human-readable description of the warning code.
1256 "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.
1257 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1258 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1259 {
1260 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1261 "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).
1262 },
1263 ],
1264 },
1265 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001266 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001267 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1268 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1269 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1270 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001271 "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 -07001272 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1273 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1274 {
1275 "message": "A String", # [Output Only] An optional, human-readable error message.
1276 "code": "A String", # [Output Only] The error type identifier for this error.
1277 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1278 },
1279 ],
1280 },
1281 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1282 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001283 "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 -07001284 }</pre>
1285</div>
1286
1287<div class="method">
1288 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001289 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001290
1291Args:
1292 project: string, Project ID for this request. (required)
1293 zone: string, The name of the zone for this request. (required)
1294 instance: string, Name of the instance resource to return. (required)
1295
1296Returns:
1297 An object of the form:
1298
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001299 { # Represents an Instance resource.
1300 #
1301 # 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 ==)
1302 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
1303 "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.
1304 "values": [ # Corresponds to the label values of reservation resource.
1305 "A String",
1306 ],
1307 "key": "A String", # Corresponds to the label key of reservation resource.
1308 "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.
1309 },
1310 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001311 { # A specification of the type and number of accelerator cards attached to the instance.
1312 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001313 "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 -04001314 },
1315 ],
1316 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001317 "a_key": "A String",
1318 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001319 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
1320 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
1321 },
1322 "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Sets the scheduling options for this instance.
1323 "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.
1324 "nodeAffinities": [ # A set of node affinity and anti-affinity.
1325 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1326 "operator": "A String", # Defines the operation of node selection.
1327 "values": [ # Corresponds to the label values of Node resource.
1328 "A String",
1329 ],
1330 "key": "A String", # Corresponds to the label key of Node resource.
1331 },
1332 ],
1333 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001334 "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 -04001335 #
1336 # 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 -07001337 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
1338 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001339 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001340 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04001341 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001342 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001343 # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001344 { # A service account.
1345 "scopes": [ # The list of scopes to be made available for this service account.
1346 "A String",
1347 ],
1348 "email": "A String", # Email address of the service account.
1349 },
1350 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001351 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001352 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1353 "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 -07001354 "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 Cheemalapatidf613972016-10-21 13:59:49 -07001355 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001356 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001357 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001358 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001359 "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.
1360 "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 Cheemalapatidf613972016-10-21 13:59:49 -07001361 },
1362 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001363 "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.
1364 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
1365 "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.
1366 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1367 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1368 "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.
1369 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
1370 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
1371 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1372 #
1373 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1374 #
1375 # 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.
1376 "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.
1377 "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.
1378 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1379 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1380 },
1381 ],
1382 "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.
1383 "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.
1384 "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:
1385 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1386 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001387 "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.
1388 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001389 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1390 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1391 # - projects/project/global/networks/network
1392 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001393 },
1394 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001395 "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 -07001396 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
1397 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1398 },
1399 "shieldedInstanceConfig": { # A set of Shielded Instance options.
1400 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1401 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1402 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1403 },
1404 "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.
1405 "hostname": "A String",
1406 "sourceMachineImage": "A String", # Source machine image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001407 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
1408 #
1409 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
1410 #
1411 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
1412 #
1413 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
1414 #
1415 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
1416 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001417 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001418 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1419 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1420 #
1421 # The key must meet the following requirements before you can provide it to Compute Engine:
1422 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001423 # - 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 -07001424 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001425 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001426 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001427 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
1428 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1429 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001430 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1431 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1432 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1433 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001434 "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 -07001435 "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.
1436 },
1437 ],
1438 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001439 "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.
1440 #
1441 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001442 },
1443 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001445 "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.
1446 "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 -07001447 "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 -07001448 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1449 "A String",
1450 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001451 "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 -07001452 #
1453 # To see the latest fingerprint, make get() request to the instance.
1454 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
1456 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1457 "kmsKeyServiceAccount": "A String",
1458 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1459 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1460 #
1461 # The key must meet the following requirements before you can provide it to Compute Engine:
1462 # - The key is wrapped using a RSA public key certificate provided by Google.
1463 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1464 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1465 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1466 },
1467 "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 -07001468 #
1469 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001470 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1471 "resourcePolicies": [ # Resource policies applied to this instance.
1472 "A String",
1473 ],
1474 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001475 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04001476 # zones/us-central1-f/machineTypes/n1-standard-1
1477 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001478 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001479 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -04001480 # zones/zone/machineTypes/custom-CPUS-MEMORY
1481 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001482 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001483 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1484 #
1485 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 "shieldedVmConfig": { # A set of Shielded VM options.
1487 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1488 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1489 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1490 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001491 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 "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 -07001493 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1494 { # An instance-attached disk resource.
1495 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1496 #
1497 # 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.
1498 #
1499 # 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.
1500 #
1501 # 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.
1502 #
1503 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1504 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001505 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001506 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1507 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1508 #
1509 # The key must meet the following requirements before you can provide it to Compute Engine:
1510 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001511 # - 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 -07001512 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001513 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001514 },
1515 "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.
1516 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001517 # 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 -07001518 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1519 "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.
1520 #
1521 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1522 #
1523 # 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 -07001524 "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.
1525 #
1526 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1527 # global/snapshots/my-backup
1528 #
1529 #
1530 # If the source snapshot is deleted later, this field will not be set.
1531 "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.
1532 "description": "A String", # An optional description. Provide this property when creating the disk.
1533 "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.
1534 "a_key": "A String",
1535 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001536 "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.
1537 #
1538 # 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.
1539 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001540 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001541 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1542 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1543 #
1544 # The key must meet the following requirements before you can provide it to Compute Engine:
1545 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001546 # - 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 -07001547 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001548 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001549 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001550 "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 -07001551 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1552 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001553 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001554 # 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:
1555 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1556 # - projects/project/zones/zone/diskTypes/diskType
1557 # - 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 -07001558 "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.
1559 #
1560 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1561 { # Guest OS features.
1562 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1563 },
1564 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001565 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001566 "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.
1567 "A String",
1568 ],
1569 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1570 "A String",
1571 ],
1572 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1573 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1574 "kmsKeyServiceAccount": "A String",
1575 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1576 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1577 #
1578 # The key must meet the following requirements before you can provide it to Compute Engine:
1579 # - The key is wrapped using a RSA public key certificate provided by Google.
1580 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1581 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1582 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1583 },
1584 "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 -07001585 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001586 # 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:
1587 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001588 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001589 #
1590 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001591 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001592 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001593 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001594 # To create a disk with a custom image that you created, specify the image name in the following format:
1595 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001596 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001597 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001598 # 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:
1599 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001600 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001601 #
1602 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001603 },
1604 "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 -07001605 "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 -07001606 "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 -07001607 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
1608 "dbxs": [ # The forbidden key database (dbx).
1609 {
1610 "content": "A String", # The raw content in the secure keys file.
1611 "fileType": "A String",
1612 },
1613 ],
1614 "dbs": [ # The Key Database (db).
1615 {
1616 "content": "A String", # The raw content in the secure keys file.
1617 "fileType": "A String",
1618 },
1619 ],
1620 "keks": [ # The Key Exchange Key (KEK).
1621 {
1622 "content": "A String", # The raw content in the secure keys file.
1623 "fileType": "A String",
1624 },
1625 ],
1626 "pk": { # The Platform Key (PK).
1627 "content": "A String", # The raw content in the secure keys file.
1628 "fileType": "A String",
1629 },
1630 },
1631 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
1632 "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.
1633 { # Guest OS features.
1634 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1635 },
1636 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001637 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
1638 "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 -07001639 "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 -07001640 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1641 "A String",
1642 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001643 "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 -07001644 "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 -08001645 #
1646 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1647 #
1648 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001649 },
1650 ],
1651 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1652 }</pre>
1653</div>
1654
1655<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001656 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</code>
1657 <pre>Returns effective firewalls applied to an interface of the instance.
1658
1659Args:
1660 project: string, Project ID for this request. (required)
1661 zone: string, The name of the zone for this request. (required)
1662 instance: string, Name of the instance scoping this request. (required)
1663 networkInterface: string, The name of the network interface to get the effective firewalls. (required)
1664
1665Returns:
1666 An object of the form:
1667
1668 {
1669 "organizationFirewalls": [ # Effective firewalls from organization policies.
1670 { # A pruned SecurityPolicy containing ID and any applicable firewall rules.
1671 "rules": [ # The rules that apply to the network.
1672 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1673 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
1674 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1675 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1676 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
1677 "enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
1678 #
1679 # This field may only be specified when the versioned_expr is set to FIREWALL.
1680 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
1681 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions.
1682 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule.
1683 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting.
1684 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload".
1685 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds.
1686 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502.
1687 },
1688 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network?s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
1689 #
1690 # This field may only be specified when versioned_expr is set to FIREWALL.
1691 "A String",
1692 ],
1693 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
1694 "preview": True or False, # If set to true, the specified action is not enforced.
1695 "match": { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding ?action? is enforced.
1696 "expr": { # Represents an expression text. Example: # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
1697 #
1698 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
1699 "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.
1700 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
1701 #
1702 # The application context of the containing message determines which well-known feature set of CEL is supported.
1703 "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.
1704 "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.
1705 },
1706 "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
1707 "srcIpRanges": [ # CIDR IP address range.
1708 "A String",
1709 ],
1710 "destIpRanges": [ # CIDR IP address range.
1711 #
1712 # This field may only be specified when versioned_expr is set to FIREWALL.
1713 "A String",
1714 ],
1715 "destPorts": [ # Pairs of IP protocols and ports that the rule should match.
1716 #
1717 # This field may only be specified when versioned_expr is set to FIREWALL.
1718 {
1719 "ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1720 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1721 #
1722 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
1723 #
1724 # This field may only be specified when versioned_expr is set to FIREWALL.
1725 "A String",
1726 ],
1727 },
1728 ],
1729 },
1730 "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
1731 },
1732 },
1733 ],
1734 "id": "A String", # The unique identifier for the security policy. This identifier is defined by the server.
1735 },
1736 ],
1737 "firewalls": [ # Effective firewalls on the instance.
1738 { # Represents a Firewall Rule resource.
1739 #
1740 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
1741 "priority": 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
1742 "direction": "A String", # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
1743 "sourceRanges": [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
1744 "A String",
1745 ],
1746 "sourceServiceAccounts": [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
1747 "A String",
1748 ],
1749 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
1750 "destinationRanges": [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
1751 "A String",
1752 ],
1753 "sourceTags": [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
1754 "A String",
1755 ],
1756 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
1757 {
1758 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
1759 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1760 #
1761 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
1762 "A String",
1763 ],
1764 },
1765 ],
1766 "enableLogging": True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
1767 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
1768 "logConfig": { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
1769 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
1770 "metadata": "A String", # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
1771 },
1772 "disabled": True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
1773 "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
1774 # global/networks/default
1775 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1776 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
1777 # - projects/myproject/global/networks/my-network
1778 # - global/networks/default
1779 "targetServiceAccounts": [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
1780 "A String",
1781 ],
1782 "targetTags": [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
1783 "A String",
1784 ],
1785 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
1786 {
1787 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
1788 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1789 #
1790 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
1791 "A String",
1792 ],
1793 },
1794 ],
1795 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1796 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1797 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1798 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1799 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
1800 },
1801 ],
1802 }</pre>
1803</div>
1804
1805<div class="method">
1806 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</code>
1807 <pre>Returns the specified guest attributes entry.
1808
1809Args:
1810 project: string, Project ID for this request. (required)
1811 zone: string, The name of the zone for this request. (required)
1812 instance: string, Name of the instance scoping this request. (required)
1813 variableKey: string, Specifies the key for the guest attributes entry.
1814 queryPath: string, Specifies the guest attributes path to be queried.
1815
1816Returns:
1817 An object of the form:
1818
1819 { # A guest attributes entry.
1820 "kind": "compute#guestAttributes", # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
1821 "variableKey": "A String", # The key to search for.
1822 "queryValue": { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
1823 "items": [
1824 { # A guest attributes namespace/key/value entry.
1825 "namespace": "A String", # Namespace for the guest attribute entry.
1826 "value": "A String", # Value for the guest attribute entry.
1827 "key": "A String", # Key for the guest attribute entry.
1828 },
1829 ],
1830 },
1831 "variableValue": "A String", # [Output Only] The value found for the requested key.
1832 "queryPath": "A String", # The path to be queried. This can be the default namespace ('/') or a nested namespace ('//') or a specified key ('//')
1833 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1834 }</pre>
1835</div>
1836
1837<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001838 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
1839 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1840
1841Args:
1842 project: string, Project ID for this request. (required)
1843 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001844 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001845
1846Returns:
1847 An object of the form:
1848
1849 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
1850 #
1851 #
1852 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001853 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001854 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001855 # **JSON Example**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001856 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001857 # { "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"] } ] }
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001858 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001859 # **YAML Example**
1860 #
1861 # 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
1862 #
1863 #
1864 #
1865 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001866 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001867 { # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001868 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001869 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001870 #
1871 # Example Policy with multiple AuditConfigs:
1872 #
1873 # { "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" ] } ] } ] }
1874 #
1875 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001876 "exemptedMembers": [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001877 "A String",
1878 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001879 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1880 { # Provides the configuration for logging a type of permissions. Example:
1881 #
1882 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
1883 #
1884 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
1885 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001886 "A String",
1887 ],
1888 "logType": "A String", # The log type that this config enables.
1889 },
1890 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001891 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001892 },
1893 ],
1894 "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.
1895 { # A rule to be applied in a Policy.
1896 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1897 { # Specifies what kind of log the caller must write
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001898 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1899 #
1900 # 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.
1901 #
1902 # Field names correspond to IAM request parameters and field values are their respective values.
1903 #
1904 # 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.
1905 #
1906 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
1907 #
1908 # At this time we do not support multiple field names (though this may be supported in the future).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001909 "field": "A String", # The field value to attribute.
1910 "metric": "A String", # The metric to update.
1911 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001912 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
1913 "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.
1914 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001915 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1916 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001917 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1918 "permissionType": "A String", # The type of the permission that was checked.
1919 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001920 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001921 },
1922 ],
1923 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1924 "A String",
1925 ],
1926 "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.
1927 "A String",
1928 ],
1929 "action": "A String", # Required
1930 "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.
1931 "A String",
1932 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001933 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001934 { # A condition to be met.
1935 "iam": "A String", # Trusted attributes supplied by the IAM system.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001936 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001937 "values": [ # The objects of the condition.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001938 "A String",
1939 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001940 "svc": "A String", # Trusted attributes discharged by the service.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001941 "op": "A String", # An operator to apply the subject with.
1942 },
1943 ],
1944 "description": "A String", # Human-readable description of the rule.
1945 },
1946 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001947 "version": 42, # Deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001948 "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.
1949 #
1950 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001951 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001952 { # Associates `members` with a `role`.
1953 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1954 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1955 #
1956 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1957 #
1958 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1959 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001960 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001961 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001962 #
1963 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001964 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1965 #
1966 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1967 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001968 #
1969 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001970 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001971 "A String",
1972 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001973 "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.
1974 #
1975 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
1976 "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.
1977 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
1978 #
1979 # The application context of the containing message determines which well-known feature set of CEL is supported.
1980 "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.
1981 "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.
1982 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001983 },
1984 ],
1985 "iamOwned": True or False,
1986 }</pre>
1987</div>
1988
1989<div class="method">
1990 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001991 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001992
1993Args:
1994 project: string, Project ID for this request. (required)
1995 zone: string, The name of the zone for this request. (required)
1996 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001997 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 -07001998 port: integer, Specifies which COM or serial port to retrieve data from.
1999
2000Returns:
2001 An object of the form:
2002
2003 { # An instance's serial console output.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002004 "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 -07002005 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
2006 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2007 "contents": "A String", # [Output Only] The contents of the console output.
2008 "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.
2009 }</pre>
2010</div>
2011
2012<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002013 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
2014 <pre>Returns the Shielded Instance Identity of an instance
2015
2016Args:
2017 project: string, Project ID for this request. (required)
2018 zone: string, The name of the zone for this request. (required)
2019 instance: string, Name or id of the instance scoping this request. (required)
2020
2021Returns:
2022 An object of the form:
2023
2024 { # A shielded Instance identity entry.
2025 "signingKey": { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded Instance's vTPM.
2026 "ekPub": "A String", # A PEM-encoded public key.
2027 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2028 },
2029 "kind": "compute#shieldedInstanceIdentity", # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
2030 "encryptionKey": { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded Instance's vTPM.
2031 "ekPub": "A String", # A PEM-encoded public key.
2032 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2033 },
2034 }</pre>
2035</div>
2036
2037<div class="method">
2038 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
2039 <pre>Returns the Shielded VM Identity of an instance
2040
2041Args:
2042 project: string, Project ID for this request. (required)
2043 zone: string, The name of the zone for this request. (required)
2044 instance: string, Name of the instance scoping this request. (required)
2045
2046Returns:
2047 An object of the form:
2048
2049 { # A shielded VM identity entry.
2050 "signingKey": { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM's vTPM.
2051 "ekPub": "A String", # A PEM-encoded public key.
2052 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2053 },
2054 "kind": "compute#shieldedVmIdentity", # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
2055 "encryptionKey": { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM's vTPM.
2056 "ekPub": "A String", # A PEM-encoded public key.
2057 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2058 },
2059 }</pre>
2060</div>
2061
2062<div class="method">
2063 <code class="details" id="insert">insert(project, zone, body, sourceInstanceTemplate=None, sourceMachineImage=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002064 <pre>Creates an instance resource in the specified project using the data included in the request.
2065
2066Args:
2067 project: string, Project ID for this request. (required)
2068 zone: string, The name of the zone for this request. (required)
2069 body: object, The request body. (required)
2070 The object takes the form of:
2071
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002072{ # Represents an Instance resource.
2073 #
2074 # 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 ==)
2075 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
2076 "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.
2077 "values": [ # Corresponds to the label values of reservation resource.
2078 "A String",
2079 ],
2080 "key": "A String", # Corresponds to the label key of reservation resource.
2081 "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.
2082 },
2083 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002084 { # A specification of the type and number of accelerator cards attached to the instance.
2085 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002086 "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 -04002087 },
2088 ],
2089 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002090 "a_key": "A String",
2091 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002092 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
2093 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
2094 },
2095 "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Sets the scheduling options for this instance.
2096 "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.
2097 "nodeAffinities": [ # A set of node affinity and anti-affinity.
2098 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2099 "operator": "A String", # Defines the operation of node selection.
2100 "values": [ # Corresponds to the label values of Node resource.
2101 "A String",
2102 ],
2103 "key": "A String", # Corresponds to the label key of Node resource.
2104 },
2105 ],
2106 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002107 "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 -04002108 #
2109 # 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 -07002110 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
2111 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002112 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002113 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002114 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002115 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002116 # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002117 { # A service account.
2118 "scopes": [ # The list of scopes to be made available for this service account.
2119 "A String",
2120 ],
2121 "email": "A String", # Email address of the service account.
2122 },
2123 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002124 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002125 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2126 "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 -07002127 "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 Cheemalapatidf613972016-10-21 13:59:49 -07002128 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002129 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002130 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002131 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002132 "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.
2133 "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 Cheemalapatidf613972016-10-21 13:59:49 -07002134 },
2135 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002136 "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.
2137 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
2138 "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.
2139 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
2140 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2141 "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.
2142 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
2143 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
2144 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2145 #
2146 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2147 #
2148 # 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.
2149 "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.
2150 "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.
2151 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2152 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
2153 },
2154 ],
2155 "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.
2156 "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.
2157 "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:
2158 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2159 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002160 "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.
2161 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002162 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2163 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2164 # - projects/project/global/networks/network
2165 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002166 },
2167 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002168 "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 -07002169 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
2170 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2171 },
2172 "shieldedInstanceConfig": { # A set of Shielded Instance options.
2173 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2174 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2175 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2176 },
2177 "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.
2178 "hostname": "A String",
2179 "sourceMachineImage": "A String", # Source machine image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002180 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
2181 #
2182 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
2183 #
2184 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
2185 #
2186 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
2187 #
2188 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
2189 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002190 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002191 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2192 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2193 #
2194 # The key must meet the following requirements before you can provide it to Compute Engine:
2195 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002196 # - 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 -07002197 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002198 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002199 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002200 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
2201 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2202 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002203 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
2204 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2205 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2206 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002207 "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 -07002208 "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.
2209 },
2210 ],
2211 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002212 "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.
2213 #
2214 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002215 },
2216 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002217 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002218 "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.
2219 "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 -07002220 "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 -07002221 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2222 "A String",
2223 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002224 "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 -07002225 #
2226 # To see the latest fingerprint, make get() request to the instance.
2227 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002228 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
2229 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2230 "kmsKeyServiceAccount": "A String",
2231 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2232 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2233 #
2234 # The key must meet the following requirements before you can provide it to Compute Engine:
2235 # - The key is wrapped using a RSA public key certificate provided by Google.
2236 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2237 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2238 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2239 },
2240 "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 -07002241 #
2242 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002243 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2244 "resourcePolicies": [ # Resource policies applied to this instance.
2245 "A String",
2246 ],
2247 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002248 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002249 # zones/us-central1-f/machineTypes/n1-standard-1
2250 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002251 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002252 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002253 # zones/zone/machineTypes/custom-CPUS-MEMORY
2254 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002255 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002256 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2257 #
2258 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002259 "shieldedVmConfig": { # A set of Shielded VM options.
2260 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2261 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2262 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2263 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002264 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002265 "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 -07002266 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
2267 { # An instance-attached disk resource.
2268 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
2269 #
2270 # 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.
2271 #
2272 # 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.
2273 #
2274 # 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.
2275 #
2276 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
2277 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002278 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002279 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2280 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2281 #
2282 # The key must meet the following requirements before you can provide it to Compute Engine:
2283 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002284 # - 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 -07002285 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002286 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002287 },
2288 "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.
2289 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002290 # 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 -07002291 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2292 "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.
2293 #
2294 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2295 #
2296 # 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 -07002297 "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.
2298 #
2299 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2300 # global/snapshots/my-backup
2301 #
2302 #
2303 # If the source snapshot is deleted later, this field will not be set.
2304 "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.
2305 "description": "A String", # An optional description. Provide this property when creating the disk.
2306 "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.
2307 "a_key": "A String",
2308 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002309 "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.
2310 #
2311 # 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.
2312 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002313 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002314 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2315 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2316 #
2317 # The key must meet the following requirements before you can provide it to Compute Engine:
2318 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002319 # - 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 -07002320 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002321 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002322 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002323 "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 -07002324 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2325 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002326 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002327 # 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:
2328 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2329 # - projects/project/zones/zone/diskTypes/diskType
2330 # - 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 -07002331 "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.
2332 #
2333 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2334 { # Guest OS features.
2335 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2336 },
2337 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002338 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002339 "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.
2340 "A String",
2341 ],
2342 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
2343 "A String",
2344 ],
2345 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2346 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2347 "kmsKeyServiceAccount": "A String",
2348 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2349 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2350 #
2351 # The key must meet the following requirements before you can provide it to Compute Engine:
2352 # - The key is wrapped using a RSA public key certificate provided by Google.
2353 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2354 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2355 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2356 },
2357 "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 -07002358 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002359 # 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:
2360 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002361 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002362 #
2363 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002364 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002365 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002366 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002367 # To create a disk with a custom image that you created, specify the image name in the following format:
2368 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002369 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002370 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002371 # 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:
2372 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002373 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002374 #
2375 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002376 },
2377 "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 -07002378 "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 -07002379 "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 -07002380 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
2381 "dbxs": [ # The forbidden key database (dbx).
2382 {
2383 "content": "A String", # The raw content in the secure keys file.
2384 "fileType": "A String",
2385 },
2386 ],
2387 "dbs": [ # The Key Database (db).
2388 {
2389 "content": "A String", # The raw content in the secure keys file.
2390 "fileType": "A String",
2391 },
2392 ],
2393 "keks": [ # The Key Exchange Key (KEK).
2394 {
2395 "content": "A String", # The raw content in the secure keys file.
2396 "fileType": "A String",
2397 },
2398 ],
2399 "pk": { # The Platform Key (PK).
2400 "content": "A String", # The raw content in the secure keys file.
2401 "fileType": "A String",
2402 },
2403 },
2404 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
2405 "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.
2406 { # Guest OS features.
2407 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2408 },
2409 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002410 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
2411 "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 -07002412 "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 -07002413 "licenses": [ # [Output Only] Any valid publicly visible licenses.
2414 "A String",
2415 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002416 "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 -07002417 "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 -08002418 #
2419 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2420 #
2421 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002422 },
2423 ],
2424 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2425}
2426
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002427 sourceInstanceTemplate: string, Specifies instance template to create the instance.
2428
2429This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2430- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
2431- projects/project/global/instanceTemplates/instanceTemplate
2432- global/instanceTemplates/instanceTemplate
2433 sourceMachineImage: string, Specifies instance machine to create the instance.
2434
2435This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2436- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
2437- projects/project/global/global/machineImages/machineImage
2438- global/machineImages/machineImage
2439 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.
2440
2441For 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.
2442
2443The 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 -07002444
2445Returns:
2446 An object of the form:
2447
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002448 { # Represents an Operation resource.
2449 #
2450 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2451 #
2452 # Operations can be global, regional or zonal.
2453 # - For global operations, use the globalOperations resource.
2454 # - For regional operations, use the regionOperations resource.
2455 # - For zonal operations, use the zonalOperations resource.
2456 #
2457 # 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 -07002458 "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 -07002459 "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 -04002460 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002461 "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 -07002462 "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 -07002463 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2464 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
2465 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
2466 "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.
2467 "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.
2468 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2469 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
2470 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2471 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2472 {
2473 "message": "A String", # [Output Only] A human-readable description of the warning code.
2474 "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.
2475 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2476 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2477 {
2478 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2479 "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).
2480 },
2481 ],
2482 },
2483 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002484 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002485 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
2486 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2487 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
2488 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002489 "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 -07002490 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2491 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2492 {
2493 "message": "A String", # [Output Only] An optional, human-readable error message.
2494 "code": "A String", # [Output Only] The error type identifier for this error.
2495 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2496 },
2497 ],
2498 },
2499 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2500 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002501 "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 -07002502 }</pre>
2503</div>
2504
2505<div class="method">
2506 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
2507 <pre>Retrieves the list of instances contained within the specified zone.
2508
2509Args:
2510 project: string, Project ID for this request. (required)
2511 zone: string, The name of the zone for this request. (required)
2512 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2513
2514You 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.
2515
2516Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002517 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 -07002518 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 -07002519 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 -07002520
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002521For 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 -07002522
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002523You 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 -07002524
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002525To 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 -07002526
2527Returns:
2528 An object of the form:
2529
2530 { # Contains a list of instances.
2531 "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 -07002532 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
2533 "items": [ # A list of Instance resources.
2534 { # Represents an Instance resource.
2535 #
2536 # 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 ==)
2537 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
2538 "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.
2539 "values": [ # Corresponds to the label values of reservation resource.
2540 "A String",
2541 ],
2542 "key": "A String", # Corresponds to the label key of reservation resource.
2543 "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.
2544 },
2545 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002546 { # A specification of the type and number of accelerator cards attached to the instance.
2547 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002548 "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 -04002549 },
2550 ],
2551 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002552 "a_key": "A String",
2553 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002554 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
2555 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
2556 },
2557 "scheduling": { # Sets the scheduling options for an Instance. NextID: 9 # Sets the scheduling options for this instance.
2558 "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.
2559 "nodeAffinities": [ # A set of node affinity and anti-affinity.
2560 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2561 "operator": "A String", # Defines the operation of node selection.
2562 "values": [ # Corresponds to the label values of Node resource.
2563 "A String",
2564 ],
2565 "key": "A String", # Corresponds to the label key of Node resource.
2566 },
2567 ],
2568 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002569 "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 -04002570 #
2571 # 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 -07002572 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
2573 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002574 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002575 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002576 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002577 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002578 # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002579 { # A service account.
2580 "scopes": [ # The list of scopes to be made available for this service account.
2581 "A String",
2582 ],
2583 "email": "A String", # Email address of the service account.
2584 },
2585 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002586 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002587 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2588 "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 -07002589 "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 Cheemalapatidf613972016-10-21 13:59:49 -07002590 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002591 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002592 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002593 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002594 "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.
2595 "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 Cheemalapatidf613972016-10-21 13:59:49 -07002596 },
2597 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002598 "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.
2599 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
2600 "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.
2601 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
2602 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2603 "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.
2604 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
2605 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
2606 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2607 #
2608 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2609 #
2610 # 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.
2611 "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.
2612 "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.
2613 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2614 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
2615 },
2616 ],
2617 "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.
2618 "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.
2619 "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:
2620 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2621 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002622 "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.
2623 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002624 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2625 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2626 # - projects/project/global/networks/network
2627 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002628 },
2629 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002630 "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 -07002631 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
2632 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2633 },
2634 "shieldedInstanceConfig": { # A set of Shielded Instance options.
2635 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2636 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2637 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2638 },
2639 "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.
2640 "hostname": "A String",
2641 "sourceMachineImage": "A String", # Source machine image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002642 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
2643 #
2644 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
2645 #
2646 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
2647 #
2648 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
2649 #
2650 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
2651 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002652 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002653 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2654 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2655 #
2656 # The key must meet the following requirements before you can provide it to Compute Engine:
2657 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002658 # - 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 -07002659 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002660 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002661 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002662 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
2663 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2664 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002665 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
2666 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2667 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2668 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002669 "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 -07002670 "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.
2671 },
2672 ],
2673 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002674 "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.
2675 #
2676 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002677 },
2678 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002679 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002680 "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.
2681 "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 -07002682 "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 -07002683 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2684 "A String",
2685 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002686 "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 -07002687 #
2688 # To see the latest fingerprint, make get() request to the instance.
2689 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002690 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
2691 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2692 "kmsKeyServiceAccount": "A String",
2693 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2694 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2695 #
2696 # The key must meet the following requirements before you can provide it to Compute Engine:
2697 # - The key is wrapped using a RSA public key certificate provided by Google.
2698 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2699 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2700 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2701 },
2702 "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 -07002703 #
2704 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002705 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2706 "resourcePolicies": [ # Resource policies applied to this instance.
2707 "A String",
2708 ],
2709 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002710 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002711 # zones/us-central1-f/machineTypes/n1-standard-1
2712 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002713 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002714 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002715 # zones/zone/machineTypes/custom-CPUS-MEMORY
2716 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002717 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002718 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2719 #
2720 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002721 "shieldedVmConfig": { # A set of Shielded VM options.
2722 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2723 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2724 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2725 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002726 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002727 "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 -07002728 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
2729 { # An instance-attached disk resource.
2730 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
2731 #
2732 # 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.
2733 #
2734 # 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.
2735 #
2736 # 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.
2737 #
2738 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
2739 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002740 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002741 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2742 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2743 #
2744 # The key must meet the following requirements before you can provide it to Compute Engine:
2745 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002746 # - 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 -07002747 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002748 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002749 },
2750 "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.
2751 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002752 # 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 -07002753 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2754 "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.
2755 #
2756 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2757 #
2758 # 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 -07002759 "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.
2760 #
2761 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2762 # global/snapshots/my-backup
2763 #
2764 #
2765 # If the source snapshot is deleted later, this field will not be set.
2766 "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.
2767 "description": "A String", # An optional description. Provide this property when creating the disk.
2768 "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.
2769 "a_key": "A String",
2770 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002771 "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.
2772 #
2773 # 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.
2774 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002775 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002776 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2777 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2778 #
2779 # The key must meet the following requirements before you can provide it to Compute Engine:
2780 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002781 # - 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 -07002782 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002783 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002784 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002785 "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 -07002786 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2787 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002788 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002789 # 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:
2790 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2791 # - projects/project/zones/zone/diskTypes/diskType
2792 # - 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 -07002793 "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.
2794 #
2795 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2796 { # Guest OS features.
2797 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2798 },
2799 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002800 "diskSizeGb": "A String", # Specifies the size of the disk in base-2 GB.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002801 "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.
2802 "A String",
2803 ],
2804 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
2805 "A String",
2806 ],
2807 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2808 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2809 "kmsKeyServiceAccount": "A String",
2810 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2811 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2812 #
2813 # The key must meet the following requirements before you can provide it to Compute Engine:
2814 # - The key is wrapped using a RSA public key certificate provided by Google.
2815 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2816 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2817 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2818 },
2819 "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 -07002820 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002821 # 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:
2822 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002823 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002824 #
2825 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002826 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002827 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002828 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002829 # To create a disk with a custom image that you created, specify the image name in the following format:
2830 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002831 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002832 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002833 # 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:
2834 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002835 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002836 #
2837 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002838 },
2839 "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 -07002840 "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 -07002841 "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 -07002842 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
2843 "dbxs": [ # The forbidden key database (dbx).
2844 {
2845 "content": "A String", # The raw content in the secure keys file.
2846 "fileType": "A String",
2847 },
2848 ],
2849 "dbs": [ # The Key Database (db).
2850 {
2851 "content": "A String", # The raw content in the secure keys file.
2852 "fileType": "A String",
2853 },
2854 ],
2855 "keks": [ # The Key Exchange Key (KEK).
2856 {
2857 "content": "A String", # The raw content in the secure keys file.
2858 "fileType": "A String",
2859 },
2860 ],
2861 "pk": { # The Platform Key (PK).
2862 "content": "A String", # The raw content in the secure keys file.
2863 "fileType": "A String",
2864 },
2865 },
2866 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
2867 "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.
2868 { # Guest OS features.
2869 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2870 },
2871 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002872 "diskSizeGb": "A String", # The size of the disk in base-2 GB. This supersedes disk_size_gb in InitializeParams.
2873 "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 -07002874 "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 -07002875 "licenses": [ # [Output Only] Any valid publicly visible licenses.
2876 "A String",
2877 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002878 "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 -07002879 "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 -08002880 #
2881 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2882 #
2883 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002884 },
2885 ],
2886 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2887 },
2888 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002889 "warning": { # [Output Only] Informational warning message.
2890 "message": "A String", # [Output Only] A human-readable description of the warning code.
2891 "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.
2892 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2893 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2894 {
2895 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2896 "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).
2897 },
2898 ],
2899 },
2900 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002901 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2902 }</pre>
2903</div>
2904
2905<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002906 <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 -07002907 <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 -04002908
2909Args:
2910 project: string, Project ID for this request. (required)
2911 zone: string, The name of the zone for this request. (required)
2912 instance: string, Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. (required)
2913 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2914
2915You 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.
2916
2917Currently, only sorting by name or creationTimestamp desc is supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002918 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 -04002919
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002920For 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 -04002921
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002922You 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 -04002923
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002924To 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 -04002925 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)
2926 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.
2927
2928Returns:
2929 An object of the form:
2930
2931 { # Contains a list of instance referrers.
2932 "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 -07002933 "kind": "compute#instanceListReferrers", # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
2934 "items": [ # A list of Reference resources.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002935 { # Represents a reference to a resource.
2936 "referrer": "A String", # URL of the resource which refers to the target.
2937 "kind": "compute#reference", # [Output Only] Type of the resource. Always compute#reference for references.
2938 "referenceType": "A String", # A description of the reference type with no implied semantics. Possible values include:
2939 # - MEMBER_OF
2940 "target": "A String", # URL of the resource to which this reference points.
2941 },
2942 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002943 "warning": { # [Output Only] Informational warning message.
2944 "message": "A String", # [Output Only] A human-readable description of the warning code.
2945 "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.
2946 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2947 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2948 {
2949 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2950 "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).
2951 },
2952 ],
2953 },
2954 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002955 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2956 }</pre>
2957</div>
2958
2959<div class="method">
2960 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
2961 <pre>Retrieves the next page of results.
2962
2963Args:
2964 previous_request: The request for the previous page. (required)
2965 previous_response: The response from the request for the previous page. (required)
2966
2967Returns:
2968 A request object that you can call 'execute()' on to request the next
2969 page. Returns None if there are no more items in the collection.
2970 </pre>
2971</div>
2972
2973<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002974 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2975 <pre>Retrieves the next page of results.
2976
2977Args:
2978 previous_request: The request for the previous page. (required)
2979 previous_response: The response from the request for the previous page. (required)
2980
2981Returns:
2982 A request object that you can call 'execute()' on to request the next
2983 page. Returns None if there are no more items in the collection.
2984 </pre>
2985</div>
2986
2987<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002988 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body, requestId=None)</code>
2989 <pre>Removes resource policies from an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002990
2991Args:
2992 project: string, Project ID for this request. (required)
2993 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002994 instance: string, The instance name for this request. (required)
2995 body: object, The request body. (required)
2996 The object takes the form of:
2997
2998{
2999 "resourcePolicies": [ # Resource policies to be removed from this instance.
3000 "A String",
3001 ],
3002 }
3003
3004 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.
3005
3006For 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.
3007
3008The 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 -07003009
3010Returns:
3011 An object of the form:
3012
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003013 { # Represents an Operation resource.
3014 #
3015 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3016 #
3017 # Operations can be global, regional or zonal.
3018 # - For global operations, use the globalOperations resource.
3019 # - For regional operations, use the regionOperations resource.
3020 # - For zonal operations, use the zonalOperations resource.
3021 #
3022 # 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 -07003023 "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 -07003024 "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 -04003025 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003026 "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 -07003027 "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 -07003028 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3029 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3030 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3031 "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.
3032 "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.
3033 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3034 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3035 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3036 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3037 {
3038 "message": "A String", # [Output Only] A human-readable description of the warning code.
3039 "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.
3040 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3041 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3042 {
3043 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3044 "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).
3045 },
3046 ],
3047 },
3048 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003049 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003050 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3051 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3052 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3053 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003054 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3055 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3056 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3057 {
3058 "message": "A String", # [Output Only] An optional, human-readable error message.
3059 "code": "A String", # [Output Only] The error type identifier for this error.
3060 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3061 },
3062 ],
3063 },
3064 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3065 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3066 "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.
3067 }</pre>
3068</div>
3069
3070<div class="method">
3071 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
3072 <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.
3073
3074Args:
3075 project: string, Project ID for this request. (required)
3076 zone: string, The name of the zone for this request. (required)
3077 instance: string, Name of the instance scoping this request. (required)
3078 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.
3079
3080For 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.
3081
3082The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3083
3084Returns:
3085 An object of the form:
3086
3087 { # Represents an Operation resource.
3088 #
3089 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3090 #
3091 # Operations can be global, regional or zonal.
3092 # - For global operations, use the globalOperations resource.
3093 # - For regional operations, use the regionOperations resource.
3094 # - For zonal operations, use the zonalOperations resource.
3095 #
3096 # 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 ==)
3097 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3098 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3099 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3100 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3101 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3102 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3103 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3104 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3105 "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.
3106 "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.
3107 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3108 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3109 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3110 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3111 {
3112 "message": "A String", # [Output Only] A human-readable description of the warning code.
3113 "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.
3114 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3115 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3116 {
3117 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3118 "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).
3119 },
3120 ],
3121 },
3122 ],
3123 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
3124 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3125 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3126 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3127 "name": "A String", # [Output Only] Name of the resource.
3128 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3129 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3130 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3131 {
3132 "message": "A String", # [Output Only] An optional, human-readable error message.
3133 "code": "A String", # [Output Only] The error type identifier for this error.
3134 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3135 },
3136 ],
3137 },
3138 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3139 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3140 "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.
3141 }</pre>
3142</div>
3143
3144<div class="method">
3145 <code class="details" id="resume">resume(project, zone, instance, body, requestId=None)</code>
3146 <pre>Resumes an instance that was suspended using the instances().suspend method.
3147
3148Args:
3149 project: string, Project ID for this request. (required)
3150 zone: string, The name of the zone for this request. (required)
3151 instance: string, Name of the instance resource to resume. (required)
3152 body: object, The request body. (required)
3153 The object takes the form of:
3154
3155{
3156 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
3157 #
3158 # 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.
3159 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
3160 "kmsKeyServiceAccount": "A String",
3161 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3162 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3163 #
3164 # The key must meet the following requirements before you can provide it to Compute Engine:
3165 # - The key is wrapped using a RSA public key certificate provided by Google.
3166 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3167 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3168 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3169 },
3170 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
3171 #
3172 # In order to resume the instance, the disk url and its corresponding key must be provided.
3173 #
3174 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
3175 {
3176 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
3177 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
3178 "kmsKeyServiceAccount": "A String",
3179 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3180 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3181 #
3182 # The key must meet the following requirements before you can provide it to Compute Engine:
3183 # - The key is wrapped using a RSA public key certificate provided by Google.
3184 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3185 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3186 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3187 },
3188 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
3189 },
3190 ],
3191 }
3192
3193 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.
3194
3195For 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.
3196
3197The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3198
3199Returns:
3200 An object of the form:
3201
3202 { # Represents an Operation resource.
3203 #
3204 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3205 #
3206 # Operations can be global, regional or zonal.
3207 # - For global operations, use the globalOperations resource.
3208 # - For regional operations, use the regionOperations resource.
3209 # - For zonal operations, use the zonalOperations resource.
3210 #
3211 # 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 ==)
3212 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3213 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3214 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3215 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3216 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3217 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3218 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3219 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3220 "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.
3221 "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.
3222 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3223 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3224 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3225 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3226 {
3227 "message": "A String", # [Output Only] A human-readable description of the warning code.
3228 "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.
3229 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3230 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3231 {
3232 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3233 "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).
3234 },
3235 ],
3236 },
3237 ],
3238 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
3239 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3240 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3241 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3242 "name": "A String", # [Output Only] Name of the resource.
3243 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3244 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3245 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3246 {
3247 "message": "A String", # [Output Only] An optional, human-readable error message.
3248 "code": "A String", # [Output Only] The error type identifier for this error.
3249 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3250 },
3251 ],
3252 },
3253 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3254 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3255 "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.
3256 }</pre>
3257</div>
3258
3259<div class="method">
3260 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
3261 <pre>Sets deletion protection on the instance.
3262
3263Args:
3264 project: string, Project ID for this request. (required)
3265 zone: string, The name of the zone for this request. (required)
3266 resource: string, Name or id of the resource for this request. (required)
3267 deletionProtection: boolean, Whether the resource should be protected against deletion.
3268 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.
3269
3270For 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.
3271
3272The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3273
3274Returns:
3275 An object of the form:
3276
3277 { # Represents an Operation resource.
3278 #
3279 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3280 #
3281 # Operations can be global, regional or zonal.
3282 # - For global operations, use the globalOperations resource.
3283 # - For regional operations, use the regionOperations resource.
3284 # - For zonal operations, use the zonalOperations resource.
3285 #
3286 # 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 ==)
3287 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3288 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3289 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3290 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3291 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3292 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3293 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3294 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3295 "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.
3296 "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.
3297 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3298 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3299 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3300 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3301 {
3302 "message": "A String", # [Output Only] A human-readable description of the warning code.
3303 "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.
3304 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3305 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3306 {
3307 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3308 "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).
3309 },
3310 ],
3311 },
3312 ],
3313 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
3314 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3315 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3316 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3317 "name": "A String", # [Output Only] Name of the resource.
3318 "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 -07003319 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3320 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3321 {
3322 "message": "A String", # [Output Only] An optional, human-readable error message.
3323 "code": "A String", # [Output Only] The error type identifier for this error.
3324 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3325 },
3326 ],
3327 },
3328 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3329 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003330 "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 -07003331 }</pre>
3332</div>
3333
3334<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003335 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003336 <pre>Sets the auto-delete flag for a disk attached to an instance.
3337
3338Args:
3339 project: string, Project ID for this request. (required)
3340 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003341 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003342 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003343 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)
3344 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.
3345
3346For 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.
3347
3348The 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 -07003349
3350Returns:
3351 An object of the form:
3352
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003353 { # Represents an Operation resource.
3354 #
3355 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3356 #
3357 # Operations can be global, regional or zonal.
3358 # - For global operations, use the globalOperations resource.
3359 # - For regional operations, use the regionOperations resource.
3360 # - For zonal operations, use the zonalOperations resource.
3361 #
3362 # 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 -07003363 "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 -07003364 "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 -04003365 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003366 "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 -07003367 "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 -07003368 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3369 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3370 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3371 "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.
3372 "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.
3373 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3374 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3375 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3376 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3377 {
3378 "message": "A String", # [Output Only] A human-readable description of the warning code.
3379 "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.
3380 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3381 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3382 {
3383 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3384 "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).
3385 },
3386 ],
3387 },
3388 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003389 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003390 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3391 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3392 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3393 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003394 "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 -07003395 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3396 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3397 {
3398 "message": "A String", # [Output Only] An optional, human-readable error message.
3399 "code": "A String", # [Output Only] The error type identifier for this error.
3400 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3401 },
3402 ],
3403 },
3404 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3405 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003406 "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 -07003407 }</pre>
3408</div>
3409
3410<div class="method">
3411 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body)</code>
3412 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
3413
3414Args:
3415 project: string, Project ID for this request. (required)
3416 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003417 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003418 body: object, The request body. (required)
3419 The object takes the form of:
3420
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003421{
3422 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003423 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003424 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003425 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003426 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003427 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003428 # **JSON Example**
3429 #
3430 # { "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"] } ] }
3431 #
3432 # **YAML Example**
3433 #
3434 # 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
3435 #
3436 #
3437 #
3438 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
3439 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
3440 { # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003441 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003442 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003443 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003444 # Example Policy with multiple AuditConfigs:
3445 #
3446 # { "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" ] } ] } ] }
3447 #
3448 # 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.
3449 "exemptedMembers": [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003450 "A String",
3451 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003452 "auditLogConfigs": [ # The configuration for logging of each type of permission.
3453 { # Provides the configuration for logging a type of permissions. Example:
3454 #
3455 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
3456 #
3457 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
3458 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3459 "A String",
3460 ],
3461 "logType": "A String", # The log type that this config enables.
3462 },
3463 ],
3464 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003465 },
3466 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003467 "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.
3468 { # A rule to be applied in a Policy.
3469 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3470 { # Specifies what kind of log the caller must write
3471 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
3472 #
3473 # 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.
3474 #
3475 # Field names correspond to IAM request parameters and field values are their respective values.
3476 #
3477 # 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.
3478 #
3479 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
3480 #
3481 # At this time we do not support multiple field names (though this may be supported in the future).
3482 "field": "A String", # The field value to attribute.
3483 "metric": "A String", # The metric to update.
3484 },
3485 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
3486 "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.
3487 },
3488 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
3489 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
3490 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3491 "permissionType": "A String", # The type of the permission that was checked.
3492 },
3493 },
3494 },
3495 ],
3496 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
3497 "A String",
3498 ],
3499 "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.
3500 "A String",
3501 ],
3502 "action": "A String", # Required
3503 "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.
3504 "A String",
3505 ],
3506 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3507 { # A condition to be met.
3508 "iam": "A String", # Trusted attributes supplied by the IAM system.
3509 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3510 "values": [ # The objects of the condition.
3511 "A String",
3512 ],
3513 "svc": "A String", # Trusted attributes discharged by the service.
3514 "op": "A String", # An operator to apply the subject with.
3515 },
3516 ],
3517 "description": "A String", # Human-readable description of the rule.
3518 },
3519 ],
3520 "version": 42, # Deprecated.
3521 "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.
3522 #
3523 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
3524 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
3525 { # Associates `members` with a `role`.
3526 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3527 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3528 #
3529 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3530 #
3531 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3532 #
3533 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
3534 #
3535 #
3536 #
3537 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3538 #
3539 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3540 #
3541 #
3542 #
3543 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3544 "A String",
3545 ],
3546 "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.
3547 #
3548 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
3549 "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.
3550 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
3551 #
3552 # The application context of the containing message determines which well-known feature set of CEL is supported.
3553 "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.
3554 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003555 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003556 },
3557 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003558 "iamOwned": True or False,
3559 },
3560 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.
3561 { # Associates `members` with a `role`.
3562 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3563 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3564 #
3565 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3566 #
3567 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3568 #
3569 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
3570 #
3571 #
3572 #
3573 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3574 #
3575 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3576 #
3577 #
3578 #
3579 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3580 "A String",
3581 ],
3582 "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.
3583 #
3584 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
3585 "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.
3586 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
3587 #
3588 # The application context of the containing message determines which well-known feature set of CEL is supported.
3589 "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.
3590 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003591 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003592 },
3593 ],
3594 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
3595 }
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003596
3597
3598Returns:
3599 An object of the form:
3600
3601 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
3602 #
3603 #
3604 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003605 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003606 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003607 # **JSON Example**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003608 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003609 # { "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"] } ] }
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003610 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003611 # **YAML Example**
3612 #
3613 # 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
3614 #
3615 #
3616 #
3617 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003618 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003619 { # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003620 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003621 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003622 #
3623 # Example Policy with multiple AuditConfigs:
3624 #
3625 # { "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" ] } ] } ] }
3626 #
3627 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003628 "exemptedMembers": [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003629 "A String",
3630 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003631 "auditLogConfigs": [ # The configuration for logging of each type of permission.
3632 { # Provides the configuration for logging a type of permissions. Example:
3633 #
3634 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
3635 #
3636 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
3637 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003638 "A String",
3639 ],
3640 "logType": "A String", # The log type that this config enables.
3641 },
3642 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003643 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003644 },
3645 ],
3646 "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.
3647 { # A rule to be applied in a Policy.
3648 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3649 { # Specifies what kind of log the caller must write
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003650 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
3651 #
3652 # 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.
3653 #
3654 # Field names correspond to IAM request parameters and field values are their respective values.
3655 #
3656 # 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.
3657 #
3658 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
3659 #
3660 # At this time we do not support multiple field names (though this may be supported in the future).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003661 "field": "A String", # The field value to attribute.
3662 "metric": "A String", # The metric to update.
3663 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003664 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
3665 "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.
3666 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003667 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
3668 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003669 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3670 "permissionType": "A String", # The type of the permission that was checked.
3671 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003672 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003673 },
3674 ],
3675 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
3676 "A String",
3677 ],
3678 "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.
3679 "A String",
3680 ],
3681 "action": "A String", # Required
3682 "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.
3683 "A String",
3684 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003685 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003686 { # A condition to be met.
3687 "iam": "A String", # Trusted attributes supplied by the IAM system.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003688 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003689 "values": [ # The objects of the condition.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003690 "A String",
3691 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003692 "svc": "A String", # Trusted attributes discharged by the service.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003693 "op": "A String", # An operator to apply the subject with.
3694 },
3695 ],
3696 "description": "A String", # Human-readable description of the rule.
3697 },
3698 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003699 "version": 42, # Deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003700 "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.
3701 #
3702 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003703 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003704 { # Associates `members` with a `role`.
3705 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3706 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3707 #
3708 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3709 #
3710 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3711 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003712 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003713 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003714 #
3715 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003716 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3717 #
3718 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3719 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003720 #
3721 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003722 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003723 "A String",
3724 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003725 "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.
3726 #
3727 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
3728 "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.
3729 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
3730 #
3731 # The application context of the containing message determines which well-known feature set of CEL is supported.
3732 "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.
3733 "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.
3734 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003735 },
3736 ],
3737 "iamOwned": True or False,
3738 }</pre>
3739</div>
3740
3741<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003742 <code class="details" id="setLabels">setLabels(project, zone, instance, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003743 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003744
3745Args:
3746 project: string, Project ID for this request. (required)
3747 zone: string, The name of the zone for this request. (required)
3748 instance: string, Name of the instance scoping this request. (required)
3749 body: object, The request body. (required)
3750 The object takes the form of:
3751
3752{
3753 "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 -04003754 "labels": {
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003755 "a_key": "A String",
3756 },
3757 }
3758
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003759 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.
3760
3761For 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.
3762
3763The 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 -07003764
3765Returns:
3766 An object of the form:
3767
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003768 { # Represents an Operation resource.
3769 #
3770 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3771 #
3772 # Operations can be global, regional or zonal.
3773 # - For global operations, use the globalOperations resource.
3774 # - For regional operations, use the regionOperations resource.
3775 # - For zonal operations, use the zonalOperations resource.
3776 #
3777 # 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 -07003778 "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 -07003779 "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 -04003780 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003781 "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 -07003782 "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 -07003783 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3784 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3785 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3786 "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.
3787 "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.
3788 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3789 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3790 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3791 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3792 {
3793 "message": "A String", # [Output Only] A human-readable description of the warning code.
3794 "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.
3795 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3796 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3797 {
3798 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3799 "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).
3800 },
3801 ],
3802 },
3803 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003804 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003805 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3806 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3807 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3808 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003809 "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 -07003810 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3811 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3812 {
3813 "message": "A String", # [Output Only] An optional, human-readable error message.
3814 "code": "A String", # [Output Only] The error type identifier for this error.
3815 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3816 },
3817 ],
3818 },
3819 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3820 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003821 "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 -07003822 }</pre>
3823</div>
3824
3825<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003826 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body, requestId=None)</code>
3827 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
3828
3829Args:
3830 project: string, Project ID for this request. (required)
3831 zone: string, The name of the zone for this request. (required)
3832 instance: string, Name of the instance scoping this request. (required)
3833 body: object, The request body. (required)
3834 The object takes the form of:
3835
3836{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003837 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003838 { # A specification of the type and number of accelerator cards attached to the instance.
3839 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003840 "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 -04003841 },
3842 ],
3843 }
3844
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003845 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.
3846
3847For 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.
3848
3849The 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 -04003850
3851Returns:
3852 An object of the form:
3853
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003854 { # Represents an Operation resource.
3855 #
3856 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3857 #
3858 # Operations can be global, regional or zonal.
3859 # - For global operations, use the globalOperations resource.
3860 # - For regional operations, use the regionOperations resource.
3861 # - For zonal operations, use the zonalOperations resource.
3862 #
3863 # 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 -04003864 "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 -07003865 "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 -04003866 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3867 "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 -07003868 "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 -04003869 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3870 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3871 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3872 "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.
3873 "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.
3874 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3875 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3876 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3877 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3878 {
3879 "message": "A String", # [Output Only] A human-readable description of the warning code.
3880 "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.
3881 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3882 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3883 {
3884 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3885 "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).
3886 },
3887 ],
3888 },
3889 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003890 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003891 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3892 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3893 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3894 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003895 "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 -04003896 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3897 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3898 {
3899 "message": "A String", # [Output Only] An optional, human-readable error message.
3900 "code": "A String", # [Output Only] The error type identifier for this error.
3901 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3902 },
3903 ],
3904 },
3905 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3906 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3907 "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.
3908 }</pre>
3909</div>
3910
3911<div class="method">
3912 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003913 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
3914
3915Args:
3916 project: string, Project ID for this request. (required)
3917 zone: string, The name of the zone for this request. (required)
3918 instance: string, Name of the instance scoping this request. (required)
3919 body: object, The request body. (required)
3920 The object takes the form of:
3921
3922{
3923 "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
3924 }
3925
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003926 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.
3927
3928For 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.
3929
3930The 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 -07003931
3932Returns:
3933 An object of the form:
3934
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003935 { # Represents an Operation resource.
3936 #
3937 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3938 #
3939 # Operations can be global, regional or zonal.
3940 # - For global operations, use the globalOperations resource.
3941 # - For regional operations, use the regionOperations resource.
3942 # - For zonal operations, use the zonalOperations resource.
3943 #
3944 # 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 -07003945 "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 -07003946 "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 -04003947 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003948 "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 -07003949 "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 -07003950 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3951 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
3952 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
3953 "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.
3954 "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.
3955 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3956 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
3957 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3958 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3959 {
3960 "message": "A String", # [Output Only] A human-readable description of the warning code.
3961 "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.
3962 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3963 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3964 {
3965 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3966 "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).
3967 },
3968 ],
3969 },
3970 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003971 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003972 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
3973 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3974 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
3975 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003976 "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 -07003977 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3978 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3979 {
3980 "message": "A String", # [Output Only] An optional, human-readable error message.
3981 "code": "A String", # [Output Only] The error type identifier for this error.
3982 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3983 },
3984 ],
3985 },
3986 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3987 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003988 "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 -07003989 }</pre>
3990</div>
3991
3992<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003993 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003994 <pre>Sets metadata for the specified instance to the data included in the request.
3995
3996Args:
3997 project: string, Project ID for this request. (required)
3998 zone: string, The name of the zone for this request. (required)
3999 instance: string, Name of the instance scoping this request. (required)
4000 body: object, The request body. (required)
4001 The object takes the form of:
4002
4003{ # A metadata key/value entry.
4004 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4005 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004006 "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 -07004007 "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.
4008 },
4009 ],
4010 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004011 "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.
4012 #
4013 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004014}
4015
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004016 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.
4017
4018For 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.
4019
4020The 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 -07004021
4022Returns:
4023 An object of the form:
4024
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004025 { # Represents an Operation resource.
4026 #
4027 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4028 #
4029 # Operations can be global, regional or zonal.
4030 # - For global operations, use the globalOperations resource.
4031 # - For regional operations, use the regionOperations resource.
4032 # - For zonal operations, use the zonalOperations resource.
4033 #
4034 # 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 -07004035 "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 -07004036 "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 -04004037 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004038 "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 -07004039 "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 -07004040 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4041 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4042 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4043 "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.
4044 "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.
4045 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4046 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4047 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4048 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4049 {
4050 "message": "A String", # [Output Only] A human-readable description of the warning code.
4051 "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.
4052 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4053 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4054 {
4055 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4056 "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).
4057 },
4058 ],
4059 },
4060 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004061 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004062 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4063 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4064 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4065 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004066 "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 -07004067 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4068 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4069 {
4070 "message": "A String", # [Output Only] An optional, human-readable error message.
4071 "code": "A String", # [Output Only] The error type identifier for this error.
4072 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4073 },
4074 ],
4075 },
4076 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4077 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004078 "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 -07004079 }</pre>
4080</div>
4081
4082<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004083 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004084 <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 Cheemalapatic30d2b52017-03-13 12:12:03 -04004085
4086Args:
4087 project: string, Project ID for this request. (required)
4088 zone: string, The name of the zone for this request. (required)
4089 instance: string, Name of the instance scoping this request. (required)
4090 body: object, The request body. (required)
4091 The object takes the form of:
4092
4093{
4094 "minCpuPlatform": "A String", # Minimum cpu/platform this instance should be started at.
4095 }
4096
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004097 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.
4098
4099For 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.
4100
4101The 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 -04004102
4103Returns:
4104 An object of the form:
4105
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004106 { # Represents an Operation resource.
4107 #
4108 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4109 #
4110 # Operations can be global, regional or zonal.
4111 # - For global operations, use the globalOperations resource.
4112 # - For regional operations, use the regionOperations resource.
4113 # - For zonal operations, use the zonalOperations resource.
4114 #
4115 # 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 -04004116 "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 -07004117 "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 -04004118 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4119 "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 -07004120 "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 -04004121 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4122 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4123 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4124 "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.
4125 "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.
4126 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4127 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4128 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4129 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4130 {
4131 "message": "A String", # [Output Only] A human-readable description of the warning code.
4132 "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.
4133 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4134 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4135 {
4136 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4137 "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).
4138 },
4139 ],
4140 },
4141 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004142 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004143 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4144 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4145 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4146 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004147 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4148 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4149 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4150 {
4151 "message": "A String", # [Output Only] An optional, human-readable error message.
4152 "code": "A String", # [Output Only] The error type identifier for this error.
4153 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4154 },
4155 ],
4156 },
4157 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4158 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4159 "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.
4160 }</pre>
4161</div>
4162
4163<div class="method">
4164 <code class="details" id="setName">setName(project, zone, instance, body, requestId=None)</code>
4165 <pre>Sets name of an instance.
4166
4167Args:
4168 project: string, Project ID for this request. (required)
4169 zone: string, The name of the zone for this request. (required)
4170 instance: string, The instance name for this request. (required)
4171 body: object, The request body. (required)
4172 The object takes the form of:
4173
4174{
4175 "currentName": "A String", # The current name of this resource, used to prevent conflicts. Provide the latest name when making a request to change name.
4176 "name": "A String", # The name to be applied to the instance. Needs to be RFC 1035 compliant.
4177 }
4178
4179 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.
4180
4181For 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.
4182
4183The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4184
4185Returns:
4186 An object of the form:
4187
4188 { # Represents an Operation resource.
4189 #
4190 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4191 #
4192 # Operations can be global, regional or zonal.
4193 # - For global operations, use the globalOperations resource.
4194 # - For regional operations, use the regionOperations resource.
4195 # - For zonal operations, use the zonalOperations resource.
4196 #
4197 # 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 ==)
4198 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4199 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4200 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4201 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4202 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4203 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4204 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4205 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4206 "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.
4207 "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.
4208 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4209 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4210 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4211 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4212 {
4213 "message": "A String", # [Output Only] A human-readable description of the warning code.
4214 "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.
4215 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4216 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4217 {
4218 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4219 "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).
4220 },
4221 ],
4222 },
4223 ],
4224 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
4225 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4226 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4227 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4228 "name": "A String", # [Output Only] Name of the resource.
4229 "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 -04004230 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4231 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4232 {
4233 "message": "A String", # [Output Only] An optional, human-readable error message.
4234 "code": "A String", # [Output Only] The error type identifier for this error.
4235 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4236 },
4237 ],
4238 },
4239 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4240 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4241 "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.
4242 }</pre>
4243</div>
4244
4245<div class="method">
4246 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004247 <pre>Sets an instance's scheduling options.
4248
4249Args:
4250 project: string, Project ID for this request. (required)
4251 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004252 instance: string, Instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004253 body: object, The request body. (required)
4254 The object takes the form of:
4255
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004256{ # Sets the scheduling options for an Instance. NextID: 9
4257 "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.
4258 "nodeAffinities": [ # A set of node affinity and anti-affinity.
4259 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
4260 "operator": "A String", # Defines the operation of node selection.
4261 "values": [ # Corresponds to the label values of Node resource.
4262 "A String",
4263 ],
4264 "key": "A String", # Corresponds to the label key of Node resource.
4265 },
4266 ],
4267 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004268 "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 -04004269 #
4270 # 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 -07004271 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
4272 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004273}
4274
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004275 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.
4276
4277For 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.
4278
4279The 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 -07004280
4281Returns:
4282 An object of the form:
4283
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004284 { # Represents an Operation resource.
4285 #
4286 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4287 #
4288 # Operations can be global, regional or zonal.
4289 # - For global operations, use the globalOperations resource.
4290 # - For regional operations, use the regionOperations resource.
4291 # - For zonal operations, use the zonalOperations resource.
4292 #
4293 # 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 -07004294 "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 -07004295 "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 -04004296 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004297 "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 -07004298 "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 -07004299 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4300 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4301 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4302 "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.
4303 "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.
4304 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4305 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4306 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4307 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4308 {
4309 "message": "A String", # [Output Only] A human-readable description of the warning code.
4310 "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.
4311 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4312 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4313 {
4314 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4315 "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).
4316 },
4317 ],
4318 },
4319 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004320 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004321 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4322 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4323 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4324 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004325 "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 -07004326 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4327 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4328 {
4329 "message": "A String", # [Output Only] An optional, human-readable error message.
4330 "code": "A String", # [Output Only] The error type identifier for this error.
4331 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4332 },
4333 ],
4334 },
4335 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4336 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004337 "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 -07004338 }</pre>
4339</div>
4340
4341<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004342 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body, requestId=None)</code>
4343 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004344
4345Args:
4346 project: string, Project ID for this request. (required)
4347 zone: string, The name of the zone for this request. (required)
4348 instance: string, Name of the instance resource to start. (required)
4349 body: object, The request body. (required)
4350 The object takes the form of:
4351
4352{
4353 "scopes": [ # The list of scopes to be made available for this service account.
4354 "A String",
4355 ],
4356 "email": "A String", # Email address of the service account.
4357 }
4358
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004359 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.
4360
4361For 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.
4362
4363The 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 -07004364
4365Returns:
4366 An object of the form:
4367
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004368 { # Represents an Operation resource.
4369 #
4370 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4371 #
4372 # Operations can be global, regional or zonal.
4373 # - For global operations, use the globalOperations resource.
4374 # - For regional operations, use the regionOperations resource.
4375 # - For zonal operations, use the zonalOperations resource.
4376 #
4377 # 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 -07004378 "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 -07004379 "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 -04004380 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004381 "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 -07004382 "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 -07004383 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4384 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4385 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4386 "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.
4387 "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.
4388 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4389 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4390 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4391 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4392 {
4393 "message": "A String", # [Output Only] A human-readable description of the warning code.
4394 "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.
4395 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4396 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4397 {
4398 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4399 "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).
4400 },
4401 ],
4402 },
4403 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004404 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004405 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4406 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4407 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4408 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004409 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4410 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4411 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4412 {
4413 "message": "A String", # [Output Only] An optional, human-readable error message.
4414 "code": "A String", # [Output Only] The error type identifier for this error.
4415 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4416 },
4417 ],
4418 },
4419 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4420 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4421 "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.
4422 }</pre>
4423</div>
4424
4425<div class="method">
4426 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body, requestId=None)</code>
4427 <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.
4428
4429Args:
4430 project: string, Project ID for this request. (required)
4431 zone: string, The name of the zone for this request. (required)
4432 instance: string, Name or id of the instance scoping this request. (required)
4433 body: object, The request body. (required)
4434 The object takes the form of:
4435
4436{ # The policy describes the baseline against which Instance boot integrity is measured.
4437 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
4438 }
4439
4440 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.
4441
4442For 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.
4443
4444The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4445
4446Returns:
4447 An object of the form:
4448
4449 { # Represents an Operation resource.
4450 #
4451 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4452 #
4453 # Operations can be global, regional or zonal.
4454 # - For global operations, use the globalOperations resource.
4455 # - For regional operations, use the regionOperations resource.
4456 # - For zonal operations, use the zonalOperations resource.
4457 #
4458 # 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 ==)
4459 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4460 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4461 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4462 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4463 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4464 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4465 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4466 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4467 "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.
4468 "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.
4469 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4470 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4471 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4472 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4473 {
4474 "message": "A String", # [Output Only] A human-readable description of the warning code.
4475 "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.
4476 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4477 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4478 {
4479 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4480 "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).
4481 },
4482 ],
4483 },
4484 ],
4485 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
4486 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4487 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4488 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4489 "name": "A String", # [Output Only] Name of the resource.
4490 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4491 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4492 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4493 {
4494 "message": "A String", # [Output Only] An optional, human-readable error message.
4495 "code": "A String", # [Output Only] The error type identifier for this error.
4496 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4497 },
4498 ],
4499 },
4500 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4501 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4502 "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.
4503 }</pre>
4504</div>
4505
4506<div class="method">
4507 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body, requestId=None)</code>
4508 <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.
4509
4510Args:
4511 project: string, Project ID for this request. (required)
4512 zone: string, The name of the zone for this request. (required)
4513 instance: string, Name of the instance scoping this request. (required)
4514 body: object, The request body. (required)
4515 The object takes the form of:
4516
4517{ # The policy describes the baseline against which VM instance boot integrity is measured.
4518 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
4519}
4520
4521 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.
4522
4523For 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.
4524
4525The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4526
4527Returns:
4528 An object of the form:
4529
4530 { # Represents an Operation resource.
4531 #
4532 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4533 #
4534 # Operations can be global, regional or zonal.
4535 # - For global operations, use the globalOperations resource.
4536 # - For regional operations, use the regionOperations resource.
4537 # - For zonal operations, use the zonalOperations resource.
4538 #
4539 # 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 ==)
4540 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4541 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4542 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4543 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4544 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4545 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4546 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4547 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4548 "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.
4549 "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.
4550 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4551 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4552 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4553 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4554 {
4555 "message": "A String", # [Output Only] A human-readable description of the warning code.
4556 "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.
4557 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4558 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4559 {
4560 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4561 "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).
4562 },
4563 ],
4564 },
4565 ],
4566 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
4567 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4568 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4569 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4570 "name": "A String", # [Output Only] Name of the resource.
4571 "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 -07004572 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4573 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4574 {
4575 "message": "A String", # [Output Only] An optional, human-readable error message.
4576 "code": "A String", # [Output Only] The error type identifier for this error.
4577 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4578 },
4579 ],
4580 },
4581 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4582 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004583 "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 -07004584 }</pre>
4585</div>
4586
4587<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004588 <code class="details" id="setTags">setTags(project, zone, instance, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004589 <pre>Sets network tags for the specified instance to the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004590
4591Args:
4592 project: string, Project ID for this request. (required)
4593 zone: string, The name of the zone for this request. (required)
4594 instance: string, Name of the instance scoping this request. (required)
4595 body: object, The request body. (required)
4596 The object takes the form of:
4597
4598{ # A set of instance tags.
4599 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4600 "A String",
4601 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004602 "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 -07004603 #
4604 # To see the latest fingerprint, make get() request to the instance.
4605}
4606
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004607 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.
4608
4609For 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.
4610
4611The 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 -07004612
4613Returns:
4614 An object of the form:
4615
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004616 { # Represents an Operation resource.
4617 #
4618 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4619 #
4620 # Operations can be global, regional or zonal.
4621 # - For global operations, use the globalOperations resource.
4622 # - For regional operations, use the regionOperations resource.
4623 # - For zonal operations, use the zonalOperations resource.
4624 #
4625 # 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 -07004626 "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 -07004627 "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 -04004628 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004629 "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 -07004630 "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 -07004631 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4632 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4633 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4634 "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.
4635 "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.
4636 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4637 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4638 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4639 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4640 {
4641 "message": "A String", # [Output Only] A human-readable description of the warning code.
4642 "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.
4643 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4644 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4645 {
4646 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4647 "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).
4648 },
4649 ],
4650 },
4651 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004652 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004653 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4654 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4655 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4656 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004657 "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 -07004658 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4659 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4660 {
4661 "message": "A String", # [Output Only] An optional, human-readable error message.
4662 "code": "A String", # [Output Only] The error type identifier for this error.
4663 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4664 },
4665 ],
4666 },
4667 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4668 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004669 "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 -07004670 }</pre>
4671</div>
4672
4673<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004674 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
4675 <pre>Simulates a maintenance event on the instance.
4676
4677Args:
4678 project: string, Project ID for this request. (required)
4679 zone: string, The name of the zone for this request. (required)
4680 instance: string, Name of the instance scoping this request. (required)
4681
4682Returns:
4683 An object of the form:
4684
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004685 { # Represents an Operation resource.
4686 #
4687 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4688 #
4689 # Operations can be global, regional or zonal.
4690 # - For global operations, use the globalOperations resource.
4691 # - For regional operations, use the regionOperations resource.
4692 # - For zonal operations, use the zonalOperations resource.
4693 #
4694 # 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 -04004695 "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 -07004696 "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 -04004697 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4698 "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 -07004699 "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 -04004700 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4701 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4702 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4703 "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.
4704 "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.
4705 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4706 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4707 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4708 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4709 {
4710 "message": "A String", # [Output Only] A human-readable description of the warning code.
4711 "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.
4712 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4713 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4714 {
4715 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4716 "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).
4717 },
4718 ],
4719 },
4720 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004721 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004722 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4723 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4724 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4725 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004726 "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 -04004727 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4728 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4729 {
4730 "message": "A String", # [Output Only] An optional, human-readable error message.
4731 "code": "A String", # [Output Only] The error type identifier for this error.
4732 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4733 },
4734 ],
4735 },
4736 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4737 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4738 "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.
4739 }</pre>
4740</div>
4741
4742<div class="method">
4743 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004744 <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 -07004745
4746Args:
4747 project: string, Project ID for this request. (required)
4748 zone: string, The name of the zone for this request. (required)
4749 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004750 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.
4751
4752For 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.
4753
4754The 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 -07004755
4756Returns:
4757 An object of the form:
4758
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004759 { # Represents an Operation resource.
4760 #
4761 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4762 #
4763 # Operations can be global, regional or zonal.
4764 # - For global operations, use the globalOperations resource.
4765 # - For regional operations, use the regionOperations resource.
4766 # - For zonal operations, use the zonalOperations resource.
4767 #
4768 # 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 -07004769 "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 -07004770 "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 -04004771 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004772 "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 -07004773 "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 -07004774 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4775 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4776 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4777 "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.
4778 "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.
4779 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4780 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4781 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4782 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4783 {
4784 "message": "A String", # [Output Only] A human-readable description of the warning code.
4785 "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.
4786 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4787 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4788 {
4789 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4790 "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).
4791 },
4792 ],
4793 },
4794 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004795 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004796 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4797 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4798 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4799 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004800 "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 -07004801 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4802 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4803 {
4804 "message": "A String", # [Output Only] An optional, human-readable error message.
4805 "code": "A String", # [Output Only] The error type identifier for this error.
4806 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4807 },
4808 ],
4809 },
4810 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4811 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004812 "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 -07004813 }</pre>
4814</div>
4815
4816<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004817 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004818 <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 -07004819
4820Args:
4821 project: string, Project ID for this request. (required)
4822 zone: string, The name of the zone for this request. (required)
4823 instance: string, Name of the instance resource to start. (required)
4824 body: object, The request body. (required)
4825 The object takes the form of:
4826
4827{
4828 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
4829 #
4830 # If the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance start will not succeed.
4831 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004832 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004833 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
4834 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
4835 #
4836 # The key must meet the following requirements before you can provide it to Compute Engine:
4837 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004838 # - 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 -07004839 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004840 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004841 },
4842 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
4843 #
4844 # In order to start the instance, the disk url and its corresponding key must be provided.
4845 #
4846 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
4847 {
4848 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
4849 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004850 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004851 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
4852 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
4853 #
4854 # The key must meet the following requirements before you can provide it to Compute Engine:
4855 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004856 # - 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 -07004857 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004858 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004859 },
4860 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
4861 },
4862 ],
4863 }
4864
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004865 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.
4866
4867For 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.
4868
4869The 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 -07004870
4871Returns:
4872 An object of the form:
4873
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004874 { # Represents an Operation resource.
4875 #
4876 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4877 #
4878 # Operations can be global, regional or zonal.
4879 # - For global operations, use the globalOperations resource.
4880 # - For regional operations, use the regionOperations resource.
4881 # - For zonal operations, use the zonalOperations resource.
4882 #
4883 # 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 -07004884 "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 -07004885 "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 -04004886 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004887 "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 -07004888 "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 -07004889 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4890 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4891 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4892 "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.
4893 "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.
4894 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4895 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4896 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4897 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4898 {
4899 "message": "A String", # [Output Only] A human-readable description of the warning code.
4900 "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.
4901 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4902 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4903 {
4904 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4905 "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).
4906 },
4907 ],
4908 },
4909 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004910 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004911 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4912 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4913 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4914 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004915 "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 -07004916 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4917 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4918 {
4919 "message": "A String", # [Output Only] An optional, human-readable error message.
4920 "code": "A String", # [Output Only] The error type identifier for this error.
4921 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4922 },
4923 ],
4924 },
4925 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4926 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004927 "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 -07004928 }</pre>
4929</div>
4930
4931<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004932 <code class="details" id="stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004933 <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 -07004934
4935Args:
4936 project: string, Project ID for this request. (required)
4937 zone: string, The name of the zone for this request. (required)
4938 instance: string, Name of the instance resource to stop. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004939 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004940 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.
4941
4942For 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.
4943
4944The 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 -07004945
4946Returns:
4947 An object of the form:
4948
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004949 { # Represents an Operation resource.
4950 #
4951 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4952 #
4953 # Operations can be global, regional or zonal.
4954 # - For global operations, use the globalOperations resource.
4955 # - For regional operations, use the regionOperations resource.
4956 # - For zonal operations, use the zonalOperations resource.
4957 #
4958 # 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 -07004959 "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 -07004960 "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 -04004961 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004962 "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 -07004963 "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 -07004964 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4965 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
4966 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
4967 "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.
4968 "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.
4969 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4970 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
4971 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4972 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4973 {
4974 "message": "A String", # [Output Only] A human-readable description of the warning code.
4975 "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.
4976 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4977 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4978 {
4979 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4980 "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).
4981 },
4982 ],
4983 },
4984 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004985 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004986 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
4987 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4988 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
4989 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004990 "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 -07004991 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4992 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4993 {
4994 "message": "A String", # [Output Only] An optional, human-readable error message.
4995 "code": "A String", # [Output Only] The error type identifier for this error.
4996 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4997 },
4998 ],
4999 },
5000 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5001 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005002 "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 -07005003 }</pre>
5004</div>
5005
5006<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005007 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005008 <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.
5009
5010Args:
5011 project: string, Project ID for this request. (required)
5012 zone: string, The name of the zone for this request. (required)
5013 instance: string, Name of the instance resource to suspend. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005014 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005015 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.
5016
5017For 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.
5018
5019The 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 -07005020
5021Returns:
5022 An object of the form:
5023
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005024 { # Represents an Operation resource.
5025 #
5026 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5027 #
5028 # Operations can be global, regional or zonal.
5029 # - For global operations, use the globalOperations resource.
5030 # - For regional operations, use the regionOperations resource.
5031 # - For zonal operations, use the zonalOperations resource.
5032 #
5033 # 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 -07005034 "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 -07005035 "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 -04005036 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005037 "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 -07005038 "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 -07005039 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5040 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
5041 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
5042 "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.
5043 "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.
5044 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
5045 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
5046 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5047 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5048 {
5049 "message": "A String", # [Output Only] A human-readable description of the warning code.
5050 "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.
5051 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5052 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5053 {
5054 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5055 "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).
5056 },
5057 ],
5058 },
5059 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005060 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005061 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
5062 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5063 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
5064 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005065 "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 -07005066 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5067 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5068 {
5069 "message": "A String", # [Output Only] An optional, human-readable error message.
5070 "code": "A String", # [Output Only] The error type identifier for this error.
5071 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5072 },
5073 ],
5074 },
5075 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5076 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005077 "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 -07005078 }</pre>
5079</div>
5080
5081<div class="method">
5082 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
5083 <pre>Returns permissions that a caller has on the specified resource.
5084
5085Args:
5086 project: string, Project ID for this request. (required)
5087 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005088 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005089 body: object, The request body. (required)
5090 The object takes the form of:
5091
5092{
5093 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
5094 "A String",
5095 ],
5096 }
5097
5098
5099Returns:
5100 An object of the form:
5101
5102 {
5103 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
5104 "A String",
5105 ],
5106 }</pre>
5107</div>
5108
5109<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005110 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005111 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005112
5113Args:
5114 project: string, Project ID for this request. (required)
5115 zone: string, The name of the zone for this request. (required)
5116 instance: string, The instance name for this request. (required)
5117 networkInterface: string, The name of the network interface where the access config is attached. (required)
5118 body: object, The request body. (required)
5119 The object takes the form of:
5120
5121{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
5122 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005123 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005124 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005125 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005126 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
5127 #
5128 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5129 #
5130 # 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 -07005131 "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 -07005132 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005133 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005134 "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 -07005135}
5136
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005137 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.
5138
5139For 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.
5140
5141The 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 -07005142
5143Returns:
5144 An object of the form:
5145
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005146 { # Represents an Operation resource.
5147 #
5148 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5149 #
5150 # Operations can be global, regional or zonal.
5151 # - For global operations, use the globalOperations resource.
5152 # - For regional operations, use the regionOperations resource.
5153 # - For zonal operations, use the zonalOperations resource.
5154 #
5155 # 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 -07005156 "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 -07005157 "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 -04005158 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005159 "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 -07005160 "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 -07005161 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5162 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
5163 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
5164 "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.
5165 "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.
5166 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
5167 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
5168 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5169 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5170 {
5171 "message": "A String", # [Output Only] A human-readable description of the warning code.
5172 "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.
5173 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5174 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5175 {
5176 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5177 "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).
5178 },
5179 ],
5180 },
5181 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005182 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005183 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
5184 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5185 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
5186 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005187 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5188 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5189 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5190 {
5191 "message": "A String", # [Output Only] An optional, human-readable error message.
5192 "code": "A String", # [Output Only] The error type identifier for this error.
5193 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5194 },
5195 ],
5196 },
5197 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5198 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5199 "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.
5200 }</pre>
5201</div>
5202
5203<div class="method">
5204 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body, requestId=None)</code>
5205 <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.
5206
5207Args:
5208 project: string, Project ID for this request. (required)
5209 zone: string, The name of the zone for this request. (required)
5210 instance: string, Name of the instance scoping this request. (required)
5211 body: object, The request body. (required)
5212 The object takes the form of:
5213
5214{ # A set of Display Device options
5215 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
5216}
5217
5218 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.
5219
5220For 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.
5221
5222The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5223
5224Returns:
5225 An object of the form:
5226
5227 { # Represents an Operation resource.
5228 #
5229 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5230 #
5231 # Operations can be global, regional or zonal.
5232 # - For global operations, use the globalOperations resource.
5233 # - For regional operations, use the regionOperations resource.
5234 # - For zonal operations, use the zonalOperations resource.
5235 #
5236 # 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 ==)
5237 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5238 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5239 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
5240 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5241 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5242 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5243 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
5244 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
5245 "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.
5246 "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.
5247 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
5248 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
5249 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5250 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5251 {
5252 "message": "A String", # [Output Only] A human-readable description of the warning code.
5253 "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.
5254 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5255 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5256 {
5257 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5258 "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).
5259 },
5260 ],
5261 },
5262 ],
5263 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
5264 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
5265 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5266 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
5267 "name": "A String", # [Output Only] Name of the resource.
5268 "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 -07005269 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5270 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5271 {
5272 "message": "A String", # [Output Only] An optional, human-readable error message.
5273 "code": "A String", # [Output Only] The error type identifier for this error.
5274 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5275 },
5276 ],
5277 },
5278 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5279 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005280 "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 -07005281 }</pre>
5282</div>
5283
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04005284<div class="method">
5285 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body, requestId=None)</code>
5286 <pre>Updates an instance's network interface. This method follows PATCH semantics.
5287
5288Args:
5289 project: string, Project ID for this request. (required)
5290 zone: string, The name of the zone for this request. (required)
5291 instance: string, The instance name for this request. (required)
5292 networkInterface: string, The name of the network interface to update. (required)
5293 body: object, The request body. (required)
5294 The object takes the form of:
5295
5296{ # A network interface resource attached to an instance.
5297 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005298 "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 -04005299 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005300 "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.
5301 "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 -04005302 },
5303 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005304 "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.
5305 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
5306 "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.
5307 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
5308 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5309 "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.
5310 "setPublicDns": True or False, # Specifies whether a public DNS ?A? record should be created for the external IP address of this access configuration.
5311 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
5312 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
5313 #
5314 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5315 #
5316 # 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.
5317 "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.
5318 "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.
5319 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
5320 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
5321 },
5322 ],
5323 "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.
5324 "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.
5325 "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:
5326 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5327 # - regions/region/subnetworks/subnetwork
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04005328 "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.
5329 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04005330 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
5331 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5332 # - projects/project/global/networks/network
5333 # - global/networks/default
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04005334}
5335
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005336 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.
5337
5338For 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.
5339
5340The 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 -04005341
5342Returns:
5343 An object of the form:
5344
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005345 { # Represents an Operation resource.
5346 #
5347 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5348 #
5349 # Operations can be global, regional or zonal.
5350 # - For global operations, use the globalOperations resource.
5351 # - For regional operations, use the regionOperations resource.
5352 # - For zonal operations, use the zonalOperations resource.
5353 #
5354 # 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 -04005355 "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 -07005356 "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 -04005357 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
5358 "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 -07005359 "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 -04005360 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5361 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
5362 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
5363 "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.
5364 "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.
5365 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
5366 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
5367 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5368 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5369 {
5370 "message": "A String", # [Output Only] A human-readable description of the warning code.
5371 "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.
5372 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5373 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5374 {
5375 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5376 "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).
5377 },
5378 ],
5379 },
5380 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005381 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04005382 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
5383 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5384 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
5385 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005386 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5387 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5388 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5389 {
5390 "message": "A String", # [Output Only] An optional, human-readable error message.
5391 "code": "A String", # [Output Only] The error type identifier for this error.
5392 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5393 },
5394 ],
5395 },
5396 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5397 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5398 "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.
5399 }</pre>
5400</div>
5401
5402<div class="method">
5403 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body, requestId=None)</code>
5404 <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.
5405
5406Args:
5407 project: string, Project ID for this request. (required)
5408 zone: string, The name of the zone for this request. (required)
5409 instance: string, Name or id of the instance scoping this request. (required)
5410 body: object, The request body. (required)
5411 The object takes the form of:
5412
5413{ # A set of Shielded Instance options.
5414 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
5415 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
5416 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
5417}
5418
5419 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.
5420
5421For 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.
5422
5423The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5424
5425Returns:
5426 An object of the form:
5427
5428 { # Represents an Operation resource.
5429 #
5430 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5431 #
5432 # Operations can be global, regional or zonal.
5433 # - For global operations, use the globalOperations resource.
5434 # - For regional operations, use the regionOperations resource.
5435 # - For zonal operations, use the zonalOperations resource.
5436 #
5437 # 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 ==)
5438 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5439 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5440 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
5441 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5442 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5443 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5444 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
5445 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
5446 "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.
5447 "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.
5448 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
5449 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
5450 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5451 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5452 {
5453 "message": "A String", # [Output Only] A human-readable description of the warning code.
5454 "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.
5455 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5456 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5457 {
5458 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5459 "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).
5460 },
5461 ],
5462 },
5463 ],
5464 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
5465 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
5466 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5467 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
5468 "name": "A String", # [Output Only] Name of the resource.
5469 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5470 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5471 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5472 {
5473 "message": "A String", # [Output Only] An optional, human-readable error message.
5474 "code": "A String", # [Output Only] The error type identifier for this error.
5475 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5476 },
5477 ],
5478 },
5479 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5480 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5481 "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.
5482 }</pre>
5483</div>
5484
5485<div class="method">
5486 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body, requestId=None)</code>
5487 <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.
5488
5489Args:
5490 project: string, Project ID for this request. (required)
5491 zone: string, The name of the zone for this request. (required)
5492 instance: string, Name of the instance scoping this request. (required)
5493 body: object, The request body. (required)
5494 The object takes the form of:
5495
5496{ # A set of Shielded VM options.
5497 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
5498 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
5499 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
5500}
5501
5502 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.
5503
5504For 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.
5505
5506The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5507
5508Returns:
5509 An object of the form:
5510
5511 { # Represents an Operation resource.
5512 #
5513 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5514 #
5515 # Operations can be global, regional or zonal.
5516 # - For global operations, use the globalOperations resource.
5517 # - For regional operations, use the regionOperations resource.
5518 # - For zonal operations, use the zonalOperations resource.
5519 #
5520 # 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 ==)
5521 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5522 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5523 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
5524 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5525 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5526 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5527 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
5528 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
5529 "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.
5530 "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.
5531 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
5532 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
5533 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5534 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5535 {
5536 "message": "A String", # [Output Only] A human-readable description of the warning code.
5537 "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.
5538 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5539 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5540 {
5541 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5542 "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).
5543 },
5544 ],
5545 },
5546 ],
5547 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
5548 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
5549 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5550 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
5551 "name": "A String", # [Output Only] Name of the resource.
5552 "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 -04005553 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5554 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5555 {
5556 "message": "A String", # [Output Only] An optional, human-readable error message.
5557 "code": "A String", # [Output Only] The error type identifier for this error.
5558 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5559 },
5560 ],
5561 },
5562 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5563 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5564 "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.
5565 }</pre>
5566</div>
5567
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005568</body></html>