blob: 6e24e75a1f19381b86f1ba80719f0a2fe2e3fde1 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, 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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=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">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#attachDisk">attachDisk(project, zone, instance, body=None, 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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#close">close()</a></code></p>
94<p class="firstline">Close httplib2 connections.</p>
95<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Deletes an access config from an instance's network interface.</p>
101<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Detaches a disk from an instance.</p>
104<p class="toc_element">
105 <code><a href="#get">get(project, zone, instance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns the specified Instance resource. Gets a list of available instances by making a list() request.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</a></code></p>
109<p class="firstline">Returns effective firewalls applied to an interface of the instance.</p>
110<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Returns the specified guest attributes entry.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#getScreenshot">getScreenshot(project, zone, instance)</a></code></p>
118<p class="firstline">Returns the screenshot from the specified instance.</p>
119<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700120 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
124<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
125<p class="toc_element">
126 <code><a href="#getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</a></code></p>
127<p class="firstline">Returns the Shielded VM Identity of an instance</p>
128<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 <code><a href="#insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None, sourceMachineImage=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
131<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700132 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
134<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700135 <code><a href="#listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700136<p class="firstline">Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400137<p class="toc_element">
138 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
139<p class="firstline">Retrieves the next page of results.</p>
140<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700141 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
142<p class="firstline">Retrieves the next page of results.</p>
143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
145<p class="firstline">Removes resource policies from an instance.</p>
146<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
148<p class="firstline">Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#resume">resume(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<p class="firstline">Resumes an instance that was suspended using the instances().suspend method.</p>
152<p class="toc_element">
153 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
154<p class="firstline">Sets deletion protection on the instance.</p>
155<p class="toc_element">
156 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#setLabels">setLabels(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
167<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 <code><a href="#setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
173<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175<p class="firstline">Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400176<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700177 <code><a href="#setName">setName(project, zone, instance, body=None, requestId=None)</a></code></p>
178<p class="firstline">Sets name of an instance.</p>
179<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 <code><a href="#setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700181<p class="firstline">Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700182<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400184<p class="firstline">Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.</p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800185<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187<p class="firstline">Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700188<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 <code><a href="#setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700190<p class="firstline">Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700191<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 <code><a href="#setTags">setTags(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193<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 -0700194<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
196<p class="firstline">Simulates a maintenance event on the instance.</p>
197<p class="toc_element">
198 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
199<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
200<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
203<p class="toc_element">
204 <code><a href="#stop">stop(project, zone, instance, requestId=None)</a></code></p>
205<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>
206<p class="toc_element">
207 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
208<p class="firstline">This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700209<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700210 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700211<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 <code><a href="#update">update(project, zone, instance, body=None, minimalAction=None, mostDisruptiveAllowedAction=None, requestId=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700214<p class="firstline">Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.</p>
215<p class="toc_element">
216 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217<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>
218<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220<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>
221<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
224<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226<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>
227<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 <code><a href="#updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229<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 -0700230<h3>Method Details</h3>
231<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700233 <pre>Adds an access config to an instance&#x27;s network interface.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234
235Args:
236 project: string, Project ID for this request. (required)
237 zone: string, The name of the zone for this request. (required)
238 instance: string, The instance name for this request. (required)
239 networkInterface: string, The name of the network interface to add to this instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241 The object takes the form of:
242
Bu Sun Kim65020912020-05-20 12:08:20 -0700243{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
244 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
245 &quot;name&quot;: &quot;A String&quot;, # 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.
246 &quot;natIP&quot;: &quot;A String&quot;, # 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.
247 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 #
249 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
250 #
251 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
253 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
254 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700255}
256
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257 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.
258
259For 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.
260
261The 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 -0700262
263Returns:
264 An object of the form:
265
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700266 { # Represents an Operation resource.
267 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700268 # Google Compute Engine has three Operation resources:
269 #
270 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
271 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
273 #
274 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700275 # - For global operations, use the `globalOperations` resource.
276 # - For regional operations, use the `regionOperations` resource.
277 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
281 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
282 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
283 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
284 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
285 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700286 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
288 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
289 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700290 },
291 ],
292 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
294 &quot;httpErrorStatusCode&quot;: 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.
295 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
296 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
297 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
298 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
299 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
300 &quot;progress&quot;: 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.
301 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
302 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
303 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
304 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
305 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
306 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
307 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
308 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
309 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
310 {
311 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
312 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
313 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
314 {
315 &quot;key&quot;: &quot;A String&quot;, # [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).
316 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
317 },
318 ],
319 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
320 },
321 ],
322 &quot;zone&quot;: &quot;A String&quot;, # [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 -0700323 }</pre>
324</div>
325
326<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700327 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
328 <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.
329
330Args:
331 project: string, Project ID for this request. (required)
332 zone: string, The name of the zone for this request. (required)
333 instance: string, The instance name for this request. (required)
334 body: object, The request body.
335 The object takes the form of:
336
337{
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 &quot;resourcePolicies&quot;: [ # Resource policies to be added to this instance.
339 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 ],
341 }
342
343 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.
344
345For 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.
346
347The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
348
349Returns:
350 An object of the form:
351
352 { # Represents an Operation resource.
353 #
354 # Google Compute Engine has three Operation resources:
355 #
356 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
357 #
358 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
359 #
360 # Operations can be global, regional or zonal.
361 # - For global operations, use the `globalOperations` resource.
362 # - For regional operations, use the `regionOperations` resource.
363 # - For zonal operations, use the `zonalOperations` resource.
364 #
365 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
367 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
368 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
369 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
370 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
371 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700372 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
374 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
375 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 },
377 ],
378 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
380 &quot;httpErrorStatusCode&quot;: 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.
381 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
382 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
383 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
384 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
385 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
386 &quot;progress&quot;: 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.
387 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
388 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
389 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
390 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
391 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
392 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
393 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
394 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
395 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
396 {
397 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
398 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
399 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
400 {
401 &quot;key&quot;: &quot;A String&quot;, # [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).
402 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
403 },
404 ],
405 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
406 },
407 ],
408 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Dan O'Mearadd494642020-05-01 07:42:23 -0700409 }</pre>
410</div>
411
412<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700413 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700415
416Args:
417 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700418 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 `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700419
Dan O'Mearadd494642020-05-01 07:42:23 -0700420For 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 -0700421
Dan O'Mearadd494642020-05-01 07:42:23 -0700422You 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 -0700423
Bu Sun Kim65020912020-05-20 12:08:20 -0700424To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700426 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`)
427 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
428
429You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
430
431Currently, only sorting by `name` or `creationTimestamp desc` is supported.
432 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700433 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700434
435Returns:
436 An object of the form:
437
438 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700439 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
440 &quot;items&quot;: { # An object that contains a list of instances scoped by zone.
441 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of instances.
442 &quot;instances&quot;: [ # [Output Only] A list of instances contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 { # Represents an Instance resource.
444 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700445 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;canIpForward&quot;: 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700447 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
448 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
449 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700450 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
451 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
452 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
453 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
454 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700455 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &quot;autoDelete&quot;: 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).
457 &quot;boot&quot;: 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.
458 &quot;deviceName&quot;: &quot;A String&quot;, # 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.
459 #
460 # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700461 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700462 #
463 # 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.
464 #
465 # 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.
466 #
467 # 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.
468 #
469 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -0700470 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
471 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
472 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
473 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 #
475 # The key must meet the following requirements before you can provide it to Compute Engine:
476 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 # - 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 -0700478 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700480 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700481 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
482 &quot;guestOsFeatures&quot;: [ # 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.
483 { # Guest OS features.
484 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
485 },
486 ],
487 &quot;index&quot;: 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.
488 &quot;initializeParams&quot;: { # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700489 #
490 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
491 #
492 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
494 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
495 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
496 &quot;diskType&quot;: &quot;A String&quot;, # 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 -0700497 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
498 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700499 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700500 # 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:
501 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
502 # - projects/project/zones/zone/diskTypes/diskType
503 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 &quot;guestOsFeatures&quot;: [ # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 #
506 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
507 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700508 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509 },
510 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
512 &quot;a_key&quot;: &quot;A String&quot;,
513 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700514 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
516 &quot;resourcePolicies&quot;: [ # 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.
517 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700520 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700521 # 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:
522 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700523 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700524 #
525 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700527 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700528 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 # To create a disk with a custom image that you created, specify the image name in the following format:
530 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700531 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700532 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 # 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:
534 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700535 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800536 #
537 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700538 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 #
540 # 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.
541 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
542 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
543 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
544 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 #
546 # The key must meet the following requirements before you can provide it to Compute Engine:
547 # - The key is wrapped using a RSA public key certificate provided by Google.
548 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
549 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
551 },
552 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
553 #
554 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
555 # global/snapshots/my-backup
556 #
557 #
558 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700559 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
561 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
562 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
563 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
564 #
565 # The key must meet the following requirements before you can provide it to Compute Engine:
566 # - The key is wrapped using a RSA public key certificate provided by Google.
567 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
568 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
569 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700571 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 &quot;interface&quot;: &quot;A String&quot;, # 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.
573 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
574 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
575 &quot;A String&quot;,
576 ],
577 &quot;mode&quot;: &quot;A String&quot;, # 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.
578 &quot;shieldedInstanceInitialState&quot;: { # 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
579 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -0700580 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700581 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
582 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700583 },
584 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700585 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -0700586 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
588 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700589 },
590 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700591 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
594 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700595 },
596 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700597 &quot;pk&quot;: { # The Platform Key (PK).
598 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
599 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700600 },
601 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800603 #
604 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
605 #
606 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700607 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700608 },
609 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700610 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
611 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
612 },
613 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
614 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the instance&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance.
615 #
616 # To see the latest fingerprint, make get() request to the instance.
617 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
618 { # A specification of the type and number of accelerator cards attached to the instance.
619 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
620 &quot;acceleratorType&quot;: &quot;A String&quot;, # 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.
621 },
622 ],
623 &quot;hostname&quot;: &quot;A String&quot;, # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
624 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
625 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
626 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for this request, which is essentially a hash of the label&#x27;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.
627 #
628 # To see the latest fingerprint, make get() request to the instance.
629 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
630 &quot;a_key&quot;: &quot;A String&quot;,
631 },
632 &quot;machineType&quot;: &quot;A String&quot;, # 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:
633 # zones/us-central1-f/machineTypes/n1-standard-1
634 #
635 #
636 # 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):
637 # zones/zone/machineTypes/custom-CPUS-MEMORY
638 #
639 #
640 # For example: zones/us-central1-f/machineTypes/custom-4-5120
641 #
642 # For a full list of restrictions, read the Specifications for custom machine types.
643 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
644 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;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.
645 #
646 # To see the latest fingerprint, make a get() request to retrieve the resource.
647 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
648 {
649 &quot;key&quot;: &quot;A String&quot;, # 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.
650 &quot;value&quot;: &quot;A String&quot;, # 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).
651 },
652 ],
653 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
654 },
655 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;.
656 &quot;name&quot;: &quot;A String&quot;, # 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.
657 &quot;networkInterfaces&quot;: [ # 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.
658 { # A network interface resource attached to an instance.
659 &quot;accessConfigs&quot;: [ # 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.
660 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
661 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
662 &quot;name&quot;: &quot;A String&quot;, # 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.
663 &quot;natIP&quot;: &quot;A String&quot;, # 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.
664 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
665 #
666 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
667 #
668 # 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.
669 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
670 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
671 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
672 },
673 ],
674 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
675 { # An alias IP range attached to an instance&#x27;s network interface.
676 &quot;ipCidrRange&quot;: &quot;A String&quot;, # 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).
677 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # 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.
678 },
679 ],
680 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
681 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
682 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
683 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
684 &quot;network&quot;: &quot;A String&quot;, # 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.
685 #
686 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
687 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
688 # - projects/project/global/networks/network
689 # - global/networks/default
690 &quot;networkIP&quot;: &quot;A String&quot;, # 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.
691 &quot;subnetwork&quot;: &quot;A String&quot;, # 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:
692 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
693 # - regions/region/subnetworks/subnetwork
694 },
695 ],
696 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
697 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
698 &quot;consumeReservationType&quot;: &quot;A String&quot;, # 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.
699 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
700 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
701 &quot;A String&quot;,
702 ],
703 },
704 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
705 &quot;A String&quot;,
706 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700707 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 &quot;automaticRestart&quot;: 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.
709 #
710 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
711 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
712 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
713 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
714 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
715 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
716 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
717 &quot;A String&quot;,
718 ],
719 },
720 ],
721 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700722 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 },
724 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
725 &quot;serviceAccounts&quot;: [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
726 #
727 # 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.
728 { # A service account.
729 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
730 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
731 &quot;A String&quot;,
732 ],
733 },
734 ],
735 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
736 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
737 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
738 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
739 },
740 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
741 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
742 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700743 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -0700744 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
745 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
746 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
747 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700748 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured. # Deprecating, please use shielded_instance_integrity_policy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700749 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
750 },
751 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700752 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
754 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
755 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
756 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
757 #
758 # The key must meet the following requirements before you can provide it to Compute Engine:
759 # - The key is wrapped using a RSA public key certificate provided by Google.
760 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
761 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
762 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
763 },
764 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700765 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
767 &quot;tags&quot;: { # 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 &#x27;tags.items&#x27; field.
768 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; 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.
769 #
770 # To see the latest fingerprint, make get() request to the instance.
771 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
772 &quot;A String&quot;,
773 ],
774 },
775 &quot;zone&quot;: &quot;A String&quot;, # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700776 },
777 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
779 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
780 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
781 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700782 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700783 &quot;key&quot;: &quot;A String&quot;, # [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).
784 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700785 },
786 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700787 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700788 },
789 },
790 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700791 &quot;kind&quot;: &quot;compute#instanceAggregatedList&quot;, # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
792 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
793 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700794 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
795 &quot;A String&quot;,
796 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 &quot;warning&quot;: { # [Output Only] Informational warning message.
798 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
799 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
800 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700801 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700802 &quot;key&quot;: &quot;A String&quot;, # [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).
803 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700804 },
805 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700807 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700808 }</pre>
809</div>
810
811<div class="method">
812 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
813 <pre>Retrieves the next page of results.
814
815Args:
816 previous_request: The request for the previous page. (required)
817 previous_response: The response from the request for the previous page. (required)
818
819Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700820 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700821 page. Returns None if there are no more items in the collection.
822 </pre>
823</div>
824
825<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700826 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400827 <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 -0700828
829Args:
830 project: string, Project ID for this request. (required)
831 zone: string, The name of the zone for this request. (required)
832 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700833 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700834 The object takes the form of:
835
836{ # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700837 &quot;autoDelete&quot;: 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).
838 &quot;boot&quot;: 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.
839 &quot;deviceName&quot;: &quot;A String&quot;, # 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.
840 #
841 # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700842 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700843 #
844 # 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.
845 #
846 # 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.
847 #
848 # 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.
849 #
850 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
852 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
853 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
854 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700855 #
856 # The key must meet the following requirements before you can provide it to Compute Engine:
857 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700858 # - 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 -0700859 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700860 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700861 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700862 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
863 &quot;guestOsFeatures&quot;: [ # 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.
864 { # Guest OS features.
865 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
866 },
867 ],
868 &quot;index&quot;: 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.
869 &quot;initializeParams&quot;: { # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700870 #
871 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
872 #
873 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
875 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
876 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
877 &quot;diskType&quot;: &quot;A String&quot;, # 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 -0700878 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
879 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700881 # 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:
882 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
883 # - projects/project/zones/zone/diskTypes/diskType
884 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 &quot;guestOsFeatures&quot;: [ # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 #
887 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
888 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700889 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700890 },
891 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700892 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
893 &quot;a_key&quot;: &quot;A String&quot;,
894 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700895 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700896 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
897 &quot;resourcePolicies&quot;: [ # 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.
898 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700899 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700901 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 # 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:
903 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700904 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700905 #
906 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700908 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700909 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700910 # To create a disk with a custom image that you created, specify the image name in the following format:
911 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700912 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700913 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914 # 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:
915 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700916 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800917 #
918 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700919 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 #
921 # 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.
922 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
923 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
924 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
925 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700926 #
927 # The key must meet the following requirements before you can provide it to Compute Engine:
928 # - The key is wrapped using a RSA public key certificate provided by Google.
929 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
930 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700931 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
932 },
933 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
934 #
935 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
936 # global/snapshots/my-backup
937 #
938 #
939 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700940 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
942 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
943 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
944 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
945 #
946 # The key must meet the following requirements before you can provide it to Compute Engine:
947 # - The key is wrapped using a RSA public key certificate provided by Google.
948 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
949 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
950 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700952 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 &quot;interface&quot;: &quot;A String&quot;, # 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.
954 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
955 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
956 &quot;A String&quot;,
957 ],
958 &quot;mode&quot;: &quot;A String&quot;, # 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.
959 &quot;shieldedInstanceInitialState&quot;: { # 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
960 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -0700961 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700962 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
963 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 },
965 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -0700967 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
969 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700970 },
971 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700972 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -0700973 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700974 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
975 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 },
977 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700978 &quot;pk&quot;: { # The Platform Key (PK).
979 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
980 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700981 },
982 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700983 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800984 #
985 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
986 #
987 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700989}
990
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700991 forceAttach: boolean, Whether to force attach the regional disk even if it&#x27;s currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700992 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.
993
994For 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.
995
996The 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 -0700997
998Returns:
999 An object of the form:
1000
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001 { # Represents an Operation resource.
1002 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 # Google Compute Engine has three Operation resources:
1004 #
1005 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1006 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001007 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001010 # - For global operations, use the `globalOperations` resource.
1011 # - For regional operations, use the `regionOperations` resource.
1012 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001013 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001015 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1016 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1017 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1018 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1019 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1020 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001021 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1023 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1024 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001025 },
1026 ],
1027 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001028 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1029 &quot;httpErrorStatusCode&quot;: 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.
1030 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1031 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1032 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1033 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1034 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1035 &quot;progress&quot;: 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.
1036 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1037 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1038 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1039 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1040 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1041 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1042 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1043 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1044 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1045 {
1046 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1047 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1048 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1049 {
1050 &quot;key&quot;: &quot;A String&quot;, # [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).
1051 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1052 },
1053 ],
1054 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1055 },
1056 ],
1057 &quot;zone&quot;: &quot;A String&quot;, # [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 -07001058 }</pre>
1059</div>
1060
1061<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001062 <code class="details" id="close">close()</code>
1063 <pre>Close httplib2 connections.</pre>
1064</div>
1065
1066<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001067 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001068 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
1069
1070Args:
1071 project: string, Project ID for this request. (required)
1072 zone: string, The name of the zone for this request. (required)
1073 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001074 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.
1075
1076For 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.
1077
1078The 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 -07001079
1080Returns:
1081 An object of the form:
1082
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001083 { # Represents an Operation resource.
1084 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001085 # Google Compute Engine has three Operation resources:
1086 #
1087 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1088 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001089 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1090 #
1091 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001092 # - For global operations, use the `globalOperations` resource.
1093 # - For regional operations, use the `regionOperations` resource.
1094 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001096 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001097 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1098 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1099 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1100 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1101 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1102 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001103 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001104 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1105 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1106 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001107 },
1108 ],
1109 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001110 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1111 &quot;httpErrorStatusCode&quot;: 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.
1112 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1113 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1114 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1115 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1116 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1117 &quot;progress&quot;: 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.
1118 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1119 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1120 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1121 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1122 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1123 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1124 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1125 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1126 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1127 {
1128 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1129 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1130 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1131 {
1132 &quot;key&quot;: &quot;A String&quot;, # [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).
1133 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1134 },
1135 ],
1136 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1137 },
1138 ],
1139 &quot;zone&quot;: &quot;A String&quot;, # [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 -07001140 }</pre>
1141</div>
1142
1143<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001144 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 <pre>Deletes an access config from an instance&#x27;s network interface.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001146
1147Args:
1148 project: string, Project ID for this request. (required)
1149 zone: string, The name of the zone for this request. (required)
1150 instance: string, The instance name for this request. (required)
1151 accessConfig: string, The name of the access config to delete. (required)
1152 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 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.
1154
1155For 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.
1156
1157The 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 -07001158
1159Returns:
1160 An object of the form:
1161
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 { # Represents an Operation resource.
1163 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001164 # Google Compute Engine has three Operation resources:
1165 #
1166 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1167 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001168 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1169 #
1170 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001171 # - For global operations, use the `globalOperations` resource.
1172 # - For regional operations, use the `regionOperations` resource.
1173 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001174 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001175 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001176 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1177 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1178 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1179 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1180 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1181 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001182 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001183 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1184 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1185 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001186 },
1187 ],
1188 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001189 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1190 &quot;httpErrorStatusCode&quot;: 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.
1191 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1192 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1193 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1194 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1195 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1196 &quot;progress&quot;: 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.
1197 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1198 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1199 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1200 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1201 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1202 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1203 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1204 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1205 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1206 {
1207 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1208 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1209 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1210 {
1211 &quot;key&quot;: &quot;A String&quot;, # [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).
1212 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1213 },
1214 ],
1215 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1216 },
1217 ],
1218 &quot;zone&quot;: &quot;A String&quot;, # [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 -07001219 }</pre>
1220</div>
1221
1222<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001223 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001224 <pre>Detaches a disk from an instance.
1225
1226Args:
1227 project: string, Project ID for this request. (required)
1228 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001229 instance: string, Instance name for this request. (required)
1230 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)
1231 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.
1232
1233For 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.
1234
1235The 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 -07001236
1237Returns:
1238 An object of the form:
1239
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001240 { # Represents an Operation resource.
1241 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001242 # Google Compute Engine has three Operation resources:
1243 #
1244 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1245 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001246 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1247 #
1248 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001249 # - For global operations, use the `globalOperations` resource.
1250 # - For regional operations, use the `regionOperations` resource.
1251 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001252 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001253 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001254 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1255 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1256 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1257 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1258 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1259 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001260 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001261 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1262 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1263 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001264 },
1265 ],
1266 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001267 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1268 &quot;httpErrorStatusCode&quot;: 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.
1269 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1270 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1271 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1272 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1273 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1274 &quot;progress&quot;: 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.
1275 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1276 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1277 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1278 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1279 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1280 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1281 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1282 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1283 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1284 {
1285 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1286 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1287 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1288 {
1289 &quot;key&quot;: &quot;A String&quot;, # [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).
1290 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1291 },
1292 ],
1293 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1294 },
1295 ],
1296 &quot;zone&quot;: &quot;A String&quot;, # [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 -07001297 }</pre>
1298</div>
1299
1300<div class="method">
1301 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001302 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001303
1304Args:
1305 project: string, Project ID for this request. (required)
1306 zone: string, The name of the zone for this request. (required)
1307 instance: string, Name of the instance resource to return. (required)
1308
1309Returns:
1310 An object of the form:
1311
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001312 { # Represents an Instance resource.
1313 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001314 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001315 &quot;canIpForward&quot;: 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001316 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1317 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
1318 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001319 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1320 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1321 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1322 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1323 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001324 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001325 &quot;autoDelete&quot;: 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).
1326 &quot;boot&quot;: 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.
1327 &quot;deviceName&quot;: &quot;A String&quot;, # 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.
1328 #
1329 # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001330 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001331 #
1332 # 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.
1333 #
1334 # 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.
1335 #
1336 # 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.
1337 #
1338 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -07001339 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1340 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1341 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1342 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001343 #
1344 # The key must meet the following requirements before you can provide it to Compute Engine:
1345 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001346 # - 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 -07001347 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07001348 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001349 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001350 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1351 &quot;guestOsFeatures&quot;: [ # 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.
1352 { # Guest OS features.
1353 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1354 },
1355 ],
1356 &quot;index&quot;: 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.
1357 &quot;initializeParams&quot;: { # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001358 #
1359 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1360 #
1361 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim65020912020-05-20 12:08:20 -07001362 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1363 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
1364 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
1365 &quot;diskType&quot;: &quot;A String&quot;, # 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 -07001366 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1367 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001368 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001369 # 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:
1370 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1371 # - projects/project/zones/zone/diskTypes/diskType
1372 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001373 &quot;guestOsFeatures&quot;: [ # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001374 #
1375 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1376 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001377 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001378 },
1379 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001380 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
1381 &quot;a_key&quot;: &quot;A String&quot;,
1382 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001383 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001384 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
1385 &quot;resourcePolicies&quot;: [ # 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.
1386 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001387 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001388 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001389 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001390 # 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:
1391 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001392 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001393 #
1394 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001395 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001396 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001397 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001398 # To create a disk with a custom image that you created, specify the image name in the following format:
1399 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001400 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001401 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001402 # 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:
1403 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001404 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001405 #
1406 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001407 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001408 #
1409 # 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.
1410 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1411 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1412 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1413 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001414 #
1415 # The key must meet the following requirements before you can provide it to Compute Engine:
1416 # - The key is wrapped using a RSA public key certificate provided by Google.
1417 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1418 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07001419 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1420 },
1421 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
1422 #
1423 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1424 # global/snapshots/my-backup
1425 #
1426 #
1427 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001428 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07001429 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1430 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1431 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1432 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1433 #
1434 # The key must meet the following requirements before you can provide it to Compute Engine:
1435 # - The key is wrapped using a RSA public key certificate provided by Google.
1436 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1437 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1438 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001439 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001440 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001441 &quot;interface&quot;: &quot;A String&quot;, # 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.
1442 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1443 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1444 &quot;A String&quot;,
1445 ],
1446 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1447 &quot;shieldedInstanceInitialState&quot;: { # 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
1448 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07001449 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001450 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1451 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001452 },
1453 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001454 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07001455 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001456 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1457 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001458 },
1459 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001460 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07001461 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001462 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1463 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001464 },
1465 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001466 &quot;pk&quot;: { # The Platform Key (PK).
1467 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1468 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001469 },
1470 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001471 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001472 #
1473 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1474 #
1475 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001476 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001477 },
1478 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001479 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1480 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1481 },
1482 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
1483 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the instance&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance.
1484 #
1485 # To see the latest fingerprint, make get() request to the instance.
1486 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1487 { # A specification of the type and number of accelerator cards attached to the instance.
1488 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1489 &quot;acceleratorType&quot;: &quot;A String&quot;, # 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.
1490 },
1491 ],
1492 &quot;hostname&quot;: &quot;A String&quot;, # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
1493 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1494 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1495 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for this request, which is essentially a hash of the label&#x27;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.
1496 #
1497 # To see the latest fingerprint, make get() request to the instance.
1498 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1499 &quot;a_key&quot;: &quot;A String&quot;,
1500 },
1501 &quot;machineType&quot;: &quot;A String&quot;, # 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:
1502 # zones/us-central1-f/machineTypes/n1-standard-1
1503 #
1504 #
1505 # 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):
1506 # zones/zone/machineTypes/custom-CPUS-MEMORY
1507 #
1508 #
1509 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1510 #
1511 # For a full list of restrictions, read the Specifications for custom machine types.
1512 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1513 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;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.
1514 #
1515 # To see the latest fingerprint, make a get() request to retrieve the resource.
1516 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1517 {
1518 &quot;key&quot;: &quot;A String&quot;, # 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.
1519 &quot;value&quot;: &quot;A String&quot;, # 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).
1520 },
1521 ],
1522 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1523 },
1524 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;.
1525 &quot;name&quot;: &quot;A String&quot;, # 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.
1526 &quot;networkInterfaces&quot;: [ # 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.
1527 { # A network interface resource attached to an instance.
1528 &quot;accessConfigs&quot;: [ # 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.
1529 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1530 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1531 &quot;name&quot;: &quot;A String&quot;, # 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.
1532 &quot;natIP&quot;: &quot;A String&quot;, # 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.
1533 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1534 #
1535 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1536 #
1537 # 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.
1538 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1539 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
1540 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1541 },
1542 ],
1543 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
1544 { # An alias IP range attached to an instance&#x27;s network interface.
1545 &quot;ipCidrRange&quot;: &quot;A String&quot;, # 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).
1546 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # 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.
1547 },
1548 ],
1549 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
1550 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1551 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1552 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
1553 &quot;network&quot;: &quot;A String&quot;, # 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.
1554 #
1555 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1556 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1557 # - projects/project/global/networks/network
1558 # - global/networks/default
1559 &quot;networkIP&quot;: &quot;A String&quot;, # 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.
1560 &quot;subnetwork&quot;: &quot;A String&quot;, # 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:
1561 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1562 # - regions/region/subnetworks/subnetwork
1563 },
1564 ],
1565 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
1566 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1567 &quot;consumeReservationType&quot;: &quot;A String&quot;, # 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.
1568 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1569 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1570 &quot;A String&quot;,
1571 ],
1572 },
1573 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1574 &quot;A String&quot;,
1575 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001576 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 &quot;automaticRestart&quot;: 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.
1578 #
1579 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1580 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1581 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1582 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1583 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1584 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
1585 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1586 &quot;A String&quot;,
1587 ],
1588 },
1589 ],
1590 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001591 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07001592 },
1593 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1594 &quot;serviceAccounts&quot;: [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
1595 #
1596 # 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.
1597 { # A service account.
1598 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1599 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1600 &quot;A String&quot;,
1601 ],
1602 },
1603 ],
1604 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1605 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1606 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1607 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1608 },
1609 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
1610 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1611 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001612 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07001613 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
1614 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
1615 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
1616 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001617 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured. # Deprecating, please use shielded_instance_integrity_policy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001618 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1619 },
1620 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001621 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001622 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1623 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1624 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1625 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1626 #
1627 # The key must meet the following requirements before you can provide it to Compute Engine:
1628 # - The key is wrapped using a RSA public key certificate provided by Google.
1629 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1630 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1631 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1632 },
1633 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001634 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07001635 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
1636 &quot;tags&quot;: { # 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 &#x27;tags.items&#x27; field.
1637 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; 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.
1638 #
1639 # To see the latest fingerprint, make get() request to the instance.
1640 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1641 &quot;A String&quot;,
1642 ],
1643 },
1644 &quot;zone&quot;: &quot;A String&quot;, # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001645 }</pre>
1646</div>
1647
1648<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001649 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</code>
1650 <pre>Returns effective firewalls applied to an interface of the instance.
1651
1652Args:
1653 project: string, Project ID for this request. (required)
1654 zone: string, The name of the zone for this request. (required)
1655 instance: string, Name of the instance scoping this request. (required)
1656 networkInterface: string, The name of the network interface to get the effective firewalls. (required)
1657
1658Returns:
1659 An object of the form:
1660
1661 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001662 &quot;firewalls&quot;: [ # Effective firewalls on the instance.
1663 { # Represents a Firewall Rule resource.
1664 #
1665 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
1666 &quot;allowed&quot;: [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
1667 {
1668 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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.
1669 &quot;ports&quot;: [ # 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.
1670 #
1671 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1672 &quot;A String&quot;,
1673 ],
1674 },
1675 ],
1676 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1677 &quot;denied&quot;: [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
1678 {
1679 &quot;IPProtocol&quot;: &quot;A String&quot;, # 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.
1680 &quot;ports&quot;: [ # 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.
1681 #
1682 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
1683 &quot;A String&quot;,
1684 ],
1685 },
1686 ],
1687 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
1688 &quot;destinationRanges&quot;: [ # 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.
1689 &quot;A String&quot;,
1690 ],
1691 &quot;direction&quot;: &quot;A String&quot;, # 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.
1692 &quot;disabled&quot;: 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001693 &quot;enableLogging&quot;: 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 t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001694 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1695 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001696 &quot;logConfig&quot;: { # 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 Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001697 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
1698 &quot;metadata&quot;: &quot;A String&quot;, # 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.
1699 },
1700 &quot;name&quot;: &quot;A String&quot;, # 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.
1701 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
1702 # global/networks/default
1703 # 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:
1704 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
1705 # - projects/myproject/global/networks/my-network
1706 # - global/networks/default
1707 &quot;priority&quot;: 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`.
1708 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1709 &quot;sourceRanges&quot;: [ # 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.
1710 &quot;A String&quot;,
1711 ],
1712 &quot;sourceServiceAccounts&quot;: [ # 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&#x27;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.
1713 &quot;A String&quot;,
1714 ],
1715 &quot;sourceTags&quot;: [ # 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&#x27;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.
1716 &quot;A String&quot;,
1717 ],
1718 &quot;targetServiceAccounts&quot;: [ # 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.
1719 &quot;A String&quot;,
1720 ],
1721 &quot;targetTags&quot;: [ # 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.
1722 &quot;A String&quot;,
1723 ],
1724 },
1725 ],
1726 &quot;organizationFirewalls&quot;: [ # Effective firewalls from organization policies.
Dan O'Mearadd494642020-05-01 07:42:23 -07001727 { # A pruned SecurityPolicy containing ID and any applicable firewall rules.
Bu Sun Kim65020912020-05-20 12:08:20 -07001728 &quot;id&quot;: &quot;A String&quot;, # The unique identifier for the security policy. This identifier is defined by the server.
1729 &quot;rules&quot;: [ # The rules that apply to the network.
Dan O'Mearadd494642020-05-01 07:42:23 -07001730 { # 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).
Bu Sun Kim65020912020-05-20 12:08:20 -07001731 &quot;action&quot;: &quot;A String&quot;, # The Action to preform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
1732 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1733 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
1734 &quot;enableLogging&quot;: 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 &quot;goto_next&quot; rules.
Dan O'Mearadd494642020-05-01 07:42:23 -07001735 #
1736 # This field may only be specified when the versioned_expr is set to FIREWALL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001737 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
1738 &quot;match&quot;: { # 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 &#x27;action&#x27; is enforced.
1739 &quot;config&quot;: { # 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.
1740 &quot;destIpRanges&quot;: [ # CIDR IP address range.
Dan O'Mearadd494642020-05-01 07:42:23 -07001741 #
1742 # This field may only be specified when versioned_expr is set to FIREWALL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001743 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001744 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001745 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
Dan O'Mearadd494642020-05-01 07:42:23 -07001746 #
1747 # This field may only be specified when versioned_expr is set to FIREWALL.
1748 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001749 &quot;ipProtocol&quot;: &quot;A String&quot;, # 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.
1750 &quot;ports&quot;: [ # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001751 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001752 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
Dan O'Mearadd494642020-05-01 07:42:23 -07001753 #
1754 # This field may only be specified when versioned_expr is set to FIREWALL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001755 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001756 ],
1757 },
1758 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001759 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
Bu Sun Kim65020912020-05-20 12:08:20 -07001760 &quot;A String&quot;,
1761 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001762 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001763 &quot;expr&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # 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.
1764 #
1765 # Example (Comparison):
1766 #
1767 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1768 #
1769 # Example (Equality):
1770 #
1771 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1772 #
1773 # Example (Logic):
1774 #
1775 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1776 #
1777 # Example (Data Manipulation):
1778 #
1779 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1780 #
1781 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1782 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1783 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1784 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1785 &quot;title&quot;: &quot;A String&quot;, # 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.
1786 },
1787 &quot;versionedExpr&quot;: &quot;A String&quot;, # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001788 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001789 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
1790 &quot;priority&quot;: 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.
1791 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1792 &quot;targetResources&quot;: [ # A list of network resource URLs to which this rule applies. This field allows you to control which network&#x27;s VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
1793 #
1794 # This field may only be specified when versioned_expr is set to FIREWALL.
1795 &quot;A String&quot;,
1796 ],
1797 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1798 &quot;A String&quot;,
1799 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001800 },
1801 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001802 },
1803 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001804 }</pre>
1805</div>
1806
1807<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001808 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001809 <pre>Returns the specified guest attributes entry.
1810
1811Args:
1812 project: string, Project ID for this request. (required)
1813 zone: string, The name of the zone for this request. (required)
1814 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001815 queryPath: string, Specifies the guest attributes path to be queried.
Bu Sun Kim65020912020-05-20 12:08:20 -07001816 variableKey: string, Specifies the key for the guest attributes entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001817
1818Returns:
1819 An object of the form:
1820
1821 { # A guest attributes entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001822 &quot;kind&quot;: &quot;compute#guestAttributes&quot;, # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
1823 &quot;queryPath&quot;: &quot;A String&quot;, # The path to be queried. This can be the default namespace (&#x27;/&#x27;) or a nested namespace (&#x27;/\/&#x27;) or a specified key (&#x27;/\/\&#x27;)
1824 &quot;queryValue&quot;: { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
1825 &quot;items&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001826 { # A guest attributes namespace/key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001827 &quot;key&quot;: &quot;A String&quot;, # Key for the guest attribute entry.
1828 &quot;namespace&quot;: &quot;A String&quot;, # Namespace for the guest attribute entry.
1829 &quot;value&quot;: &quot;A String&quot;, # Value for the guest attribute entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001830 },
1831 ],
1832 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001833 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1834 &quot;variableKey&quot;: &quot;A String&quot;, # The key to search for.
1835 &quot;variableValue&quot;: &quot;A String&quot;, # [Output Only] The value found for the requested key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001836 }</pre>
1837</div>
1838
1839<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001840 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001841 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1842
1843Args:
1844 project: string, Project ID for this request. (required)
1845 zone: string, The name of the zone for this request. (required)
1846 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001847 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001848
1849Returns:
1850 An object of the form:
1851
Dan O'Mearadd494642020-05-01 07:42:23 -07001852 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001853 #
1854 #
1855 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001856 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001857 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001858 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001859 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001860 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001861 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001862 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001863 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001864 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001865 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001866 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001867 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001868 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001869 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001870 { # 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.
1871 #
1872 # 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.
1873 #
1874 # Example Policy with multiple AuditConfigs:
1875 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001876 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001877 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001878 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001879 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001880 { # Provides the configuration for logging a type of permissions. Example:
1881 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001882 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001883 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001884 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1885 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1886 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001887 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001888 &quot;ignoreChildExemptions&quot;: True or False,
1889 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001890 },
1891 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001892 &quot;exemptedMembers&quot;: [
1893 &quot;A String&quot;,
1894 ],
1895 &quot;service&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001896 },
1897 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001898 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001899 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001900 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001901 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1902 #
1903 # If the condition evaluates to `true`, then this binding applies to the current request.
1904 #
1905 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1906 #
1907 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1908 #
1909 # Example (Comparison):
1910 #
1911 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1912 #
1913 # Example (Equality):
1914 #
1915 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1916 #
1917 # Example (Logic):
1918 #
1919 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1920 #
1921 # Example (Data Manipulation):
1922 #
1923 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1924 #
1925 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1926 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1927 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1928 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1929 &quot;title&quot;: &quot;A String&quot;, # 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.
1930 },
1931 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001932 #
1933 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1934 #
1935 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1936 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001937 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001938 #
1939 #
1940 #
1941 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1942 #
1943 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1944 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001945 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1946 #
1947 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1948 #
1949 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1950 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001951 #
1952 #
1953 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001954 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001955 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001956 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 },
1958 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001959 &quot;etag&quot;: &quot;A String&quot;, # `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.
1960 #
1961 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1962 &quot;iamOwned&quot;: True or False,
1963 &quot;rules&quot;: [ # 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.
1964 { # A rule to be applied in a Policy.
1965 &quot;action&quot;: &quot;A String&quot;, # Required
1966 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1967 { # A condition to be met.
1968 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1969 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1970 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1971 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1972 &quot;values&quot;: [ # The objects of the condition.
1973 &quot;A String&quot;,
1974 ],
1975 },
1976 ],
1977 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1978 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1979 &quot;A String&quot;,
1980 ],
1981 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1982 { # Specifies what kind of log the caller must write
1983 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1984 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1985 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1986 },
1987 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1988 },
1989 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1990 #
1991 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1992 #
1993 # Field names correspond to IAM request parameters and field values are their respective values.
1994 #
1995 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1996 #
1997 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1998 &quot;customFields&quot;: [ # Custom fields.
1999 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2000 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2001 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
2002 },
2003 ],
2004 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2005 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
2006 },
2007 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2008 &quot;logMode&quot;: &quot;A String&quot;,
2009 },
2010 },
2011 ],
2012 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2013 &quot;A String&quot;,
2014 ],
2015 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
2016 &quot;A String&quot;,
2017 ],
2018 },
2019 ],
2020 &quot;version&quot;: 42, # Specifies the format of the policy.
2021 #
2022 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2023 #
2024 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2025 #
2026 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
2027 #
2028 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
2029 #
2030 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2031 #
2032 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002033 }</pre>
2034</div>
2035
2036<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002037 <code class="details" id="getScreenshot">getScreenshot(project, zone, instance)</code>
2038 <pre>Returns the screenshot from the specified instance.
2039
2040Args:
2041 project: string, Project ID for this request. (required)
2042 zone: string, The name of the zone for this request. (required)
2043 instance: string, Name of the instance scoping this request. (required)
2044
2045Returns:
2046 An object of the form:
2047
Bu Sun Kim65020912020-05-20 12:08:20 -07002048 { # An instance&#x27;s screenshot.
2049 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The Base64-encoded screenshot data.
2050 &quot;kind&quot;: &quot;compute#screenshot&quot;, # [Output Only] Type of the resource. Always compute#screenshot for the screenshots.
Dan O'Mearadd494642020-05-01 07:42:23 -07002051 }</pre>
2052</div>
2053
2054<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002055 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002056 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002057
2058Args:
2059 project: string, Project ID for this request. (required)
2060 zone: string, The name of the zone for this request. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002061 instance: string, Name of the instance for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002062 port: integer, Specifies which COM or serial port to retrieve data from.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002063 start: string, Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`.
2064
2065If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value.
2066
2067You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002068
2069Returns:
2070 An object of the form:
2071
Bu Sun Kim65020912020-05-20 12:08:20 -07002072 { # An instance&#x27;s serial console output.
2073 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The contents of the console output.
2074 &quot;kind&quot;: &quot;compute#serialPortOutput&quot;, # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002075 &quot;next&quot;: &quot;A String&quot;, # [Output Only] The position of the next byte of content, regardless of whether the content exists, following the output returned in the `contents` property. Use this value in the next request as the start parameter.
Bu Sun Kim65020912020-05-20 12:08:20 -07002076 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002077 &quot;start&quot;: &quot;A String&quot;, # 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 (1 MB), older output is overwritten by newer content. The output start value will indicate the byte position of the output that was returned, which might be different than the `start` value that was specified in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002078 }</pre>
2079</div>
2080
2081<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002082 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
2083 <pre>Returns the Shielded Instance Identity of an instance
2084
2085Args:
2086 project: string, Project ID for this request. (required)
2087 zone: string, The name of the zone for this request. (required)
2088 instance: string, Name or id of the instance scoping this request. (required)
2089
2090Returns:
2091 An object of the form:
2092
2093 { # A shielded Instance identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002094 &quot;encryptionKey&quot;: { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) made by the RSA 2048 algorithm issued to the Shielded Instance&#x27;s vTPM.
2095 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2096 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002097 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002098 &quot;kind&quot;: &quot;compute#shieldedInstanceIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
2099 &quot;signingKey&quot;: { # A Shielded Instance Identity Entry. # An Attestation Key (AK) made by the RSA 2048 algorithm issued to the Shielded Instance&#x27;s vTPM.
2100 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2101 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002102 },
2103 }</pre>
2104</div>
2105
2106<div class="method">
2107 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
2108 <pre>Returns the Shielded VM Identity of an instance
2109
2110Args:
2111 project: string, Project ID for this request. (required)
2112 zone: string, The name of the zone for this request. (required)
2113 instance: string, Name of the instance scoping this request. (required)
2114
2115Returns:
2116 An object of the form:
2117
2118 { # A shielded VM identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002119 &quot;encryptionKey&quot;: { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM&#x27;s vTPM.
2120 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2121 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002122 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002123 &quot;kind&quot;: &quot;compute#shieldedVmIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
2124 &quot;signingKey&quot;: { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM&#x27;s vTPM.
2125 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2126 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002127 },
2128 }</pre>
2129</div>
2130
2131<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002132 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None, sourceMachineImage=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002133 <pre>Creates an instance resource in the specified project using the data included in the request.
2134
2135Args:
2136 project: string, Project ID for this request. (required)
2137 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002138 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002139 The object takes the form of:
2140
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002141{ # Represents an Instance resource.
2142 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002143 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002144 &quot;canIpForward&quot;: 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002145 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
2146 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
2147 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002148 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2149 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2150 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2151 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2152 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002153 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002154 &quot;autoDelete&quot;: 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).
2155 &quot;boot&quot;: 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.
2156 &quot;deviceName&quot;: &quot;A String&quot;, # 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.
2157 #
2158 # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002159 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002160 #
2161 # 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.
2162 #
2163 # 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.
2164 #
2165 # 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.
2166 #
2167 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -07002168 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2169 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2170 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2171 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002172 #
2173 # The key must meet the following requirements before you can provide it to Compute Engine:
2174 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002175 # - 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 -07002176 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002177 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002178 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002179 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2180 &quot;guestOsFeatures&quot;: [ # 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.
2181 { # Guest OS features.
2182 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2183 },
2184 ],
2185 &quot;index&quot;: 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.
2186 &quot;initializeParams&quot;: { # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002187 #
2188 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2189 #
2190 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim65020912020-05-20 12:08:20 -07002191 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2192 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
2193 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
2194 &quot;diskType&quot;: &quot;A String&quot;, # 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 -07002195 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2196 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002197 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002198 # 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:
2199 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2200 # - projects/project/zones/zone/diskTypes/diskType
2201 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07002202 &quot;guestOsFeatures&quot;: [ # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002203 #
2204 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2205 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07002206 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002207 },
2208 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002209 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
2210 &quot;a_key&quot;: &quot;A String&quot;,
2211 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002212 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002213 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
2214 &quot;resourcePolicies&quot;: [ # 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.
2215 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002216 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002217 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002218 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002219 # 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:
2220 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002221 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002222 #
2223 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002224 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002225 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002226 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002227 # To create a disk with a custom image that you created, specify the image name in the following format:
2228 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002229 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002230 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002231 # 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:
2232 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002233 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002234 #
2235 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002236 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07002237 #
2238 # 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.
2239 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2240 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2241 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2242 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002243 #
2244 # The key must meet the following requirements before you can provide it to Compute Engine:
2245 # - The key is wrapped using a RSA public key certificate provided by Google.
2246 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2247 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002248 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2249 },
2250 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
2251 #
2252 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2253 # global/snapshots/my-backup
2254 #
2255 #
2256 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002257 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07002258 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2259 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2260 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2261 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2262 #
2263 # The key must meet the following requirements before you can provide it to Compute Engine:
2264 # - The key is wrapped using a RSA public key certificate provided by Google.
2265 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2266 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2267 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002268 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002269 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002270 &quot;interface&quot;: &quot;A String&quot;, # 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.
2271 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2272 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2273 &quot;A String&quot;,
2274 ],
2275 &quot;mode&quot;: &quot;A String&quot;, # 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.
2276 &quot;shieldedInstanceInitialState&quot;: { # 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
2277 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07002278 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002279 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2280 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002281 },
2282 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002283 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07002284 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002285 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2286 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002287 },
2288 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002289 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07002290 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002291 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2292 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002293 },
2294 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002295 &quot;pk&quot;: { # The Platform Key (PK).
2296 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2297 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002298 },
2299 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002300 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002301 #
2302 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2303 #
2304 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002305 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002306 },
2307 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002308 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2309 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
2310 },
2311 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2312 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the instance&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance.
2313 #
2314 # To see the latest fingerprint, make get() request to the instance.
2315 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2316 { # A specification of the type and number of accelerator cards attached to the instance.
2317 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2318 &quot;acceleratorType&quot;: &quot;A String&quot;, # 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.
2319 },
2320 ],
2321 &quot;hostname&quot;: &quot;A String&quot;, # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
2322 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2323 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2324 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for this request, which is essentially a hash of the label&#x27;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.
2325 #
2326 # To see the latest fingerprint, make get() request to the instance.
2327 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2328 &quot;a_key&quot;: &quot;A String&quot;,
2329 },
2330 &quot;machineType&quot;: &quot;A String&quot;, # 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:
2331 # zones/us-central1-f/machineTypes/n1-standard-1
2332 #
2333 #
2334 # 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):
2335 # zones/zone/machineTypes/custom-CPUS-MEMORY
2336 #
2337 #
2338 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2339 #
2340 # For a full list of restrictions, read the Specifications for custom machine types.
2341 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2342 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;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.
2343 #
2344 # To see the latest fingerprint, make a get() request to retrieve the resource.
2345 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2346 {
2347 &quot;key&quot;: &quot;A String&quot;, # 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.
2348 &quot;value&quot;: &quot;A String&quot;, # 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).
2349 },
2350 ],
2351 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2352 },
2353 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;.
2354 &quot;name&quot;: &quot;A String&quot;, # 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.
2355 &quot;networkInterfaces&quot;: [ # 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.
2356 { # A network interface resource attached to an instance.
2357 &quot;accessConfigs&quot;: [ # 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.
2358 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2359 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2360 &quot;name&quot;: &quot;A String&quot;, # 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.
2361 &quot;natIP&quot;: &quot;A String&quot;, # 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.
2362 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2363 #
2364 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2365 #
2366 # 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.
2367 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
2368 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
2369 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2370 },
2371 ],
2372 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
2373 { # An alias IP range attached to an instance&#x27;s network interface.
2374 &quot;ipCidrRange&quot;: &quot;A String&quot;, # 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).
2375 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # 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.
2376 },
2377 ],
2378 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
2379 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
2380 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2381 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
2382 &quot;network&quot;: &quot;A String&quot;, # 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.
2383 #
2384 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2385 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2386 # - projects/project/global/networks/network
2387 # - global/networks/default
2388 &quot;networkIP&quot;: &quot;A String&quot;, # 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.
2389 &quot;subnetwork&quot;: &quot;A String&quot;, # 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:
2390 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2391 # - regions/region/subnetworks/subnetwork
2392 },
2393 ],
2394 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
2395 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2396 &quot;consumeReservationType&quot;: &quot;A String&quot;, # 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.
2397 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
2398 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2399 &quot;A String&quot;,
2400 ],
2401 },
2402 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2403 &quot;A String&quot;,
2404 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002405 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002406 &quot;automaticRestart&quot;: 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.
2407 #
2408 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2409 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
2410 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2411 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2412 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2413 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
2414 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2415 &quot;A String&quot;,
2416 ],
2417 },
2418 ],
2419 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002420 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07002421 },
2422 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2423 &quot;serviceAccounts&quot;: [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
2424 #
2425 # 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.
2426 { # A service account.
2427 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2428 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2429 &quot;A String&quot;,
2430 ],
2431 },
2432 ],
2433 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2434 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2435 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2436 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2437 },
2438 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2439 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2440 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002441 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07002442 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
2443 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
2444 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
2445 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002446 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured. # Deprecating, please use shielded_instance_integrity_policy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002447 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2448 },
2449 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002450 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07002451 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2452 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2453 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2454 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2455 #
2456 # The key must meet the following requirements before you can provide it to Compute Engine:
2457 # - The key is wrapped using a RSA public key certificate provided by Google.
2458 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2459 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2460 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2461 },
2462 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002463 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07002464 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2465 &quot;tags&quot;: { # 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 &#x27;tags.items&#x27; field.
2466 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; 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.
2467 #
2468 # To see the latest fingerprint, make get() request to the instance.
2469 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2470 &quot;A String&quot;,
2471 ],
2472 },
2473 &quot;zone&quot;: &quot;A String&quot;, # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002474}
2475
Bu Sun Kim65020912020-05-20 12:08:20 -07002476 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.
2477
2478For 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.
2479
2480The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002481 sourceInstanceTemplate: string, Specifies instance template to create the instance.
2482
2483This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2484- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
2485- projects/project/global/instanceTemplates/instanceTemplate
2486- global/instanceTemplates/instanceTemplate
Dan O'Mearadd494642020-05-01 07:42:23 -07002487 sourceMachineImage: string, Specifies instance machine to create the instance.
2488
2489This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2490- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
2491- projects/project/global/global/machineImages/machineImage
2492- global/machineImages/machineImage
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002493
2494Returns:
2495 An object of the form:
2496
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002497 { # Represents an Operation resource.
2498 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002499 # Google Compute Engine has three Operation resources:
2500 #
2501 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2502 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002503 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2504 #
2505 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002506 # - For global operations, use the `globalOperations` resource.
2507 # - For regional operations, use the `regionOperations` resource.
2508 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002509 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002510 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002511 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2512 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2513 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2514 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2515 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2516 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002517 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002518 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2519 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2520 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002521 },
2522 ],
2523 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002524 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2525 &quot;httpErrorStatusCode&quot;: 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.
2526 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2527 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2528 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2529 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2530 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2531 &quot;progress&quot;: 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.
2532 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2533 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2534 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2535 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2536 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2537 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2538 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
2539 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2540 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2541 {
2542 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2543 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2544 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2545 {
2546 &quot;key&quot;: &quot;A String&quot;, # [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).
2547 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2548 },
2549 ],
2550 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2551 },
2552 ],
2553 &quot;zone&quot;: &quot;A String&quot;, # [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 -07002554 }</pre>
2555</div>
2556
2557<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002558 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002559 <pre>Retrieves the list of instances contained within the specified zone.
2560
2561Args:
2562 project: string, Project ID for this request. (required)
2563 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002564 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 `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002565
Dan O'Mearadd494642020-05-01 07:42:23 -07002566For 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 -07002567
Dan O'Mearadd494642020-05-01 07:42:23 -07002568You 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 -07002569
Bu Sun Kim65020912020-05-20 12:08:20 -07002570To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
2571 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`)
2572 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2573
2574You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
2575
2576Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2577 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002578 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002579
2580Returns:
2581 An object of the form:
2582
2583 { # Contains a list of instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002584 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2585 &quot;items&quot;: [ # A list of Instance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002586 { # Represents an Instance resource.
2587 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002588 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002589 &quot;canIpForward&quot;: 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002590 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
2591 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
2592 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002593 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2594 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2595 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2596 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2597 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002598 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002599 &quot;autoDelete&quot;: 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).
2600 &quot;boot&quot;: 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.
2601 &quot;deviceName&quot;: &quot;A String&quot;, # 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.
2602 #
2603 # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002604 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002605 #
2606 # 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.
2607 #
2608 # 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.
2609 #
2610 # 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.
2611 #
2612 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -07002613 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2614 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2615 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2616 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002617 #
2618 # The key must meet the following requirements before you can provide it to Compute Engine:
2619 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002620 # - 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 -07002621 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002622 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002623 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002624 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2625 &quot;guestOsFeatures&quot;: [ # 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.
2626 { # Guest OS features.
2627 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2628 },
2629 ],
2630 &quot;index&quot;: 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.
2631 &quot;initializeParams&quot;: { # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002632 #
2633 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2634 #
2635 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim65020912020-05-20 12:08:20 -07002636 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2637 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
2638 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
2639 &quot;diskType&quot;: &quot;A String&quot;, # 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 -07002640 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2641 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002642 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002643 # 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:
2644 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2645 # - projects/project/zones/zone/diskTypes/diskType
2646 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07002647 &quot;guestOsFeatures&quot;: [ # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002648 #
2649 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2650 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07002651 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002652 },
2653 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002654 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
2655 &quot;a_key&quot;: &quot;A String&quot;,
2656 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002657 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002658 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
2659 &quot;resourcePolicies&quot;: [ # 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.
2660 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002661 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002662 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002663 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002664 # 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:
2665 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002666 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002667 #
2668 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002669 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002670 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002671 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002672 # To create a disk with a custom image that you created, specify the image name in the following format:
2673 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002674 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002675 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002676 # 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:
2677 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002678 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002679 #
2680 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002681 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07002682 #
2683 # 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.
2684 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2685 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2686 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2687 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002688 #
2689 # The key must meet the following requirements before you can provide it to Compute Engine:
2690 # - The key is wrapped using a RSA public key certificate provided by Google.
2691 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2692 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002693 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2694 },
2695 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
2696 #
2697 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2698 # global/snapshots/my-backup
2699 #
2700 #
2701 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002702 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07002703 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2704 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2705 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2706 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2707 #
2708 # The key must meet the following requirements before you can provide it to Compute Engine:
2709 # - The key is wrapped using a RSA public key certificate provided by Google.
2710 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2711 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2712 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002713 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002714 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002715 &quot;interface&quot;: &quot;A String&quot;, # 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.
2716 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2717 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2718 &quot;A String&quot;,
2719 ],
2720 &quot;mode&quot;: &quot;A String&quot;, # 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.
2721 &quot;shieldedInstanceInitialState&quot;: { # 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
2722 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07002723 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002724 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2725 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002726 },
2727 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002728 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07002729 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002730 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2731 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002732 },
2733 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002734 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07002735 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002736 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2737 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002738 },
2739 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002740 &quot;pk&quot;: { # The Platform Key (PK).
2741 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2742 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002743 },
2744 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002745 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002746 #
2747 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2748 #
2749 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002750 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002751 },
2752 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002753 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2754 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
2755 },
2756 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2757 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the instance&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance.
2758 #
2759 # To see the latest fingerprint, make get() request to the instance.
2760 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2761 { # A specification of the type and number of accelerator cards attached to the instance.
2762 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2763 &quot;acceleratorType&quot;: &quot;A String&quot;, # 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.
2764 },
2765 ],
2766 &quot;hostname&quot;: &quot;A String&quot;, # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
2767 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2768 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2769 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for this request, which is essentially a hash of the label&#x27;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.
2770 #
2771 # To see the latest fingerprint, make get() request to the instance.
2772 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2773 &quot;a_key&quot;: &quot;A String&quot;,
2774 },
2775 &quot;machineType&quot;: &quot;A String&quot;, # 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:
2776 # zones/us-central1-f/machineTypes/n1-standard-1
2777 #
2778 #
2779 # 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):
2780 # zones/zone/machineTypes/custom-CPUS-MEMORY
2781 #
2782 #
2783 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2784 #
2785 # For a full list of restrictions, read the Specifications for custom machine types.
2786 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2787 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;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.
2788 #
2789 # To see the latest fingerprint, make a get() request to retrieve the resource.
2790 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2791 {
2792 &quot;key&quot;: &quot;A String&quot;, # 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.
2793 &quot;value&quot;: &quot;A String&quot;, # 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).
2794 },
2795 ],
2796 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2797 },
2798 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;.
2799 &quot;name&quot;: &quot;A String&quot;, # 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.
2800 &quot;networkInterfaces&quot;: [ # 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.
2801 { # A network interface resource attached to an instance.
2802 &quot;accessConfigs&quot;: [ # 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.
2803 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2804 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2805 &quot;name&quot;: &quot;A String&quot;, # 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.
2806 &quot;natIP&quot;: &quot;A String&quot;, # 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.
2807 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2808 #
2809 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2810 #
2811 # 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.
2812 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
2813 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
2814 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2815 },
2816 ],
2817 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
2818 { # An alias IP range attached to an instance&#x27;s network interface.
2819 &quot;ipCidrRange&quot;: &quot;A String&quot;, # 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).
2820 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # 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.
2821 },
2822 ],
2823 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
2824 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
2825 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2826 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
2827 &quot;network&quot;: &quot;A String&quot;, # 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.
2828 #
2829 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2830 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2831 # - projects/project/global/networks/network
2832 # - global/networks/default
2833 &quot;networkIP&quot;: &quot;A String&quot;, # 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.
2834 &quot;subnetwork&quot;: &quot;A String&quot;, # 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:
2835 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2836 # - regions/region/subnetworks/subnetwork
2837 },
2838 ],
2839 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
2840 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2841 &quot;consumeReservationType&quot;: &quot;A String&quot;, # 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.
2842 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
2843 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2844 &quot;A String&quot;,
2845 ],
2846 },
2847 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2848 &quot;A String&quot;,
2849 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002850 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002851 &quot;automaticRestart&quot;: 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.
2852 #
2853 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2854 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
2855 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2856 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2857 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2858 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
2859 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2860 &quot;A String&quot;,
2861 ],
2862 },
2863 ],
2864 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002865 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07002866 },
2867 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2868 &quot;serviceAccounts&quot;: [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
2869 #
2870 # 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.
2871 { # A service account.
2872 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2873 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2874 &quot;A String&quot;,
2875 ],
2876 },
2877 ],
2878 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2879 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2880 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2881 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2882 },
2883 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2884 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2885 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002886 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07002887 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
2888 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
2889 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
2890 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002891 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured. # Deprecating, please use shielded_instance_integrity_policy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002892 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2893 },
2894 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002895 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07002896 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2897 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2898 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2899 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2900 #
2901 # The key must meet the following requirements before you can provide it to Compute Engine:
2902 # - The key is wrapped using a RSA public key certificate provided by Google.
2903 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2904 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2905 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2906 },
2907 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002908 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07002909 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2910 &quot;tags&quot;: { # 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 &#x27;tags.items&#x27; field.
2911 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; 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.
2912 #
2913 # To see the latest fingerprint, make get() request to the instance.
2914 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2915 &quot;A String&quot;,
2916 ],
2917 },
2918 &quot;zone&quot;: &quot;A String&quot;, # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002919 },
2920 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002921 &quot;kind&quot;: &quot;compute#instanceList&quot;, # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
2922 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
2923 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2924 &quot;warning&quot;: { # [Output Only] Informational warning message.
2925 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2926 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2927 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002928 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002929 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2930 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002931 },
2932 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002933 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002934 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002935 }</pre>
2936</div>
2937
2938<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002939 <code class="details" id="listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002940 <pre>Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002941
2942Args:
2943 project: string, Project ID for this request. (required)
2944 zone: string, The name of the zone for this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07002945 instance: string, Name of the target instance scoping this request, or &#x27;-&#x27; if the request should span over all instances in the container. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002946 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 `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002947
Dan O'Mearadd494642020-05-01 07:42:23 -07002948For 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 -04002949
Dan O'Mearadd494642020-05-01 07:42:23 -07002950You 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 -04002951
Bu Sun Kim65020912020-05-20 12:08:20 -07002952To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -07002953 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`)
Bu Sun Kim65020912020-05-20 12:08:20 -07002954 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2955
2956You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
2957
2958Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07002959 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002960 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002961
2962Returns:
2963 An object of the form:
2964
2965 { # Contains a list of instance referrers.
Bu Sun Kim65020912020-05-20 12:08:20 -07002966 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2967 &quot;items&quot;: [ # A list of Reference resources.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002968 { # Represents a reference to a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002969 &quot;kind&quot;: &quot;compute#reference&quot;, # [Output Only] Type of the resource. Always compute#reference for references.
2970 &quot;referenceType&quot;: &quot;A String&quot;, # A description of the reference type with no implied semantics. Possible values include:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002971 # - MEMBER_OF
Bu Sun Kim65020912020-05-20 12:08:20 -07002972 &quot;referrer&quot;: &quot;A String&quot;, # URL of the resource which refers to the target.
2973 &quot;target&quot;: &quot;A String&quot;, # URL of the resource to which this reference points.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002974 },
2975 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002976 &quot;kind&quot;: &quot;compute#instanceListReferrers&quot;, # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
2977 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
2978 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2979 &quot;warning&quot;: { # [Output Only] Informational warning message.
2980 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2981 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2982 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002983 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002984 &quot;key&quot;: &quot;A String&quot;, # [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).
2985 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002986 },
2987 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002988 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002989 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002990 }</pre>
2991</div>
2992
2993<div class="method">
2994 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
2995 <pre>Retrieves the next page of results.
2996
2997Args:
2998 previous_request: The request for the previous page. (required)
2999 previous_response: The response from the request for the previous page. (required)
3000
3001Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003002 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003003 page. Returns None if there are no more items in the collection.
3004 </pre>
3005</div>
3006
3007<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003008 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3009 <pre>Retrieves the next page of results.
3010
3011Args:
3012 previous_request: The request for the previous page. (required)
3013 previous_response: The response from the request for the previous page. (required)
3014
3015Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003016 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003017 page. Returns None if there are no more items in the collection.
3018 </pre>
3019</div>
3020
3021<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003022 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
3023 <pre>Removes resource policies from an instance.
3024
3025Args:
3026 project: string, Project ID for this request. (required)
3027 zone: string, The name of the zone for this request. (required)
3028 instance: string, The instance name for this request. (required)
3029 body: object, The request body.
3030 The object takes the form of:
3031
3032{
Bu Sun Kim65020912020-05-20 12:08:20 -07003033 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this instance.
3034 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07003035 ],
3036 }
3037
3038 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.
3039
3040For 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.
3041
3042The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3043
3044Returns:
3045 An object of the form:
3046
3047 { # Represents an Operation resource.
3048 #
3049 # Google Compute Engine has three Operation resources:
3050 #
3051 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3052 #
3053 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3054 #
3055 # Operations can be global, regional or zonal.
3056 # - For global operations, use the `globalOperations` resource.
3057 # - For regional operations, use the `regionOperations` resource.
3058 # - For zonal operations, use the `zonalOperations` resource.
3059 #
3060 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003061 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3062 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3063 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3064 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3065 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3066 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003067 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003068 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3069 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3070 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07003071 },
3072 ],
3073 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003074 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
3075 &quot;httpErrorStatusCode&quot;: 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.
3076 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3077 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3078 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3079 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3080 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3081 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
3082 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3083 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3084 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3085 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3086 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3087 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3088 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
3089 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3090 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3091 {
3092 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3093 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3094 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3095 {
3096 &quot;key&quot;: &quot;A String&quot;, # [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).
3097 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3098 },
3099 ],
3100 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3101 },
3102 ],
3103 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Dan O'Mearadd494642020-05-01 07:42:23 -07003104 }</pre>
3105</div>
3106
3107<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003108 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
3109 <pre>Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003110
3111Args:
3112 project: string, Project ID for this request. (required)
3113 zone: string, The name of the zone for this request. (required)
3114 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003115 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.
3116
3117For 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.
3118
3119The 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 -07003120
3121Returns:
3122 An object of the form:
3123
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003124 { # Represents an Operation resource.
3125 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003126 # Google Compute Engine has three Operation resources:
3127 #
3128 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3129 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003130 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3131 #
3132 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003133 # - For global operations, use the `globalOperations` resource.
3134 # - For regional operations, use the `regionOperations` resource.
3135 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003136 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003137 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003138 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3139 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3140 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3141 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3142 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3143 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003144 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003145 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3146 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3147 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003148 },
3149 ],
3150 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003151 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
3152 &quot;httpErrorStatusCode&quot;: 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.
3153 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3154 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3155 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3156 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3157 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3158 &quot;progress&quot;: 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.
3159 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3160 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3161 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3162 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3163 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3164 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3165 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
3166 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3167 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3168 {
3169 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3170 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3171 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3172 {
3173 &quot;key&quot;: &quot;A String&quot;, # [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).
3174 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3175 },
3176 ],
3177 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3178 },
3179 ],
3180 &quot;zone&quot;: &quot;A String&quot;, # [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 -07003181 }</pre>
3182</div>
3183
3184<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003185 <code class="details" id="resume">resume(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003186 <pre>Resumes an instance that was suspended using the instances().suspend method.
3187
3188Args:
3189 project: string, Project ID for this request. (required)
3190 zone: string, The name of the zone for this request. (required)
3191 instance: string, Name of the instance resource to resume. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003192 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003193 The object takes the form of:
3194
3195{
Bu Sun Kim65020912020-05-20 12:08:20 -07003196 &quot;disks&quot;: [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003197 #
3198 # In order to resume the instance, the disk url and its corresponding key must be provided.
3199 #
3200 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
3201 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003202 &quot;diskEncryptionKey&quot;: { # Decrypts data associated with the disk with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07003203 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3204 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
3205 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
3206 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003207 #
3208 # The key must meet the following requirements before you can provide it to Compute Engine:
3209 # - The key is wrapped using a RSA public key certificate provided by Google.
3210 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3211 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07003212 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003213 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003214 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003215 },
3216 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003217 &quot;instanceEncryptionKey&quot;: { # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07003218 #
3219 # 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.
3220 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3221 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
3222 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
3223 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3224 #
3225 # The key must meet the following requirements before you can provide it to Compute Engine:
3226 # - The key is wrapped using a RSA public key certificate provided by Google.
3227 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3228 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3229 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3230 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003231 }
3232
3233 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.
3234
3235For 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.
3236
3237The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3238
3239Returns:
3240 An object of the form:
3241
3242 { # Represents an Operation resource.
3243 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003244 # Google Compute Engine has three Operation resources:
3245 #
3246 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3247 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003248 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3249 #
3250 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003251 # - For global operations, use the `globalOperations` resource.
3252 # - For regional operations, use the `regionOperations` resource.
3253 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003254 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003255 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003256 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3257 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3258 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3259 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3260 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3261 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003262 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003263 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3264 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3265 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003266 },
3267 ],
3268 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003269 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
3270 &quot;httpErrorStatusCode&quot;: 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.
3271 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3272 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3273 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3274 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3275 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3276 &quot;progress&quot;: 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.
3277 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3278 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3279 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3280 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3281 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3282 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3283 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
3284 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3285 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3286 {
3287 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3288 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3289 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3290 {
3291 &quot;key&quot;: &quot;A String&quot;, # [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).
3292 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3293 },
3294 ],
3295 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3296 },
3297 ],
3298 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003299 }</pre>
3300</div>
3301
3302<div class="method">
3303 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
3304 <pre>Sets deletion protection on the instance.
3305
3306Args:
3307 project: string, Project ID for this request. (required)
3308 zone: string, The name of the zone for this request. (required)
3309 resource: string, Name or id of the resource for this request. (required)
3310 deletionProtection: boolean, Whether the resource should be protected against deletion.
3311 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.
3312
3313For 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.
3314
3315The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3316
3317Returns:
3318 An object of the form:
3319
3320 { # Represents an Operation resource.
3321 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003322 # Google Compute Engine has three Operation resources:
3323 #
3324 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3325 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003326 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3327 #
3328 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003329 # - For global operations, use the `globalOperations` resource.
3330 # - For regional operations, use the `regionOperations` resource.
3331 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003332 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003333 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003334 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3335 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3336 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3337 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3338 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3339 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003340 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003341 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3342 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3343 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003344 },
3345 ],
3346 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003347 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
3348 &quot;httpErrorStatusCode&quot;: 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.
3349 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3350 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3351 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3352 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3353 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3354 &quot;progress&quot;: 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.
3355 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3356 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3357 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3358 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3359 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3360 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3361 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
3362 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3363 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3364 {
3365 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3366 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3367 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3368 {
3369 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
3370 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3371 },
3372 ],
3373 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3374 },
3375 ],
3376 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003377 }</pre>
3378</div>
3379
3380<div class="method">
3381 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003382 <pre>Sets the auto-delete flag for a disk attached to an instance.
3383
3384Args:
3385 project: string, Project ID for this request. (required)
3386 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003387 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003388 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003389 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)
3390 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.
3391
3392For 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.
3393
3394The 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 -07003395
3396Returns:
3397 An object of the form:
3398
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003399 { # Represents an Operation resource.
3400 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003401 # Google Compute Engine has three Operation resources:
3402 #
3403 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3404 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003405 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3406 #
3407 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003408 # - For global operations, use the `globalOperations` resource.
3409 # - For regional operations, use the `regionOperations` resource.
3410 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003411 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003412 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003413 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3414 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3415 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3416 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3417 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3418 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003419 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003420 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3421 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3422 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003423 },
3424 ],
3425 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003426 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
3427 &quot;httpErrorStatusCode&quot;: 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.
3428 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3429 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3430 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3431 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3432 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3433 &quot;progress&quot;: 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.
3434 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3435 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3436 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3437 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3438 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3439 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3440 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
3441 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3442 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3443 {
3444 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3445 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3446 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3447 {
3448 &quot;key&quot;: &quot;A String&quot;, # [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).
3449 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3450 },
3451 ],
3452 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3453 },
3454 ],
3455 &quot;zone&quot;: &quot;A String&quot;, # [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 -07003456 }</pre>
3457</div>
3458
3459<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003460 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003461 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
3462
3463Args:
3464 project: string, Project ID for this request. (required)
3465 zone: string, The name of the zone for this request. (required)
3466 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003467 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003468 The object takes the form of:
3469
3470{
Bu Sun Kim65020912020-05-20 12:08:20 -07003471 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
3472 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003473 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07003474 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
3475 #
3476 # If the condition evaluates to `true`, then this binding applies to the current request.
3477 #
3478 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
3479 #
3480 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3481 #
3482 # Example (Comparison):
3483 #
3484 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
3485 #
3486 # Example (Equality):
3487 #
3488 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
3489 #
3490 # Example (Logic):
3491 #
3492 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3493 #
3494 # Example (Data Manipulation):
3495 #
3496 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3497 #
3498 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
3499 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
3500 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
3501 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
3502 &quot;title&quot;: &quot;A String&quot;, # 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.
3503 },
3504 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3505 #
3506 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3507 #
3508 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3509 #
3510 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
3511 #
3512 #
3513 #
3514 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3515 #
3516 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3517 #
3518 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
3519 #
3520 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
3521 #
3522 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
3523 #
3524 #
3525 #
3526 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3527 &quot;A String&quot;,
3528 ],
3529 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3530 },
3531 ],
3532 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
3533 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003534 #
3535 #
3536 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003537 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003538 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003539 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003540 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003541 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003542 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003543 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003544 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003545 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003546 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003547 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003548 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003549 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003550 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003551 { # 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.
3552 #
3553 # 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.
3554 #
3555 # Example Policy with multiple AuditConfigs:
3556 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003557 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003558 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003559 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07003560 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003561 { # Provides the configuration for logging a type of permissions. Example:
3562 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003563 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003564 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003565 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
3566 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3567 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003568 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003569 &quot;ignoreChildExemptions&quot;: True or False,
3570 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003571 },
3572 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003573 &quot;exemptedMembers&quot;: [
3574 &quot;A String&quot;,
3575 ],
3576 &quot;service&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003577 },
3578 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003579 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003580 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003581 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07003582 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
3583 #
3584 # If the condition evaluates to `true`, then this binding applies to the current request.
3585 #
3586 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
3587 #
3588 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3589 #
3590 # Example (Comparison):
3591 #
3592 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
3593 #
3594 # Example (Equality):
3595 #
3596 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
3597 #
3598 # Example (Logic):
3599 #
3600 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3601 #
3602 # Example (Data Manipulation):
3603 #
3604 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3605 #
3606 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
3607 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
3608 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
3609 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
3610 &quot;title&quot;: &quot;A String&quot;, # 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.
3611 },
3612 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003613 #
3614 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3615 #
3616 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3617 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003618 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003619 #
3620 #
3621 #
3622 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3623 #
3624 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3625 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003626 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
3627 #
3628 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
3629 #
3630 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
3631 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003632 #
3633 #
3634 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003635 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003636 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003637 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003638 },
3639 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003640 &quot;etag&quot;: &quot;A String&quot;, # `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.
3641 #
3642 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
3643 &quot;iamOwned&quot;: True or False,
3644 &quot;rules&quot;: [ # 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.
3645 { # A rule to be applied in a Policy.
3646 &quot;action&quot;: &quot;A String&quot;, # Required
3647 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3648 { # A condition to be met.
3649 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
3650 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
3651 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
3652 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3653 &quot;values&quot;: [ # The objects of the condition.
3654 &quot;A String&quot;,
3655 ],
3656 },
3657 ],
3658 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
3659 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
3660 &quot;A String&quot;,
3661 ],
3662 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3663 { # Specifies what kind of log the caller must write
3664 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
3665 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3666 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
3667 },
3668 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
3669 },
3670 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
3671 #
3672 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
3673 #
3674 # Field names correspond to IAM request parameters and field values are their respective values.
3675 #
3676 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
3677 #
3678 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
3679 &quot;customFields&quot;: [ # Custom fields.
3680 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3681 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
3682 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
3683 },
3684 ],
3685 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
3686 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
3687 },
3688 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
3689 &quot;logMode&quot;: &quot;A String&quot;,
3690 },
3691 },
3692 ],
3693 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
3694 &quot;A String&quot;,
3695 ],
3696 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
3697 &quot;A String&quot;,
3698 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003699 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003700 ],
3701 &quot;version&quot;: 42, # Specifies the format of the policy.
3702 #
3703 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3704 #
3705 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3706 #
3707 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
3708 #
3709 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
3710 #
3711 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
3712 #
3713 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3714 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003715 }
3716
3717
3718Returns:
3719 An object of the form:
3720
Dan O'Mearadd494642020-05-01 07:42:23 -07003721 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003722 #
3723 #
3724 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003725 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003726 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003727 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003728 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003729 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003730 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003731 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003732 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003733 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003734 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003735 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003736 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003737 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003738 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003739 { # 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.
3740 #
3741 # 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.
3742 #
3743 # Example Policy with multiple AuditConfigs:
3744 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003745 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003746 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003747 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07003748 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003749 { # Provides the configuration for logging a type of permissions. Example:
3750 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003751 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003752 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003753 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
3754 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3755 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003756 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003757 &quot;ignoreChildExemptions&quot;: True or False,
3758 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003759 },
3760 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003761 &quot;exemptedMembers&quot;: [
3762 &quot;A String&quot;,
3763 ],
3764 &quot;service&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003765 },
3766 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003767 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003768 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003769 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07003770 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
3771 #
3772 # If the condition evaluates to `true`, then this binding applies to the current request.
3773 #
3774 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
3775 #
3776 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3777 #
3778 # Example (Comparison):
3779 #
3780 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
3781 #
3782 # Example (Equality):
3783 #
3784 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
3785 #
3786 # Example (Logic):
3787 #
3788 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3789 #
3790 # Example (Data Manipulation):
3791 #
3792 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3793 #
3794 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
3795 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
3796 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
3797 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
3798 &quot;title&quot;: &quot;A String&quot;, # 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.
3799 },
3800 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003801 #
3802 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3803 #
3804 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3805 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003806 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003807 #
3808 #
3809 #
3810 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3811 #
3812 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3813 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003814 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
3815 #
3816 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
3817 #
3818 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
3819 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003820 #
3821 #
3822 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003823 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003824 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003825 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003826 },
3827 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003828 &quot;etag&quot;: &quot;A String&quot;, # `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.
3829 #
3830 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
3831 &quot;iamOwned&quot;: True or False,
3832 &quot;rules&quot;: [ # 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.
3833 { # A rule to be applied in a Policy.
3834 &quot;action&quot;: &quot;A String&quot;, # Required
3835 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3836 { # A condition to be met.
3837 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
3838 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
3839 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
3840 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3841 &quot;values&quot;: [ # The objects of the condition.
3842 &quot;A String&quot;,
3843 ],
3844 },
3845 ],
3846 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
3847 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
3848 &quot;A String&quot;,
3849 ],
3850 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3851 { # Specifies what kind of log the caller must write
3852 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
3853 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3854 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
3855 },
3856 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
3857 },
3858 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
3859 #
3860 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
3861 #
3862 # Field names correspond to IAM request parameters and field values are their respective values.
3863 #
3864 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
3865 #
3866 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
3867 &quot;customFields&quot;: [ # Custom fields.
3868 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3869 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
3870 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
3871 },
3872 ],
3873 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
3874 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
3875 },
3876 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
3877 &quot;logMode&quot;: &quot;A String&quot;,
3878 },
3879 },
3880 ],
3881 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
3882 &quot;A String&quot;,
3883 ],
3884 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
3885 &quot;A String&quot;,
3886 ],
3887 },
3888 ],
3889 &quot;version&quot;: 42, # Specifies the format of the policy.
3890 #
3891 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3892 #
3893 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3894 #
3895 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
3896 #
3897 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
3898 #
3899 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
3900 #
3901 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003902 }</pre>
3903</div>
3904
3905<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003906 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003907 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003908
3909Args:
3910 project: string, Project ID for this request. (required)
3911 zone: string, The name of the zone for this request. (required)
3912 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003913 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003914 The object takes the form of:
3915
3916{
Bu Sun Kim65020912020-05-20 12:08:20 -07003917 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
3918 &quot;labels&quot;: {
3919 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003920 },
3921 }
3922
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003923 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.
3924
3925For 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.
3926
3927The 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 -07003928
3929Returns:
3930 An object of the form:
3931
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003932 { # Represents an Operation resource.
3933 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003934 # Google Compute Engine has three Operation resources:
3935 #
3936 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3937 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003938 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3939 #
3940 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003941 # - For global operations, use the `globalOperations` resource.
3942 # - For regional operations, use the `regionOperations` resource.
3943 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003944 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003945 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003946 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3947 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3948 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3949 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3950 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3951 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003952 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003953 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3954 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3955 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003956 },
3957 ],
3958 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003959 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
3960 &quot;httpErrorStatusCode&quot;: 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.
3961 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3962 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3963 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3964 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3965 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3966 &quot;progress&quot;: 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.
3967 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3968 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3969 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3970 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3971 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3972 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3973 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
3974 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3975 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3976 {
3977 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3978 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3979 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3980 {
3981 &quot;key&quot;: &quot;A String&quot;, # [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).
3982 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3983 },
3984 ],
3985 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3986 },
3987 ],
3988 &quot;zone&quot;: &quot;A String&quot;, # [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 -04003989 }</pre>
3990</div>
3991
3992<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003993 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003994 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified 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)
Dan O'Mearadd494642020-05-01 07:42:23 -07004000 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004001 The object takes the form of:
4002
4003{
Bu Sun Kim65020912020-05-20 12:08:20 -07004004 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004005 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07004006 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
4007 &quot;acceleratorType&quot;: &quot;A String&quot;, # 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 -04004008 },
4009 ],
4010 }
4011
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004012 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.
4013
4014For 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.
4015
4016The 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 -04004017
4018Returns:
4019 An object of the form:
4020
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004021 { # Represents an Operation resource.
4022 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004023 # Google Compute Engine has three Operation resources:
4024 #
4025 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4026 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004027 # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004030 # - For global operations, use the `globalOperations` resource.
4031 # - For regional operations, use the `regionOperations` resource.
4032 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004033 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004034 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004035 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4036 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4037 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4038 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4039 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4040 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004041 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004042 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4043 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4044 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004045 },
4046 ],
4047 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004048 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4049 &quot;httpErrorStatusCode&quot;: 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.
4050 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4051 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4052 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4053 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4054 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4055 &quot;progress&quot;: 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.
4056 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4057 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4058 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4059 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4060 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4061 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4062 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4063 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4064 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4065 {
4066 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4067 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4068 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4069 {
4070 &quot;key&quot;: &quot;A String&quot;, # [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).
4071 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4072 },
4073 ],
4074 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4075 },
4076 ],
4077 &quot;zone&quot;: &quot;A String&quot;, # [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 -07004078 }</pre>
4079</div>
4080
4081<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004082 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004083 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
4084
4085Args:
4086 project: string, Project ID for this request. (required)
4087 zone: string, The name of the zone for this request. (required)
4088 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004089 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004090 The object takes the form of:
4091
4092{
Bu Sun Kim65020912020-05-20 12:08:20 -07004093 &quot;machineType&quot;: &quot;A String&quot;, # 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
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004094 }
4095
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004096 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.
4097
4098For 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.
4099
4100The 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 -07004101
4102Returns:
4103 An object of the form:
4104
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004105 { # Represents an Operation resource.
4106 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004107 # Google Compute Engine has three Operation resources:
4108 #
4109 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4110 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004111 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4112 #
4113 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004114 # - For global operations, use the `globalOperations` resource.
4115 # - For regional operations, use the `regionOperations` resource.
4116 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004117 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004118 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004119 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4120 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4121 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4122 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4123 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4124 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004125 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004126 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4127 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4128 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004129 },
4130 ],
4131 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004132 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4133 &quot;httpErrorStatusCode&quot;: 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.
4134 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4135 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4136 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4137 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4138 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4139 &quot;progress&quot;: 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.
4140 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4141 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4142 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4143 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4144 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4145 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4146 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4147 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4148 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4149 {
4150 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4151 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4152 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4153 {
4154 &quot;key&quot;: &quot;A String&quot;, # [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).
4155 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4156 },
4157 ],
4158 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4159 },
4160 ],
4161 &quot;zone&quot;: &quot;A String&quot;, # [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 -07004162 }</pre>
4163</div>
4164
4165<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004166 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004167 <pre>Sets metadata for the specified instance to the data included in the request.
4168
4169Args:
4170 project: string, Project ID for this request. (required)
4171 zone: string, The name of the zone for this request. (required)
4172 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004173 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004174 The object takes the form of:
4175
4176{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07004177 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004178 #
4179 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004180 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4181 {
4182 &quot;key&quot;: &quot;A String&quot;, # 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.
4183 &quot;value&quot;: &quot;A String&quot;, # 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).
4184 },
4185 ],
4186 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004187}
4188
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004189 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.
4190
4191For 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.
4192
4193The 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 -07004194
4195Returns:
4196 An object of the form:
4197
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004198 { # Represents an Operation resource.
4199 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004200 # Google Compute Engine has three Operation resources:
4201 #
4202 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4203 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004204 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4205 #
4206 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004207 # - For global operations, use the `globalOperations` resource.
4208 # - For regional operations, use the `regionOperations` resource.
4209 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004210 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004211 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004212 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4213 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4214 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4215 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4216 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4217 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004218 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004219 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4220 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4221 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004222 },
4223 ],
4224 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004225 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4226 &quot;httpErrorStatusCode&quot;: 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.
4227 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4228 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4229 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4230 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4231 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4232 &quot;progress&quot;: 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.
4233 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4234 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4235 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4236 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4237 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4238 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4239 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4240 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4241 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4242 {
4243 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4244 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4245 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4246 {
4247 &quot;key&quot;: &quot;A String&quot;, # [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).
4248 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4249 },
4250 ],
4251 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4252 },
4253 ],
4254 &quot;zone&quot;: &quot;A String&quot;, # [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 -07004255 }</pre>
4256</div>
4257
4258<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004259 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004260 <pre>Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004261
4262Args:
4263 project: string, Project ID for this request. (required)
4264 zone: string, The name of the zone for this request. (required)
4265 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004266 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004267 The object takes the form of:
4268
4269{
Bu Sun Kim65020912020-05-20 12:08:20 -07004270 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform this instance should be started at.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004271 }
4272
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004273 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.
4274
4275For 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.
4276
4277The 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 -04004278
4279Returns:
4280 An object of the form:
4281
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004282 { # Represents an Operation resource.
4283 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004284 # Google Compute Engine has three Operation resources:
4285 #
4286 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4287 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004288 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4289 #
4290 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004291 # - For global operations, use the `globalOperations` resource.
4292 # - For regional operations, use the `regionOperations` resource.
4293 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004294 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004295 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004296 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4297 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4298 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4299 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4300 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4301 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004302 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004303 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4304 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4305 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004306 },
4307 ],
4308 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004309 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4310 &quot;httpErrorStatusCode&quot;: 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.
4311 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4312 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4313 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4314 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4315 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4316 &quot;progress&quot;: 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.
4317 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4318 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4319 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4320 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4321 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4322 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4323 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4324 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4325 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4326 {
4327 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4328 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4329 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4330 {
4331 &quot;key&quot;: &quot;A String&quot;, # [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).
4332 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4333 },
4334 ],
4335 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4336 },
4337 ],
4338 &quot;zone&quot;: &quot;A String&quot;, # [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 -04004339 }</pre>
4340</div>
4341
4342<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004343 <code class="details" id="setName">setName(project, zone, instance, body=None, requestId=None)</code>
4344 <pre>Sets name of an instance.
4345
4346Args:
4347 project: string, Project ID for this request. (required)
4348 zone: string, The name of the zone for this request. (required)
4349 instance: string, The instance name for this request. (required)
4350 body: object, The request body.
4351 The object takes the form of:
4352
4353{
4354 &quot;currentName&quot;: &quot;A String&quot;, # The current name of this resource, used to prevent conflicts. Provide the latest name when making a request to change name.
4355 &quot;name&quot;: &quot;A String&quot;, # The name to be applied to the instance. Needs to be RFC 1035 compliant.
4356 }
4357
4358 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.
4359
4360For 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.
4361
4362The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4363
4364Returns:
4365 An object of the form:
4366
4367 { # Represents an Operation resource.
4368 #
4369 # Google Compute Engine has three Operation resources:
4370 #
4371 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4372 #
4373 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4374 #
4375 # Operations can be global, regional or zonal.
4376 # - For global operations, use the `globalOperations` resource.
4377 # - For regional operations, use the `regionOperations` resource.
4378 # - For zonal operations, use the `zonalOperations` resource.
4379 #
4380 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4381 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4382 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4383 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4384 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4385 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4386 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
4387 {
4388 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4389 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4390 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4391 },
4392 ],
4393 },
4394 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4395 &quot;httpErrorStatusCode&quot;: 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.
4396 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4397 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4398 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4399 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4400 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4401 &quot;progress&quot;: 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.
4402 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4403 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4404 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4405 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4406 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4407 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4408 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4409 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4410 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4411 {
4412 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4413 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4414 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4415 {
4416 &quot;key&quot;: &quot;A String&quot;, # [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).
4417 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4418 },
4419 ],
4420 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4421 },
4422 ],
4423 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4424 }</pre>
4425</div>
4426
4427<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004428 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004429 <pre>Sets an instance&#x27;s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004430
4431Args:
4432 project: string, Project ID for this request. (required)
4433 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004434 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004435 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004436 The object takes the form of:
4437
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004438{ # Sets the scheduling options for an Instance. NextID: 13
Bu Sun Kim65020912020-05-20 12:08:20 -07004439 &quot;automaticRestart&quot;: 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 -04004440 #
4441 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Bu Sun Kim65020912020-05-20 12:08:20 -07004442 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
4443 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004444 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Bu Sun Kim65020912020-05-20 12:08:20 -07004445 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
4446 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
4447 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
4448 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004449 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004450 },
4451 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004452 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004453 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004454}
4455
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004456 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.
4457
4458For 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.
4459
4460The 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 -07004461
4462Returns:
4463 An object of the form:
4464
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004465 { # Represents an Operation resource.
4466 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004467 # Google Compute Engine has three Operation resources:
4468 #
4469 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4470 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004471 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4472 #
4473 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004474 # - For global operations, use the `globalOperations` resource.
4475 # - For regional operations, use the `regionOperations` resource.
4476 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004477 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004478 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004479 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4480 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4481 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4482 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4483 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4484 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004485 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004486 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4487 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4488 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004489 },
4490 ],
4491 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004492 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4493 &quot;httpErrorStatusCode&quot;: 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.
4494 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4495 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4496 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4497 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4498 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4499 &quot;progress&quot;: 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.
4500 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4501 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4502 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4503 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4504 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4505 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4506 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4507 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4508 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4509 {
4510 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4511 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4512 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4513 {
4514 &quot;key&quot;: &quot;A String&quot;, # [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).
4515 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4516 },
4517 ],
4518 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4519 },
4520 ],
4521 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004522 }</pre>
4523</div>
4524
4525<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004526 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004527 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004528
4529Args:
4530 project: string, Project ID for this request. (required)
4531 zone: string, The name of the zone for this request. (required)
4532 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004533 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004534 The object takes the form of:
4535
4536{
Bu Sun Kim65020912020-05-20 12:08:20 -07004537 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
4538 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
4539 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004540 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004541 }
4542
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004543 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.
4544
4545For 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.
4546
4547The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004548
4549Returns:
4550 An object of the form:
4551
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004552 { # Represents an Operation resource.
4553 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004554 # Google Compute Engine has three Operation resources:
4555 #
4556 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4557 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004558 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4559 #
4560 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004561 # - For global operations, use the `globalOperations` resource.
4562 # - For regional operations, use the `regionOperations` resource.
4563 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004564 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004565 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004566 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4567 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4568 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4569 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4570 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4571 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004572 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004573 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4574 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4575 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004576 },
4577 ],
4578 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004579 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4580 &quot;httpErrorStatusCode&quot;: 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.
4581 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4582 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4583 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4584 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4585 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4586 &quot;progress&quot;: 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.
4587 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4588 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4589 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4590 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4591 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4592 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4593 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4594 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4595 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4596 {
4597 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4598 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4599 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4600 {
4601 &quot;key&quot;: &quot;A String&quot;, # [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).
4602 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4603 },
4604 ],
4605 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4606 },
4607 ],
4608 &quot;zone&quot;: &quot;A String&quot;, # [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 -07004609 }</pre>
4610</div>
4611
4612<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004613 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004614 <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.
4615
4616Args:
4617 project: string, Project ID for this request. (required)
4618 zone: string, The name of the zone for this request. (required)
4619 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004620 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004621 The object takes the form of:
4622
4623{ # The policy describes the baseline against which Instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07004624 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004625}
4626
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004627 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.
4628
4629For 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.
4630
4631The 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 -07004632
4633Returns:
4634 An object of the form:
4635
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004636 { # Represents an Operation resource.
4637 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004638 # Google Compute Engine has three Operation resources:
4639 #
4640 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4641 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004642 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4643 #
4644 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004645 # - For global operations, use the `globalOperations` resource.
4646 # - For regional operations, use the `regionOperations` resource.
4647 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004648 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004649 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004650 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4651 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4652 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4653 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4654 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4655 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004656 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004657 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4658 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4659 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004660 },
4661 ],
4662 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004663 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4664 &quot;httpErrorStatusCode&quot;: 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.
4665 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4666 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4667 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4668 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4669 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4670 &quot;progress&quot;: 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.
4671 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4672 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4673 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4674 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4675 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4676 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4677 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4678 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4679 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4680 {
4681 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4682 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4683 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4684 {
4685 &quot;key&quot;: &quot;A String&quot;, # [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).
4686 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4687 },
4688 ],
4689 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4690 },
4691 ],
4692 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4693 }</pre>
4694</div>
4695
4696<div class="method">
4697 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
4698 <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.
4699
4700Args:
4701 project: string, Project ID for this request. (required)
4702 zone: string, The name of the zone for this request. (required)
4703 instance: string, Name of the instance scoping this request. (required)
4704 body: object, The request body.
4705 The object takes the form of:
4706
4707{ # The policy describes the baseline against which VM instance boot integrity is measured.
4708 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
4709}
4710
4711 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.
4712
4713For 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.
4714
4715The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4716
4717Returns:
4718 An object of the form:
4719
4720 { # Represents an Operation resource.
4721 #
4722 # Google Compute Engine has three Operation resources:
4723 #
4724 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4725 #
4726 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4727 #
4728 # Operations can be global, regional or zonal.
4729 # - For global operations, use the `globalOperations` resource.
4730 # - For regional operations, use the `regionOperations` resource.
4731 # - For zonal operations, use the `zonalOperations` resource.
4732 #
4733 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4734 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4735 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4736 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4737 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4738 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4739 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
4740 {
4741 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4742 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4743 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4744 },
4745 ],
4746 },
4747 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4748 &quot;httpErrorStatusCode&quot;: 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.
4749 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4750 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4751 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4752 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4753 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4754 &quot;progress&quot;: 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.
4755 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4756 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4757 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4758 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4759 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4760 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4761 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4762 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4763 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4764 {
4765 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4766 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4767 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4768 {
4769 &quot;key&quot;: &quot;A String&quot;, # [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).
4770 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4771 },
4772 ],
4773 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4774 },
4775 ],
4776 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4777 }</pre>
4778</div>
4779
4780<div class="method">
4781 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
4782 <pre>Sets network tags for the specified instance to the data included in the request.
4783
4784Args:
4785 project: string, Project ID for this request. (required)
4786 zone: string, The name of the zone for this request. (required)
4787 instance: string, Name of the instance scoping this request. (required)
4788 body: object, The request body.
4789 The object takes the form of:
4790
4791{ # A set of instance tags.
4792 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; 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.
4793 #
4794 # To see the latest fingerprint, make get() request to the instance.
4795 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4796 &quot;A String&quot;,
4797 ],
4798}
4799
4800 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.
4801
4802For 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.
4803
4804The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4805
4806Returns:
4807 An object of the form:
4808
4809 { # Represents an Operation resource.
4810 #
4811 # Google Compute Engine has three Operation resources:
4812 #
4813 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4814 #
4815 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4816 #
4817 # Operations can be global, regional or zonal.
4818 # - For global operations, use the `globalOperations` resource.
4819 # - For regional operations, use the `regionOperations` resource.
4820 # - For zonal operations, use the `zonalOperations` resource.
4821 #
4822 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4823 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4824 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4825 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4826 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4827 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4828 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
4829 {
4830 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4831 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4832 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4833 },
4834 ],
4835 },
4836 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4837 &quot;httpErrorStatusCode&quot;: 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.
4838 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4839 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4840 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4841 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4842 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4843 &quot;progress&quot;: 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.
4844 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4845 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4846 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4847 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4848 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4849 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4850 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4851 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4852 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4853 {
4854 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4855 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4856 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4857 {
4858 &quot;key&quot;: &quot;A String&quot;, # [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).
4859 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4860 },
4861 ],
4862 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4863 },
4864 ],
4865 &quot;zone&quot;: &quot;A String&quot;, # [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 -07004866 }</pre>
4867</div>
4868
4869<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004870 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
4871 <pre>Simulates a maintenance event on the instance.
4872
4873Args:
4874 project: string, Project ID for this request. (required)
4875 zone: string, The name of the zone for this request. (required)
4876 instance: string, Name of the instance scoping this request. (required)
4877
4878Returns:
4879 An object of the form:
4880
4881 { # Represents an Operation resource.
4882 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004883 # Google Compute Engine has three Operation resources:
4884 #
4885 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4886 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004887 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4888 #
4889 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004890 # - For global operations, use the `globalOperations` resource.
4891 # - For regional operations, use the `regionOperations` resource.
4892 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004893 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004894 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004895 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4896 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4897 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4898 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4899 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4900 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004901 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004902 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4903 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4904 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004905 },
4906 ],
4907 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004908 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4909 &quot;httpErrorStatusCode&quot;: 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.
4910 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4911 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4912 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4913 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4914 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4915 &quot;progress&quot;: 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.
4916 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4917 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4918 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4919 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4920 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4921 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4922 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
4923 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4924 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4925 {
4926 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4927 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4928 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4929 {
4930 &quot;key&quot;: &quot;A String&quot;, # [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).
4931 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4932 },
4933 ],
4934 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4935 },
4936 ],
4937 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004938 }</pre>
4939</div>
4940
4941<div class="method">
4942 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
4943 <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 -07004944
4945Args:
4946 project: string, Project ID for this request. (required)
4947 zone: string, The name of the zone for this request. (required)
4948 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004949 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.
4950
4951For 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.
4952
4953The 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 -07004954
4955Returns:
4956 An object of the form:
4957
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004958 { # Represents an Operation resource.
4959 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004960 # Google Compute Engine has three Operation resources:
4961 #
4962 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4963 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004964 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4965 #
4966 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004967 # - For global operations, use the `globalOperations` resource.
4968 # - For regional operations, use the `regionOperations` resource.
4969 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004970 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004971 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004972 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4973 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4974 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4975 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4976 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4977 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004978 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004979 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4980 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4981 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004982 },
4983 ],
4984 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004985 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4986 &quot;httpErrorStatusCode&quot;: 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.
4987 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4988 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4989 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4990 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4991 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4992 &quot;progress&quot;: 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.
4993 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4994 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4995 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4996 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4997 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4998 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4999 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
5000 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5001 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5002 {
5003 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5004 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5005 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5006 {
5007 &quot;key&quot;: &quot;A String&quot;, # [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).
5008 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5009 },
5010 ],
5011 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5012 },
5013 ],
5014 &quot;zone&quot;: &quot;A String&quot;, # [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 -07005015 }</pre>
5016</div>
5017
5018<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005019 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005020 <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 -07005021
5022Args:
5023 project: string, Project ID for this request. (required)
5024 zone: string, The name of the zone for this request. (required)
5025 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005026 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005027 The object takes the form of:
5028
5029{
Bu Sun Kim65020912020-05-20 12:08:20 -07005030 &quot;disks&quot;: [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005031 #
5032 # In order to start the instance, the disk url and its corresponding key must be provided.
5033 #
5034 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
5035 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005036 &quot;diskEncryptionKey&quot;: { # Decrypts data associated with the disk with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07005037 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5038 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5039 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5040 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005041 #
5042 # The key must meet the following requirements before you can provide it to Compute Engine:
5043 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005044 # - 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 -07005045 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07005046 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005047 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005048 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005049 },
5050 ],
5051 }
5052
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005053 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.
5054
5055For 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.
5056
5057The 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 -07005058
5059Returns:
5060 An object of the form:
5061
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005062 { # Represents an Operation resource.
5063 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005064 # Google Compute Engine has three Operation resources:
5065 #
5066 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5067 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005068 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5069 #
5070 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005071 # - For global operations, use the `globalOperations` resource.
5072 # - For regional operations, use the `regionOperations` resource.
5073 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005074 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005075 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005076 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5077 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5078 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5079 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5080 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5081 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005082 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005083 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5084 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5085 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005086 },
5087 ],
5088 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005089 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5090 &quot;httpErrorStatusCode&quot;: 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.
5091 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5092 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5093 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5094 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5095 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5096 &quot;progress&quot;: 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.
5097 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5098 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5099 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5100 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5101 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5102 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5103 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
5104 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5105 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5106 {
5107 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5108 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5109 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5110 {
5111 &quot;key&quot;: &quot;A String&quot;, # [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).
5112 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5113 },
5114 ],
5115 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5116 },
5117 ],
5118 &quot;zone&quot;: &quot;A String&quot;, # [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 -07005119 }</pre>
5120</div>
5121
5122<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005123 <code class="details" id="stop">stop(project, zone, instance, requestId=None)</code>
5124 <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 -07005125
5126Args:
5127 project: string, Project ID for this request. (required)
5128 zone: string, The name of the zone for this request. (required)
5129 instance: string, Name of the instance resource to stop. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005130 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.
5131
5132For 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.
5133
5134The 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 -07005135
5136Returns:
5137 An object of the form:
5138
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005139 { # Represents an Operation resource.
5140 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005141 # Google Compute Engine has three Operation resources:
5142 #
5143 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5144 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005145 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5146 #
5147 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005148 # - For global operations, use the `globalOperations` resource.
5149 # - For regional operations, use the `regionOperations` resource.
5150 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005151 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005152 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005153 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5154 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5155 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5156 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5157 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5158 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005159 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005160 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5161 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5162 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005163 },
5164 ],
5165 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005166 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5167 &quot;httpErrorStatusCode&quot;: 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.
5168 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5169 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5170 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5171 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5172 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5173 &quot;progress&quot;: 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.
5174 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5175 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5176 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5177 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5178 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5179 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5180 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
5181 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5182 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5183 {
5184 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5185 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5186 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5187 {
5188 &quot;key&quot;: &quot;A String&quot;, # [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).
5189 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5190 },
5191 ],
5192 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5193 },
5194 ],
5195 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005196 }</pre>
5197</div>
5198
5199<div class="method">
5200 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
5201 <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.
5202
5203Args:
5204 project: string, Project ID for this request. (required)
5205 zone: string, The name of the zone for this request. (required)
5206 instance: string, Name of the instance resource to suspend. (required)
5207 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
5208 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.
5209
5210For 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.
5211
5212The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5213
5214Returns:
5215 An object of the form:
5216
5217 { # Represents an Operation resource.
5218 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005219 # Google Compute Engine has three Operation resources:
5220 #
5221 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5222 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005223 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5224 #
5225 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005226 # - For global operations, use the `globalOperations` resource.
5227 # - For regional operations, use the `regionOperations` resource.
5228 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005229 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005230 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005231 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5232 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5233 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5234 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5235 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5236 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005237 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005238 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5239 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5240 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005241 },
5242 ],
5243 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005244 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5245 &quot;httpErrorStatusCode&quot;: 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.
5246 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5247 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5248 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5249 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5250 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5251 &quot;progress&quot;: 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.
5252 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5253 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5254 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5255 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5256 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5257 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5258 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
5259 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5260 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5261 {
5262 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5263 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5264 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5265 {
5266 &quot;key&quot;: &quot;A String&quot;, # [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).
5267 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5268 },
5269 ],
5270 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5271 },
5272 ],
5273 &quot;zone&quot;: &quot;A String&quot;, # [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 -07005274 }</pre>
5275</div>
5276
5277<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005278 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005279 <pre>Returns permissions that a caller has on the specified resource.
5280
5281Args:
5282 project: string, Project ID for this request. (required)
5283 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005284 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005285 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005286 The object takes the form of:
5287
5288{
Bu Sun Kim65020912020-05-20 12:08:20 -07005289 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
5290 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005291 ],
5292 }
5293
5294
5295Returns:
5296 An object of the form:
5297
5298 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005299 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
5300 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005301 ],
5302 }</pre>
5303</div>
5304
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005305<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07005306 <code class="details" id="update">update(project, zone, instance, body=None, minimalAction=None, mostDisruptiveAllowedAction=None, requestId=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -07005307 <pre>Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
5308
5309Args:
5310 project: string, Project ID for this request. (required)
5311 zone: string, The name of the zone for this request. (required)
5312 instance: string, Name of the instance resource to update. (required)
5313 body: object, The request body.
5314 The object takes the form of:
5315
5316{ # Represents an Instance resource.
5317 #
5318 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005319 &quot;canIpForward&quot;: 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005320 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
5321 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
5322 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005323 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
5324 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
5325 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
5326 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5327 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
Dan O'Mearadd494642020-05-01 07:42:23 -07005328 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07005329 &quot;autoDelete&quot;: 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).
5330 &quot;boot&quot;: 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.
5331 &quot;deviceName&quot;: &quot;A String&quot;, # 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.
5332 #
5333 # 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005334 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07005335 #
5336 # 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.
5337 #
5338 # 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.
5339 #
5340 # 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.
5341 #
5342 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
Bu Sun Kim65020912020-05-20 12:08:20 -07005343 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5344 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5345 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5346 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07005347 #
5348 # The key must meet the following requirements before you can provide it to Compute Engine:
5349 # - The key is wrapped using a RSA public key certificate provided by Google.
5350 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5351 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07005352 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07005353 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005354 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
5355 &quot;guestOsFeatures&quot;: [ # 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.
5356 { # Guest OS features.
5357 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
5358 },
5359 ],
5360 &quot;index&quot;: 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.
5361 &quot;initializeParams&quot;: { # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005362 #
5363 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
5364 #
5365 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Bu Sun Kim65020912020-05-20 12:08:20 -07005366 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
5367 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
5368 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
5369 &quot;diskType&quot;: &quot;A String&quot;, # 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:
Dan O'Mearadd494642020-05-01 07:42:23 -07005370 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
5371 #
5372 #
5373 # 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:
5374 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
5375 # - projects/project/zones/zone/diskTypes/diskType
5376 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07005377 &quot;guestOsFeatures&quot;: [ # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005378 #
5379 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
5380 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07005381 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Dan O'Mearadd494642020-05-01 07:42:23 -07005382 },
5383 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005384 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
5385 &quot;a_key&quot;: &quot;A String&quot;,
5386 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005387 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005388 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
5389 &quot;resourcePolicies&quot;: [ # 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.
5390 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07005391 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005392 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Dan O'Mearadd494642020-05-01 07:42:23 -07005393 #
5394 # 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:
5395 # projects/debian-cloud/global/images/family/debian-9
5396 #
5397 #
5398 # Alternatively, use a specific version of a public operating system image:
5399 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
5400 #
5401 #
5402 # To create a disk with a custom image that you created, specify the image name in the following format:
5403 # global/images/my-custom-image
5404 #
5405 #
5406 # 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:
5407 # global/images/family/my-image-family
5408 #
5409 #
5410 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005411 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07005412 #
5413 # 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.
5414 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5415 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5416 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5417 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07005418 #
5419 # The key must meet the following requirements before you can provide it to Compute Engine:
5420 # - The key is wrapped using a RSA public key certificate provided by Google.
5421 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5422 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07005423 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
5424 },
5425 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
5426 #
5427 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
5428 # global/snapshots/my-backup
5429 #
5430 #
5431 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005432 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07005433 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5434 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5435 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5436 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
5437 #
5438 # The key must meet the following requirements before you can provide it to Compute Engine:
5439 # - The key is wrapped using a RSA public key certificate provided by Google.
5440 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5441 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5442 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07005443 },
5444 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005445 &quot;interface&quot;: &quot;A String&quot;, # 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.
5446 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
5447 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
5448 &quot;A String&quot;,
5449 ],
5450 &quot;mode&quot;: &quot;A String&quot;, # 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.
5451 &quot;shieldedInstanceInitialState&quot;: { # 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
5452 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07005453 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005454 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
5455 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07005456 },
5457 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005458 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07005459 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005460 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
5461 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07005462 },
5463 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005464 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07005465 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005466 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
5467 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07005468 },
5469 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005470 &quot;pk&quot;: { # The Platform Key (PK).
5471 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
5472 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07005473 },
5474 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005475 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Dan O'Mearadd494642020-05-01 07:42:23 -07005476 #
5477 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
5478 #
5479 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07005480 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Dan O'Mearadd494642020-05-01 07:42:23 -07005481 },
5482 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005483 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
5484 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
5485 },
5486 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
5487 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this resource, which is essentially a hash of the instance&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance.
5488 #
5489 # To see the latest fingerprint, make get() request to the instance.
5490 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
5491 { # A specification of the type and number of accelerator cards attached to the instance.
5492 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
5493 &quot;acceleratorType&quot;: &quot;A String&quot;, # 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.
5494 },
5495 ],
5496 &quot;hostname&quot;: &quot;A String&quot;, # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
5497 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5498 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
5499 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for this request, which is essentially a hash of the label&#x27;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.
5500 #
5501 # To see the latest fingerprint, make get() request to the instance.
5502 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
5503 &quot;a_key&quot;: &quot;A String&quot;,
5504 },
5505 &quot;machineType&quot;: &quot;A String&quot;, # 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:
5506 # zones/us-central1-f/machineTypes/n1-standard-1
5507 #
5508 #
5509 # 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):
5510 # zones/zone/machineTypes/custom-CPUS-MEMORY
5511 #
5512 #
5513 # For example: zones/us-central1-f/machineTypes/custom-4-5120
5514 #
5515 # For a full list of restrictions, read the Specifications for custom machine types.
5516 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
5517 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;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.
5518 #
5519 # To see the latest fingerprint, make a get() request to retrieve the resource.
5520 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
5521 {
5522 &quot;key&quot;: &quot;A String&quot;, # 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.
5523 &quot;value&quot;: &quot;A String&quot;, # 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).
5524 },
5525 ],
5526 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
5527 },
5528 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;.
5529 &quot;name&quot;: &quot;A String&quot;, # 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.
5530 &quot;networkInterfaces&quot;: [ # 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.
5531 { # A network interface resource attached to an instance.
5532 &quot;accessConfigs&quot;: [ # 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.
5533 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
5534 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5535 &quot;name&quot;: &quot;A String&quot;, # 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.
5536 &quot;natIP&quot;: &quot;A String&quot;, # 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.
5537 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
5538 #
5539 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5540 #
5541 # 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.
5542 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
5543 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
5544 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
5545 },
5546 ],
5547 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
5548 { # An alias IP range attached to an instance&#x27;s network interface.
5549 &quot;ipCidrRange&quot;: &quot;A String&quot;, # 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).
5550 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # 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.
5551 },
5552 ],
5553 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
5554 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
5555 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
5556 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
5557 &quot;network&quot;: &quot;A String&quot;, # 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.
5558 #
5559 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
5560 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5561 # - projects/project/global/networks/network
5562 # - global/networks/default
5563 &quot;networkIP&quot;: &quot;A String&quot;, # 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.
5564 &quot;subnetwork&quot;: &quot;A String&quot;, # 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:
5565 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5566 # - regions/region/subnetworks/subnetwork
5567 },
5568 ],
5569 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
5570 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
5571 &quot;consumeReservationType&quot;: &quot;A String&quot;, # 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.
5572 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
5573 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
5574 &quot;A String&quot;,
5575 ],
5576 },
5577 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
5578 &quot;A String&quot;,
5579 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005580 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005581 &quot;automaticRestart&quot;: 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.
5582 #
5583 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
5584 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
5585 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
5586 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
5587 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
5588 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
5589 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
5590 &quot;A String&quot;,
5591 ],
5592 },
5593 ],
5594 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005595 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07005596 },
5597 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
5598 &quot;serviceAccounts&quot;: [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
5599 #
5600 # 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.
5601 { # A service account.
5602 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
5603 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
5604 &quot;A String&quot;,
5605 ],
5606 },
5607 ],
5608 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
5609 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
5610 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
5611 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
5612 },
5613 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
5614 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
5615 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005616 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07005617 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
5618 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
5619 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
5620 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005621 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured. # Deprecating, please use shielded_instance_integrity_policy.
Bu Sun Kim65020912020-05-20 12:08:20 -07005622 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
5623 },
5624 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005625 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07005626 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5627 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5628 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5629 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
5630 #
5631 # The key must meet the following requirements before you can provide it to Compute Engine:
5632 # - The key is wrapped using a RSA public key certificate provided by Google.
5633 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5634 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5635 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
5636 },
5637 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005638 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07005639 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
5640 &quot;tags&quot;: { # 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 &#x27;tags.items&#x27; field.
5641 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; 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.
5642 #
5643 # To see the latest fingerprint, make get() request to the instance.
5644 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
5645 &quot;A String&quot;,
5646 ],
5647 },
5648 &quot;zone&quot;: &quot;A String&quot;, # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005649}
5650
5651 minimalAction: string, Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require.
5652 Allowed values
5653 INVALID -
5654 NO_EFFECT -
5655 REFRESH -
5656 RESTART -
Bu Sun Kim65020912020-05-20 12:08:20 -07005657 mostDisruptiveAllowedAction: string, Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART.
5658 Allowed values
5659 INVALID -
5660 NO_EFFECT -
5661 REFRESH -
5662 RESTART -
Dan O'Mearadd494642020-05-01 07:42:23 -07005663 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.
5664
5665For 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.
5666
5667The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Dan O'Mearadd494642020-05-01 07:42:23 -07005668
5669Returns:
5670 An object of the form:
5671
5672 { # Represents an Operation resource.
5673 #
5674 # Google Compute Engine has three Operation resources:
5675 #
5676 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5677 #
5678 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5679 #
5680 # Operations can be global, regional or zonal.
5681 # - For global operations, use the `globalOperations` resource.
5682 # - For regional operations, use the `regionOperations` resource.
5683 # - For zonal operations, use the `zonalOperations` resource.
5684 #
5685 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005686 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5687 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5688 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5689 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5690 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5691 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005692 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005693 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5694 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5695 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07005696 },
5697 ],
5698 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005699 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5700 &quot;httpErrorStatusCode&quot;: 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.
5701 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5702 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5703 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5704 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5705 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5706 &quot;progress&quot;: 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.
5707 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5708 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5709 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5710 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5711 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5712 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5713 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
5714 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5715 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5716 {
5717 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5718 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5719 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5720 {
5721 &quot;key&quot;: &quot;A String&quot;, # [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).
5722 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5723 },
5724 ],
5725 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5726 },
5727 ],
5728 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Dan O'Mearadd494642020-05-01 07:42:23 -07005729 }</pre>
5730</div>
5731
5732<div class="method">
5733 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07005734 <pre>Updates the specified access config from an instance&#x27;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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005735
5736Args:
5737 project: string, Project ID for this request. (required)
5738 zone: string, The name of the zone for this request. (required)
5739 instance: string, The instance name for this request. (required)
5740 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005741 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005742 The object takes the form of:
5743
Bu Sun Kim65020912020-05-20 12:08:20 -07005744{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
5745 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5746 &quot;name&quot;: &quot;A String&quot;, # 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.
5747 &quot;natIP&quot;: &quot;A String&quot;, # 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.
5748 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005749 #
5750 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5751 #
5752 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07005753 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
5754 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
5755 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005756}
5757
5758 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.
5759
5760For 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.
5761
5762The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5763
5764Returns:
5765 An object of the form:
5766
5767 { # Represents an Operation resource.
5768 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005769 # Google Compute Engine has three Operation resources:
5770 #
5771 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5772 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005773 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5774 #
5775 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005776 # - For global operations, use the `globalOperations` resource.
5777 # - For regional operations, use the `regionOperations` resource.
5778 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005779 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005780 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005781 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5782 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5783 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5784 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5785 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5786 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005787 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005788 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5789 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5790 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005791 },
5792 ],
5793 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005794 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5795 &quot;httpErrorStatusCode&quot;: 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.
5796 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5797 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5798 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5799 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5800 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5801 &quot;progress&quot;: 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.
5802 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5803 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5804 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5805 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5806 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5807 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5808 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
5809 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5810 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5811 {
5812 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5813 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5814 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5815 {
5816 &quot;key&quot;: &quot;A String&quot;, # [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).
5817 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5818 },
5819 ],
5820 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5821 },
5822 ],
5823 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005824 }</pre>
5825</div>
5826
5827<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005828 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005829 <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.
5830
5831Args:
5832 project: string, Project ID for this request. (required)
5833 zone: string, The name of the zone for this request. (required)
5834 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005835 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005836 The object takes the form of:
5837
5838{ # A set of Display Device options
Bu Sun Kim65020912020-05-20 12:08:20 -07005839 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005840}
5841
5842 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.
5843
5844For 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.
5845
5846The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5847
5848Returns:
5849 An object of the form:
5850
5851 { # Represents an Operation resource.
5852 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005853 # Google Compute Engine has three Operation resources:
5854 #
5855 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5856 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005857 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5858 #
5859 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005860 # - For global operations, use the `globalOperations` resource.
5861 # - For regional operations, use the `regionOperations` resource.
5862 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005863 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005864 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005865 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5866 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5867 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5868 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5869 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5870 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005871 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005872 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5873 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5874 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005875 },
5876 ],
5877 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005878 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5879 &quot;httpErrorStatusCode&quot;: 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.
5880 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5881 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5882 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5883 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5884 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5885 &quot;progress&quot;: 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.
5886 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5887 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5888 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5889 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5890 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5891 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5892 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
5893 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5894 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5895 {
5896 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5897 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5898 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5899 {
5900 &quot;key&quot;: &quot;A String&quot;, # [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).
5901 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5902 },
5903 ],
5904 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5905 },
5906 ],
5907 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005908 }</pre>
5909</div>
5910
5911<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005912 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07005913 <pre>Updates an instance&#x27;s network interface. This method follows PATCH semantics.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005914
5915Args:
5916 project: string, Project ID for this request. (required)
5917 zone: string, The name of the zone for this request. (required)
5918 instance: string, The instance name for this request. (required)
5919 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005920 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005921 The object takes the form of:
5922
5923{ # A network interface resource attached to an instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005924 &quot;accessConfigs&quot;: [ # 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.
5925 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
5926 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5927 &quot;name&quot;: &quot;A String&quot;, # 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.
5928 &quot;natIP&quot;: &quot;A String&quot;, # 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.
5929 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005930 #
5931 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5932 #
5933 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07005934 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
5935 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
5936 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005937 },
5938 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005939 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
5940 { # An alias IP range attached to an instance&#x27;s network interface.
5941 &quot;ipCidrRange&quot;: &quot;A String&quot;, # 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).
5942 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # 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.
5943 },
5944 ],
5945 &quot;fingerprint&quot;: &quot;A String&quot;, # 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.
5946 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
5947 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
5948 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
5949 &quot;network&quot;: &quot;A String&quot;, # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005950 #
5951 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
5952 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5953 # - projects/project/global/networks/network
5954 # - global/networks/default
Bu Sun Kim65020912020-05-20 12:08:20 -07005955 &quot;networkIP&quot;: &quot;A String&quot;, # 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.
5956 &quot;subnetwork&quot;: &quot;A String&quot;, # 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:
5957 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5958 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005959}
5960
5961 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.
5962
5963For 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.
5964
5965The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5966
5967Returns:
5968 An object of the form:
5969
5970 { # Represents an Operation resource.
5971 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005972 # Google Compute Engine has three Operation resources:
5973 #
5974 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5975 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005976 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5977 #
5978 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005979 # - For global operations, use the `globalOperations` resource.
5980 # - For regional operations, use the `regionOperations` resource.
5981 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005982 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005983 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005984 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5985 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5986 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5987 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5988 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5989 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005990 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005991 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5992 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5993 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005994 },
5995 ],
5996 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005997 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5998 &quot;httpErrorStatusCode&quot;: 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.
5999 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6000 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6001 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6002 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6003 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6004 &quot;progress&quot;: 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.
6005 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6006 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6007 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
6008 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
6009 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6010 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6011 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
6012 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6013 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6014 {
6015 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
6016 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6017 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6018 {
6019 &quot;key&quot;: &quot;A String&quot;, # [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).
6020 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6021 },
6022 ],
6023 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6024 },
6025 ],
6026 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006027 }</pre>
6028</div>
6029
6030<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006031 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006032 <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.
6033
6034Args:
6035 project: string, Project ID for this request. (required)
6036 zone: string, The name of the zone for this request. (required)
6037 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006038 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006039 The object takes the form of:
6040
6041{ # A set of Shielded Instance options.
Bu Sun Kim65020912020-05-20 12:08:20 -07006042 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
6043 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
6044 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006045}
6046
6047 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.
6048
6049For 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.
6050
6051The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6052
6053Returns:
6054 An object of the form:
6055
6056 { # Represents an Operation resource.
6057 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006058 # Google Compute Engine has three Operation resources:
6059 #
6060 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6061 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006062 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6063 #
6064 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006065 # - For global operations, use the `globalOperations` resource.
6066 # - For regional operations, use the `regionOperations` resource.
6067 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006068 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006069 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006070 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6071 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6072 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6073 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6074 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6075 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006076 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006077 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6078 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6079 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006080 },
6081 ],
6082 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006083 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
6084 &quot;httpErrorStatusCode&quot;: 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.
6085 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6086 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6087 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6088 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6089 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6090 &quot;progress&quot;: 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.
6091 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6092 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6093 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
6094 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
6095 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6096 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6097 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
6098 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6099 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6100 {
6101 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
6102 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6103 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6104 {
6105 &quot;key&quot;: &quot;A String&quot;, # [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).
6106 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6107 },
6108 ],
6109 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6110 },
6111 ],
6112 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006113 }</pre>
6114</div>
6115
6116<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006117 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006118 <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.
6119
6120Args:
6121 project: string, Project ID for this request. (required)
6122 zone: string, The name of the zone for this request. (required)
6123 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006124 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006125 The object takes the form of:
6126
6127{ # A set of Shielded VM options.
Bu Sun Kim65020912020-05-20 12:08:20 -07006128 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
6129 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
6130 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006131}
6132
6133 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.
6134
6135For 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.
6136
6137The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6138
6139Returns:
6140 An object of the form:
6141
6142 { # Represents an Operation resource.
6143 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006144 # Google Compute Engine has three Operation resources:
6145 #
6146 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6147 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006148 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6149 #
6150 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006151 # - For global operations, use the `globalOperations` resource.
6152 # - For regional operations, use the `regionOperations` resource.
6153 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006154 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006155 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006156 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6157 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6158 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6159 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6160 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6161 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006162 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006163 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6164 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6165 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006166 },
6167 ],
6168 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006169 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
6170 &quot;httpErrorStatusCode&quot;: 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.
6171 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6172 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6173 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6174 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6175 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6176 &quot;progress&quot;: 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.
6177 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6178 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6179 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
6180 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
6181 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6182 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6183 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
6184 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6185 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6186 {
6187 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
6188 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6189 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6190 {
6191 &quot;key&quot;: &quot;A String&quot;, # [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).
6192 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6193 },
6194 ],
6195 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6196 },
6197 ],
6198 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006199 }</pre>
6200</div>
6201
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006202</body></html>