blob: 7a86a132da628b4197ae53c12129dff21bfa625d [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">
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080093 <code><a href="#bulkInsert">bulkInsert(project, zone, body=None, requestId=None)</a></code></p>
94<p class="firstline">Creates multiple instances. Count specifies the number of instances to create.</p>
95<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070096 <code><a href="#close">close()</a></code></p>
97<p class="firstline">Close httplib2 connections.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400100<p class="firstline">Deletes the specified Instance resource. For more information, see Deleting an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Deletes an access config from an instance's network interface.</p>
104<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700105 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700106<p class="firstline">Detaches a disk from an instance.</p>
107<p class="toc_element">
108 <code><a href="#get">get(project, zone, instance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Returns the specified Instance resource. Gets a list of available instances by making a list() request.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</a></code></p>
112<p class="firstline">Returns effective firewalls applied to an interface of the instance.</p>
113<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115<p class="firstline">Returns the specified guest attributes entry.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118<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 -0700119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#getScreenshot">getScreenshot(project, zone, instance)</a></code></p>
121<p class="firstline">Returns the screenshot from the specified instance.</p>
122<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700125<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
127<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
128<p class="toc_element">
129 <code><a href="#getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</a></code></p>
130<p class="firstline">Returns the Shielded VM Identity of an instance</p>
131<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 <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 -0700133<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
134<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700135 <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 -0700136<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
137<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 <code><a href="#listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700139<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 or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400140<p class="toc_element">
141 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
142<p class="firstline">Retrieves the next page of results.</p>
143<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700144 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
145<p class="firstline">Retrieves the next page of results.</p>
146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
148<p class="firstline">Removes resource policies from an instance.</p>
149<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
151<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 -0700152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#resume">resume(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154<p class="firstline">Resumes an instance that was suspended using the instances().suspend method.</p>
155<p class="toc_element">
156 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
157<p class="firstline">Sets deletion protection on the instance.</p>
158<p class="toc_element">
159 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#setLabels">setLabels(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700166<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
167<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400169<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
173<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 <code><a href="#setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700175<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
176<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178<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 -0400179<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700180 <code><a href="#setName">setName(project, zone, instance, body=None, requestId=None)</a></code></p>
181<p class="firstline">Sets name of an instance.</p>
182<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 <code><a href="#setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700184<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 -0700185<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400187<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 -0800188<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(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 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 -0700191<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 <code><a href="#setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193<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 -0700194<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 <code><a href="#setTags">setTags(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196<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 -0700197<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
199<p class="firstline">Simulates a maintenance event on the instance.</p>
200<p class="toc_element">
201 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
202<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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
206<p class="toc_element">
207 <code><a href="#stop">stop(project, zone, instance, requestId=None)</a></code></p>
208<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>
209<p class="toc_element">
210 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
211<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 -0700212<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700214<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700215<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 <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 -0700217<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>
218<p class="toc_element">
219 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220<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>
221<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223<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>
224<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800226<p class="firstline">Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(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 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>
230<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700231 <code><a href="#updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232<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 -0700233<h3>Method Details</h3>
234<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700235 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700236 <pre>Adds an access config to an instance&#x27;s network interface.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700237
238Args:
239 project: string, Project ID for this request. (required)
240 zone: string, The name of the zone for this request. (required)
241 instance: string, The instance name for this request. (required)
242 networkInterface: string, The name of the network interface to add to this instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700244 The object takes the form of:
245
Bu Sun Kim65020912020-05-20 12:08:20 -0700246{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
247 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
248 &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.
249 &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.
250 &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 -0700251 #
252 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
253 #
254 # 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 -0700255 &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.
256 &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.
257 &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 -0700258}
259
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 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.
261
262For 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.
263
264The 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 -0700265
266Returns:
267 An object of the form:
268
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700269 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800270 #
271 # Google Compute Engine has three Operation resources:
272 #
273 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
274 #
275 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
276 #
277 # Operations can be global, regional or zonal.
278 # - For global operations, use the `globalOperations` resource.
279 # - For regional operations, use the `regionOperations` resource.
280 # - For zonal operations, use the `zonalOperations` resource.
281 #
282 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
283 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
284 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
285 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
286 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
287 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
288 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800290 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
291 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
292 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 },
294 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800295 },
296 &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`.
297 &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.
298 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
299 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
300 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
301 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800302 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800303 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
304 &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.
305 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
306 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
307 &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.
308 &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`.
309 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
310 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
311 &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.
312 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
313 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
314 {
315 &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.
316 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
317 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
318 {
319 &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).
320 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
321 },
322 ],
323 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
324 },
325 ],
326 &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.
327}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700328</div>
329
330<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700331 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
332 <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.
333
334Args:
335 project: string, Project ID for this request. (required)
336 zone: string, The name of the zone for this request. (required)
337 instance: string, The instance name for this request. (required)
338 body: object, The request body.
339 The object takes the form of:
340
341{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800342 &quot;resourcePolicies&quot;: [ # Resource policies to be added to this instance.
343 &quot;A String&quot;,
344 ],
345}
Dan O'Mearadd494642020-05-01 07:42:23 -0700346
347 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.
348
349For 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.
350
351The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
352
353Returns:
354 An object of the form:
355
356 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800357 #
358 # Google Compute Engine has three Operation resources:
359 #
360 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
361 #
362 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
363 #
364 # Operations can be global, regional or zonal.
365 # - For global operations, use the `globalOperations` resource.
366 # - For regional operations, use the `regionOperations` resource.
367 # - For zonal operations, use the `zonalOperations` resource.
368 #
369 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
370 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
371 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
372 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
373 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
374 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
375 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800377 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
378 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
379 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 },
381 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800382 },
383 &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`.
384 &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.
385 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
386 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
387 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
388 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800389 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800390 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
391 &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.
392 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
393 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
394 &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.
395 &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`.
396 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
397 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
398 &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.
399 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
400 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
401 {
402 &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.
403 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
404 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
405 {
406 &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).
407 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
408 },
409 ],
410 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
411 },
412 ],
413 &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.
414}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700415</div>
416
417<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700418 <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 -0700419 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700420
421Args:
422 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700423 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 -0700424
Dan O'Mearadd494642020-05-01 07:42:23 -0700425For 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 -0700426
Dan O'Mearadd494642020-05-01 07:42:23 -0700427You 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 -0700428
Bu Sun Kim65020912020-05-20 12:08:20 -0700429To 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 -0700430 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 -0700431 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`)
432 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
433
434You 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.
435
436Currently, only sorting by `name` or `creationTimestamp desc` is supported.
437 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800438 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700439
440Returns:
441 An object of the form:
442
443 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800444 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
445 &quot;items&quot;: { # An object that contains a list of instances scoped by zone.
446 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of instances.
447 &quot;instances&quot;: [ # [Output Only] A list of instances contained in this scope.
448 { # Represents an Instance resource.
449 #
450 # 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 ==)
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800451 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
452 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400453 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800454 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800455 &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.
456 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
457 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
458 },
459 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
460 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
461 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
462 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
463 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
464 { # An instance-attached disk resource.
465 &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).
466 &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.
467 &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.
468 #
469 # 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.
470 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
471 #
472 # 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.
473 #
474 # 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.
475 #
476 # 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.
477 #
478 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
479 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
480 &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.
481 &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.
482 &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 Kim65020912020-05-20 12:08:20 -0700483 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800484 # The key must meet the following requirements before you can provide it to Compute Engine:
485 # - The key is wrapped using a RSA public key certificate provided by Google.
486 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
487 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
488 &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.
489 },
490 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
491 &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.
492 { # Guest OS features.
493 &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.
494 },
495 ],
496 &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.
497 &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.
498 #
499 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
500 #
501 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
502 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
503 &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.
504 &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.
505 &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:
506 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700507 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700508 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800509 # 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:
510 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
511 # - projects/project/zones/zone/diskTypes/diskType
512 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
513 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700514 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800515 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
516 { # Guest OS features.
517 &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.
518 },
519 ],
520 &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.
521 &quot;a_key&quot;: &quot;A String&quot;,
522 },
523 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
524 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800525 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800526 &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.
527 &quot;A String&quot;,
528 ],
529 &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 -0700530 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800531 # 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:
532 # projects/debian-cloud/global/images/family/debian-9
533 #
534 #
535 # Alternatively, use a specific version of a public operating system image:
536 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
537 #
538 #
539 # To create a disk with a custom image that you created, specify the image name in the following format:
540 # global/images/my-custom-image
541 #
542 #
543 # 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:
544 # global/images/family/my-image-family
545 #
546 #
547 # If the source image is deleted later, this field will not be set.
548 &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.
549 #
550 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700551 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
552 &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.
553 &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.
554 &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 -0700555 #
556 # The key must meet the following requirements before you can provide it to Compute Engine:
557 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 # - 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 -0700559 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 &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 -0700561 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800562 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700563 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800564 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
565 # global/snapshots/my-backup
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700566 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800567 #
568 # If the source snapshot is deleted later, this field will not be set.
569 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
570 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
571 &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.
572 &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.
573 &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 -0700574 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800575 # The key must meet the following requirements before you can provide it to Compute Engine:
576 # - The key is wrapped using a RSA public key certificate provided by Google.
577 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
578 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
579 &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 -0700580 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800581 },
582 &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.
583 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
584 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
585 &quot;A String&quot;,
586 ],
587 &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.
588 &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
589 &quot;dbs&quot;: [ # The Key Database (db).
590 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700591 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
592 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700593 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800594 ],
595 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
596 {
597 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
598 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
599 },
600 ],
601 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
602 {
603 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
604 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
605 },
606 ],
607 &quot;pk&quot;: { # The Platform Key (PK).
608 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
609 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700610 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700611 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800612 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700613 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800614 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
615 #
616 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
617 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800619 ],
620 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
621 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
622 },
623 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
624 &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.
625 #
626 # To see the latest fingerprint, make get() request to the instance.
627 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
628 { # A specification of the type and number of accelerator cards attached to the instance.
629 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
630 &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.
631 },
632 ],
633 &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.
634 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
635 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
636 &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.
637 #
638 # To see the latest fingerprint, make get() request to the instance.
639 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
640 &quot;a_key&quot;: &quot;A String&quot;,
641 },
642 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
643 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
644 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
645 &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:
646 # zones/us-central1-f/machineTypes/n1-standard-1
647 #
648 #
649 # 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):
650 # zones/zone/machineTypes/custom-CPUS-MEMORY
651 #
652 #
653 # For example: zones/us-central1-f/machineTypes/custom-4-5120
654 #
655 # For a full list of restrictions, read the Specifications for custom machine types.
656 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
657 &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.
658 #
659 # To see the latest fingerprint, make a get() request to retrieve the resource.
660 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
661 {
662 &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.
663 &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).
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 },
665 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800666 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
667 },
668 &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;.
669 &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.
670 &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.
671 { # A network interface resource attached to an instance.
672 &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.
673 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
674 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
675 &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.
676 &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.
677 &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.
678 #
679 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
680 #
681 # 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.
682 &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.
683 &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.
684 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
685 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800687 &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.
688 { # An alias IP range attached to an instance&#x27;s network interface.
689 &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).
690 &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.
691 },
692 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700693 &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. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800694 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
695 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
696 &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.
697 &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.
698 #
699 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
700 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
701 # - projects/project/global/networks/network
702 # - global/networks/default
703 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800704 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800705 &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:
706 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
707 # - regions/region/subnetworks/subnetwork
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800709 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800710 &quot;networkPerformanceConfig&quot;: {
711 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
712 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700713 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800714 &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.
715 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
716 &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.
717 &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.
718 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &quot;A String&quot;,
720 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800721 },
722 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
723 &quot;A String&quot;,
724 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800725 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700726 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Sets the scheduling options for this instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800727 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800729 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800730 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -0700731 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after VM instance creation where the VM won&#x27;t be scheduled for maintenance.
732 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # For more information about maintenance intervals, see Setting maintenance intervals.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800733 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
734 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
735 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
736 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
737 &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.
738 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 &quot;A String&quot;,
740 ],
741 },
742 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800743 &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.
744 &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.
745 },
746 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
747 &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.
748 #
749 # 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.
750 { # A service account.
751 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
752 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 &quot;A String&quot;,
754 ],
755 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700756 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800757 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
758 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
759 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
760 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
761 },
762 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
763 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
764 },
765 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
766 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
767 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
768 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
769 },
770 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured. # Deprecating, please use shielded_instance_integrity_policy.
771 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
772 },
773 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700774 &quot;sourceMachineImageEncryptionKey&quot;: { # Source machine image encryption key when creating an instance from a machine image.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800775 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
776 &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.
777 &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.
778 &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.
779 #
780 # The key must meet the following requirements before you can provide it to Compute Engine:
781 # - The key is wrapped using a RSA public key certificate provided by Google.
782 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
783 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
784 &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.
785 },
786 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
787 &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. For more information about the status of the instance, see Instance life cycle.
788 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
789 &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.
790 &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.
791 #
792 # To see the latest fingerprint, make get() request to the instance.
793 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
794 &quot;A String&quot;,
795 ],
796 },
797 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 },
799 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800800 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
801 &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.
802 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
803 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
804 {
805 &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).
806 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
807 },
808 ],
809 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
810 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700811 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800812 },
813 &quot;kind&quot;: &quot;compute#instanceAggregatedList&quot;, # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
814 &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.
815 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
816 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
817 &quot;A String&quot;,
818 ],
819 &quot;warning&quot;: { # [Output Only] Informational warning message.
820 &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.
821 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
822 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
823 {
824 &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).
825 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
826 },
827 ],
828 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
829 },
830}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700831</div>
832
833<div class="method">
834 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
835 <pre>Retrieves the next page of results.
836
837Args:
838 previous_request: The request for the previous page. (required)
839 previous_response: The response from the request for the previous page. (required)
840
841Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700843 page. Returns None if there are no more items in the collection.
844 </pre>
845</div>
846
847<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700848 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400849 <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 -0700850
851Args:
852 project: string, Project ID for this request. (required)
853 zone: string, The name of the zone for this request. (required)
854 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700855 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700856 The object takes the form of:
857
858{ # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 &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).
860 &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.
861 &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.
862 #
863 # 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 -0700864 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700865 #
866 # 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.
867 #
868 # 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.
869 #
870 # 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.
871 #
872 # 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 -0700873 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
874 &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.
875 &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.
876 &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 -0700877 #
878 # The key must meet the following requirements before you can provide it to Compute Engine:
879 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 # - 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 -0700881 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700882 &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 -0700883 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700884 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
885 &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.
886 { # Guest OS features.
887 &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.
888 },
889 ],
890 &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.
891 &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 -0700892 #
893 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
894 #
895 # 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 -0700896 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
897 &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.
898 &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.
899 &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 -0700900 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
901 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700903 # 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:
904 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
905 # - projects/project/zones/zone/diskTypes/diskType
906 # - 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 -0700907 &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 -0700908 #
909 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
910 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &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 -0700912 },
913 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700914 &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.
915 &quot;a_key&quot;: &quot;A String&quot;,
916 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700917 &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 -0700918 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800919 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700920 &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.
921 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700922 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 &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 -0700924 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 # 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:
926 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700927 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700928 #
929 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700931 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700932 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700933 # To create a disk with a custom image that you created, specify the image name in the following format:
934 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700935 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700936 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700937 # 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:
938 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700939 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800940 #
941 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700942 &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 -0700943 #
944 # 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.
945 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
946 &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.
947 &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.
948 &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 -0700949 #
950 # The key must meet the following requirements before you can provide it to Compute Engine:
951 # - The key is wrapped using a RSA public key certificate provided by Google.
952 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
953 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700954 &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.
955 },
956 &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.
957 #
958 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
959 # global/snapshots/my-backup
960 #
961 #
962 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700963 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700964 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
965 &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.
966 &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.
967 &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.
968 #
969 # The key must meet the following requirements before you can provide it to Compute Engine:
970 # - The key is wrapped using a RSA public key certificate provided by Google.
971 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
972 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
973 &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 -0700974 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700975 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700976 &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.
977 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
978 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
979 &quot;A String&quot;,
980 ],
981 &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.
982 &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
983 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -0700984 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700985 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
986 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700987 },
988 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700989 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -0700990 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700991 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
992 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700993 },
994 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700995 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -0700996 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700997 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
998 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700999 },
1000 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001001 &quot;pk&quot;: { # The Platform Key (PK).
1002 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1003 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001004 },
1005 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001006 &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 -08001007 #
1008 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1009 #
1010 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001011 &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 -07001012}
1013
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001014 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 -07001015 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.
1016
1017For 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.
1018
1019The 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 -07001020
1021Returns:
1022 An object of the form:
1023
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001024 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001025 #
1026 # Google Compute Engine has three Operation resources:
1027 #
1028 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1029 #
1030 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1031 #
1032 # Operations can be global, regional or zonal.
1033 # - For global operations, use the `globalOperations` resource.
1034 # - For regional operations, use the `regionOperations` resource.
1035 # - For zonal operations, use the `zonalOperations` resource.
1036 #
1037 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1038 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1039 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1040 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1041 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1042 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1043 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001044 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001045 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1046 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1047 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001048 },
1049 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001050 },
1051 &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`.
1052 &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.
1053 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1054 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1055 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1056 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001057 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
1058 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1059 &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.
1060 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1061 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1062 &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.
1063 &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`.
1064 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1065 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1066 &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.
1067 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1068 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1069 {
1070 &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.
1071 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1072 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1073 {
1074 &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).
1075 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1076 },
1077 ],
1078 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1079 },
1080 ],
1081 &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.
1082}</pre>
1083</div>
1084
1085<div class="method">
1086 <code class="details" id="bulkInsert">bulkInsert(project, zone, body=None, requestId=None)</code>
1087 <pre>Creates multiple instances. Count specifies the number of instances to create.
1088
1089Args:
1090 project: string, Project ID for this request. (required)
1091 zone: string, The name of the zone for this request. (required)
1092 body: object, The request body.
1093 The object takes the form of:
1094
1095{
1096 &quot;count&quot;: &quot;A String&quot;, # The maximum number of instances to create.
1097 &quot;instanceProperties&quot;: { # The instance properties defining the VM instances to be created. Required if sourceInstanceTemplate is not provided.
1098 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
1099 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001100 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001101 },
1102 &quot;canIpForward&quot;: True or False, # Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.
1103 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options. # Specifies the Confidential Instance options.
1104 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
1105 },
1106 &quot;description&quot;: &quot;A String&quot;, # An optional text description for the instances that are created from these properties.
1107 &quot;disks&quot;: [ # An array of disks that are associated with the instances that are created from these properties.
1108 { # An instance-attached disk resource.
1109 &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).
1110 &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.
1111 &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.
1112 #
1113 # 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.
1114 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
1115 #
1116 # 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.
1117 #
1118 # 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.
1119 #
1120 # 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.
1121 #
1122 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1123 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1124 &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.
1125 &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.
1126 &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.
1127 #
1128 # The key must meet the following requirements before you can provide it to Compute Engine:
1129 # - The key is wrapped using a RSA public key certificate provided by Google.
1130 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1131 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1132 &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.
1133 },
1134 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1135 &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.
1136 { # Guest OS features.
1137 &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.
1138 },
1139 ],
1140 &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.
1141 &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.
1142 #
1143 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1144 #
1145 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1146 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1147 &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.
1148 &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.
1149 &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:
1150 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1151 #
1152 #
1153 # 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:
1154 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1155 # - projects/project/zones/zone/diskTypes/diskType
1156 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
1157 &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.
1158 #
1159 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1160 { # Guest OS features.
1161 &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.
1162 },
1163 ],
1164 &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.
1165 &quot;a_key&quot;: &quot;A String&quot;,
1166 },
1167 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
1168 &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.
1169 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
1170 &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.
1171 &quot;A String&quot;,
1172 ],
1173 &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.
1174 #
1175 # 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:
1176 # projects/debian-cloud/global/images/family/debian-9
1177 #
1178 #
1179 # Alternatively, use a specific version of a public operating system image:
1180 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1181 #
1182 #
1183 # To create a disk with a custom image that you created, specify the image name in the following format:
1184 # global/images/my-custom-image
1185 #
1186 #
1187 # 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:
1188 # global/images/family/my-image-family
1189 #
1190 #
1191 # If the source image is deleted later, this field will not be set.
1192 &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.
1193 #
1194 # 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.
1195 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1196 &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.
1197 &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.
1198 &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.
1199 #
1200 # The key must meet the following requirements before you can provide it to Compute Engine:
1201 # - The key is wrapped using a RSA public key certificate provided by Google.
1202 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1203 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1204 &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.
1205 },
1206 &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.
1207 #
1208 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1209 # global/snapshots/my-backup
1210 #
1211 #
1212 # If the source snapshot is deleted later, this field will not be set.
1213 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
1214 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1215 &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.
1216 &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.
1217 &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.
1218 #
1219 # The key must meet the following requirements before you can provide it to Compute Engine:
1220 # - The key is wrapped using a RSA public key certificate provided by Google.
1221 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1222 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1223 &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.
1224 },
1225 },
1226 &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.
1227 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1228 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1229 &quot;A String&quot;,
1230 ],
1231 &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.
1232 &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
1233 &quot;dbs&quot;: [ # The Key Database (db).
1234 {
1235 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1236 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1237 },
1238 ],
1239 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1240 {
1241 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1242 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1243 },
1244 ],
1245 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1246 {
1247 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1248 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1249 },
1250 ],
1251 &quot;pk&quot;: { # The Platform Key (PK).
1252 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1253 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1254 },
1255 },
1256 &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.
1257 #
1258 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1259 #
1260 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
1261 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
1262 },
1263 ],
1264 &quot;displayDevice&quot;: { # A set of Display Device options # Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer
1265 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1266 },
1267 &quot;guestAccelerators&quot;: [ # A list of guest accelerator cards&#x27; type and count to use for instances created from these properties.
1268 { # A specification of the type and number of accelerator cards attached to the instance.
1269 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1270 &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.
1271 },
1272 ],
1273 &quot;labels&quot;: { # Labels to apply to instances that are created from these properties.
1274 &quot;a_key&quot;: &quot;A String&quot;,
1275 },
1276 &quot;machineType&quot;: &quot;A String&quot;, # The machine type to use for instances that are created from these properties.
1277 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
1278 &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.
1279 #
1280 # To see the latest fingerprint, make a get() request to retrieve the resource.
1281 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1282 {
1283 &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.
1284 &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).
1285 },
1286 ],
1287 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1288 },
1289 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;. For more information, read Specifying a Minimum CPU Platform.
1290 &quot;networkInterfaces&quot;: [ # An array of network access configurations for this interface.
1291 { # A network interface resource attached to an instance.
1292 &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.
1293 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1294 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1295 &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.
1296 &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.
1297 &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.
1298 #
1299 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1300 #
1301 # 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.
1302 &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.
1303 &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.
1304 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1305 },
1306 ],
1307 &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.
1308 { # An alias IP range attached to an instance&#x27;s network interface.
1309 &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).
1310 &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.
1311 },
1312 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001313 &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. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001314 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1315 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1316 &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.
1317 &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.
1318 #
1319 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1320 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1321 # - projects/project/global/networks/network
1322 # - global/networks/default
1323 &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.
1324 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
1325 &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:
1326 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1327 # - regions/region/subnetworks/subnetwork
1328 },
1329 ],
1330 &quot;networkPerformanceConfig&quot;: {
1331 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
1332 },
1333 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
1334 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default.
1335 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that instances can consume from.
1336 &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.
1337 &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.
1338 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1339 &quot;A String&quot;,
1340 ],
1341 },
1342 &quot;resourcePolicies&quot;: [ # Resource policies (names, not ULRs) applied to instances created from these properties.
1343 &quot;A String&quot;,
1344 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001345 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Specifies the scheduling options for the instances that are created from these properties.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001346 &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.
1347 #
1348 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1349 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -07001350 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after VM instance creation where the VM won&#x27;t be scheduled for maintenance.
1351 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # For more information about maintenance intervals, see Setting maintenance intervals.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001352 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1353 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1354 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1355 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1356 &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.
1357 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1358 &quot;A String&quot;,
1359 ],
1360 },
1361 ],
1362 &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.
1363 &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.
1364 },
1365 &quot;serviceAccounts&quot;: [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.
1366 { # A service account.
1367 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1368 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1369 &quot;A String&quot;,
1370 ],
1371 },
1372 ],
1373 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1374 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1375 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1376 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1377 },
1378 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Specifies the Shielded VM options for the instances that are created from these properties.
1379 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
1380 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
1381 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
1382 },
1383 &quot;tags&quot;: { # A set of instance tags. # A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
1384 &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.
1385 #
1386 # To see the latest fingerprint, make get() request to the instance.
1387 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1388 &quot;A String&quot;,
1389 ],
1390 },
1391 },
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001392 &quot;locationPolicy&quot;: { # Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region). # Policy for chosing target zone.
1393 &quot;locations&quot;: { # Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001394 &quot;a_key&quot;: {
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001395 &quot;preference&quot;: &quot;A String&quot;, # Preference for a given locaction: ALLOW or DENY.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001396 },
1397 },
1398 },
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001399 &quot;minCount&quot;: &quot;A String&quot;, # The minimum number of instances to create. If no min_count is specified then count is used as the default value. If min_count instances cannot be created, then no instances will be created and instances already created will be deleted.
1400 &quot;namePattern&quot;: &quot;A String&quot;, # The string pattern used for the names of the VMs. Either name_pattern or per_instance_properties must be set. The pattern should contain one continuous sequence of placeholder hash characters (#) with each character corresponding to one digit of the generated instance name. Example: name_pattern of inst-#### will generate instance names such as inst-0001, inst-0002, ... . If there already exist instance(s) whose names match the name pattern in the same project and zone, then the generated instance numbers will start after the biggest existing number. For example, if there exists an instance with name inst-0050, then instance names generated using the pattern inst-#### will be inst-0051, inst-0052, etc. The name pattern placeholder #...# can contain up to 18 characters.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001401 &quot;perInstanceProperties&quot;: { # Per-instance properties to be set on individual instances. Keys of this map specify requested instance names. Can be empty if name_pattern is used.
1402 &quot;a_key&quot;: { # Per-instance properties to be set on individual instances. To be extended in the future.
1403 &quot;name&quot;: &quot;A String&quot;, # This field is only temporary. It will be removed. Do not use it.
1404 },
1405 },
1406 &quot;sourceInstanceTemplate&quot;: &quot;A String&quot;, # Specifies the instance template from which to create instances. You may combine sourceInstanceTemplate with instanceProperties to override specific values from an existing instance template. Bulk API follows the semantics of JSON Merge Patch described by RFC 7396.
1407 #
1408 # It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
1409 # - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
1410 # - projects/project/global/instanceTemplates/instanceTemplate
1411 # - global/instanceTemplates/instanceTemplate
1412 #
1413 # This field is optional.
1414}
1415
1416 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.
1417
1418For 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.
1419
1420The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1421
1422Returns:
1423 An object of the form:
1424
1425 { # Represents an Operation resource.
1426 #
1427 # Google Compute Engine has three Operation resources:
1428 #
1429 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1430 #
1431 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1432 #
1433 # Operations can be global, regional or zonal.
1434 # - For global operations, use the `globalOperations` resource.
1435 # - For regional operations, use the `regionOperations` resource.
1436 # - For zonal operations, use the `zonalOperations` resource.
1437 #
1438 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1439 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1440 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1441 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1442 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1443 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1444 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1445 {
1446 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1447 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1448 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1449 },
1450 ],
1451 },
1452 &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`.
1453 &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.
1454 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1455 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1456 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1457 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1458 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001459 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1460 &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.
1461 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1462 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1463 &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.
1464 &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`.
1465 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1466 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1467 &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.
1468 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1469 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1470 {
1471 &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.
1472 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1473 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1474 {
1475 &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).
1476 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1477 },
1478 ],
1479 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1480 },
1481 ],
1482 &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.
1483}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001484</div>
1485
1486<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001487 <code class="details" id="close">close()</code>
1488 <pre>Close httplib2 connections.</pre>
1489</div>
1490
1491<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001493 <pre>Deletes the specified Instance resource. For more information, see Deleting an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001494
1495Args:
1496 project: string, Project ID for this request. (required)
1497 zone: string, The name of the zone for this request. (required)
1498 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001499 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.
1500
1501For 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.
1502
1503The 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 -07001504
1505Returns:
1506 An object of the form:
1507
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001508 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001509 #
1510 # Google Compute Engine has three Operation resources:
1511 #
1512 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1513 #
1514 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1515 #
1516 # Operations can be global, regional or zonal.
1517 # - For global operations, use the `globalOperations` resource.
1518 # - For regional operations, use the `regionOperations` resource.
1519 # - For zonal operations, use the `zonalOperations` resource.
1520 #
1521 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1522 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1523 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1524 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1525 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1526 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1527 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001528 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001529 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1530 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1531 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001532 },
1533 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001534 },
1535 &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`.
1536 &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.
1537 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1538 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1539 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1540 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001541 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001542 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1543 &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.
1544 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1545 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1546 &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.
1547 &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`.
1548 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1549 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1550 &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.
1551 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1552 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1553 {
1554 &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.
1555 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1556 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1557 {
1558 &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).
1559 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1560 },
1561 ],
1562 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1563 },
1564 ],
1565 &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.
1566}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001567</div>
1568
1569<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001570 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001571 <pre>Deletes an access config from an instance&#x27;s network interface.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001572
1573Args:
1574 project: string, Project ID for this request. (required)
1575 zone: string, The name of the zone for this request. (required)
1576 instance: string, The instance name for this request. (required)
1577 accessConfig: string, The name of the access config to delete. (required)
1578 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001579 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.
1580
1581For 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.
1582
1583The 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 -07001584
1585Returns:
1586 An object of the form:
1587
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001588 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001589 #
1590 # Google Compute Engine has three Operation resources:
1591 #
1592 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1593 #
1594 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1595 #
1596 # Operations can be global, regional or zonal.
1597 # - For global operations, use the `globalOperations` resource.
1598 # - For regional operations, use the `regionOperations` resource.
1599 # - For zonal operations, use the `zonalOperations` resource.
1600 #
1601 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1602 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1603 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1604 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1605 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1606 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1607 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001608 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001609 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1610 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1611 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001612 },
1613 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001614 },
1615 &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`.
1616 &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.
1617 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1618 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1619 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1620 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001621 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001622 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1623 &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.
1624 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1625 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1626 &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.
1627 &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`.
1628 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1629 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1630 &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.
1631 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1632 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1633 {
1634 &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.
1635 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1636 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1637 {
1638 &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).
1639 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1640 },
1641 ],
1642 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1643 },
1644 ],
1645 &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.
1646}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001647</div>
1648
1649<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001650 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001651 <pre>Detaches a disk from an instance.
1652
1653Args:
1654 project: string, Project ID for this request. (required)
1655 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001656 instance: string, Instance name for this request. (required)
1657 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)
1658 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.
1659
1660For 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.
1661
1662The 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 -07001663
1664Returns:
1665 An object of the form:
1666
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001667 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001668 #
1669 # Google Compute Engine has three Operation resources:
1670 #
1671 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1672 #
1673 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1674 #
1675 # Operations can be global, regional or zonal.
1676 # - For global operations, use the `globalOperations` resource.
1677 # - For regional operations, use the `regionOperations` resource.
1678 # - For zonal operations, use the `zonalOperations` resource.
1679 #
1680 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1681 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1682 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1683 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1684 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1685 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1686 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001687 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001688 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1689 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1690 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001691 },
1692 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001693 },
1694 &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`.
1695 &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.
1696 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1697 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1698 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1699 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001700 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001701 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1702 &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.
1703 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1704 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1705 &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.
1706 &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`.
1707 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1708 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1709 &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.
1710 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1711 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1712 {
1713 &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.
1714 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1715 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1716 {
1717 &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).
1718 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1719 },
1720 ],
1721 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1722 },
1723 ],
1724 &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.
1725}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001726</div>
1727
1728<div class="method">
1729 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001730 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001731
1732Args:
1733 project: string, Project ID for this request. (required)
1734 zone: string, The name of the zone for this request. (required)
1735 instance: string, Name of the instance resource to return. (required)
1736
1737Returns:
1738 An object of the form:
1739
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001740 { # Represents an Instance resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001741 #
1742 # 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 ==)
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001743 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
1744 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04001745 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001746 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001747 &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.
1748 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1749 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
1750 },
1751 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1752 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1753 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1754 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1755 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1756 { # An instance-attached disk resource.
1757 &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).
1758 &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.
1759 &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.
1760 #
1761 # 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.
1762 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
1763 #
1764 # 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.
1765 #
1766 # 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.
1767 #
1768 # 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.
1769 #
1770 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1771 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1772 &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.
1773 &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.
1774 &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 Kim65020912020-05-20 12:08:20 -07001775 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001776 # The key must meet the following requirements before you can provide it to Compute Engine:
1777 # - The key is wrapped using a RSA public key certificate provided by Google.
1778 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1779 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1780 &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.
1781 },
1782 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1783 &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.
1784 { # Guest OS features.
1785 &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.
1786 },
1787 ],
1788 &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.
1789 &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.
1790 #
1791 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1792 #
1793 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1794 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1795 &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.
1796 &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.
1797 &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:
1798 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001799 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001800 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001801 # 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:
1802 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1803 # - projects/project/zones/zone/diskTypes/diskType
1804 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
1805 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001806 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001807 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1808 { # Guest OS features.
1809 &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.
1810 },
1811 ],
1812 &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.
1813 &quot;a_key&quot;: &quot;A String&quot;,
1814 },
1815 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
1816 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001817 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001818 &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.
1819 &quot;A String&quot;,
1820 ],
1821 &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 -07001822 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001823 # 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:
1824 # projects/debian-cloud/global/images/family/debian-9
1825 #
1826 #
1827 # Alternatively, use a specific version of a public operating system image:
1828 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1829 #
1830 #
1831 # To create a disk with a custom image that you created, specify the image name in the following format:
1832 # global/images/my-custom-image
1833 #
1834 #
1835 # 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:
1836 # global/images/family/my-image-family
1837 #
1838 #
1839 # If the source image is deleted later, this field will not be set.
1840 &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.
1841 #
1842 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001843 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1844 &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.
1845 &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.
1846 &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 -07001847 #
1848 # The key must meet the following requirements before you can provide it to Compute Engine:
1849 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001850 # - 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 -07001851 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07001852 &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 -07001853 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001854 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001855 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001856 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1857 # global/snapshots/my-backup
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001858 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001859 #
1860 # If the source snapshot is deleted later, this field will not be set.
1861 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
1862 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1863 &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.
1864 &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.
1865 &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 -07001866 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001867 # The key must meet the following requirements before you can provide it to Compute Engine:
1868 # - The key is wrapped using a RSA public key certificate provided by Google.
1869 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1870 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1871 &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 -07001872 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001873 },
1874 &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.
1875 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1876 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1877 &quot;A String&quot;,
1878 ],
1879 &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.
1880 &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
1881 &quot;dbs&quot;: [ # The Key Database (db).
1882 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001883 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1884 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001885 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001886 ],
1887 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1888 {
1889 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1890 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1891 },
1892 ],
1893 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1894 {
1895 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1896 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1897 },
1898 ],
1899 &quot;pk&quot;: { # The Platform Key (PK).
1900 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1901 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001902 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001903 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001904 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001905 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001906 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1907 #
1908 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
1909 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim65020912020-05-20 12:08:20 -07001910 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001911 ],
1912 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1913 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1914 },
1915 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
1916 &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.
1917 #
1918 # To see the latest fingerprint, make get() request to the instance.
1919 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1920 { # A specification of the type and number of accelerator cards attached to the instance.
1921 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1922 &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.
1923 },
1924 ],
1925 &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.
1926 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1927 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1928 &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.
1929 #
1930 # To see the latest fingerprint, make get() request to the instance.
1931 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1932 &quot;a_key&quot;: &quot;A String&quot;,
1933 },
1934 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
1935 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
1936 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
1937 &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:
1938 # zones/us-central1-f/machineTypes/n1-standard-1
1939 #
1940 #
1941 # 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):
1942 # zones/zone/machineTypes/custom-CPUS-MEMORY
1943 #
1944 #
1945 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1946 #
1947 # For a full list of restrictions, read the Specifications for custom machine types.
1948 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1949 &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.
1950 #
1951 # To see the latest fingerprint, make a get() request to retrieve the resource.
1952 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1953 {
1954 &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.
1955 &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).
Bu Sun Kim65020912020-05-20 12:08:20 -07001956 },
1957 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001958 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1959 },
1960 &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;.
1961 &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.
1962 &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.
1963 { # A network interface resource attached to an instance.
1964 &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.
1965 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1966 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1967 &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.
1968 &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.
1969 &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.
1970 #
1971 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1972 #
1973 # 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.
1974 &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.
1975 &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.
1976 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1977 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001978 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001979 &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.
1980 { # An alias IP range attached to an instance&#x27;s network interface.
1981 &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).
1982 &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.
1983 },
1984 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001985 &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. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001986 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1987 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1988 &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.
1989 &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.
1990 #
1991 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1992 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1993 # - projects/project/global/networks/network
1994 # - global/networks/default
1995 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001996 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001997 &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:
1998 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1999 # - regions/region/subnetworks/subnetwork
Bu Sun Kim65020912020-05-20 12:08:20 -07002000 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002001 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002002 &quot;networkPerformanceConfig&quot;: {
2003 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
2004 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002005 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002006 &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.
2007 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2008 &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.
2009 &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.
2010 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002011 &quot;A String&quot;,
2012 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002013 },
2014 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2015 &quot;A String&quot;,
2016 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002017 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002018 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Sets the scheduling options for this instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002019 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002020 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002021 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002022 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -07002023 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after VM instance creation where the VM won&#x27;t be scheduled for maintenance.
2024 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # For more information about maintenance intervals, see Setting maintenance intervals.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002025 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
2026 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2027 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2028 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2029 &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.
2030 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002031 &quot;A String&quot;,
2032 ],
2033 },
2034 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002035 &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.
2036 &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.
2037 },
2038 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2039 &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.
2040 #
2041 # 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.
2042 { # A service account.
2043 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2044 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
Bu Sun Kim65020912020-05-20 12:08:20 -07002045 &quot;A String&quot;,
2046 ],
2047 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002048 ],
2049 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2050 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2051 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2052 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2053 },
2054 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2055 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2056 },
2057 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
2058 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
2059 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
2060 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
2061 },
2062 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured. # Deprecating, please use shielded_instance_integrity_policy.
2063 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2064 },
2065 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002066 &quot;sourceMachineImageEncryptionKey&quot;: { # Source machine image encryption key when creating an instance from a machine image.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002067 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2068 &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.
2069 &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.
2070 &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.
2071 #
2072 # The key must meet the following requirements before you can provide it to Compute Engine:
2073 # - The key is wrapped using a RSA public key certificate provided by Google.
2074 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2075 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2076 &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.
2077 },
2078 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
2079 &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. For more information about the status of the instance, see Instance life cycle.
2080 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2081 &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.
2082 &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.
2083 #
2084 # To see the latest fingerprint, make get() request to the instance.
2085 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2086 &quot;A String&quot;,
2087 ],
2088 },
2089 &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.
2090}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002091</div>
2092
2093<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002094 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</code>
2095 <pre>Returns effective firewalls applied to an interface of the instance.
2096
2097Args:
2098 project: string, Project ID for this request. (required)
2099 zone: string, The name of the zone for this request. (required)
2100 instance: string, Name of the instance scoping this request. (required)
2101 networkInterface: string, The name of the network interface to get the effective firewalls. (required)
2102
2103Returns:
2104 An object of the form:
2105
2106 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002107 &quot;firewallPolicys&quot;: [ # Effective firewalls from firewall policies.
2108 {
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002109 &quot;displayName&quot;: &quot;A String&quot;, # [Output Only] Deprecated, please use short name instead. The display name of the firewall policy.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002110 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the firewall policy.
2111 &quot;rules&quot;: [ # The rules that apply to the network.
2112 { # 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).
2113 &quot;action&quot;: &quot;A String&quot;, # The Action to perform 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002114 &quot;description&quot;: &quot;A String&quot;, # An optional description for this resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002115 &quot;direction&quot;: &quot;A String&quot;, # The direction in which this rule applies.
2116 &quot;disabled&quot;: True or False, # Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
2117 &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.
2118 &quot;kind&quot;: &quot;compute#firewallPolicyRule&quot;, # [Output only] Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002119 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002120 &quot;destIpRanges&quot;: [ # CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 256.
2121 &quot;A String&quot;,
2122 ],
2123 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2124 {
2125 &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.
2126 &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.
2127 #
2128 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2129 &quot;A String&quot;,
2130 ],
2131 },
2132 ],
2133 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 256.
2134 &quot;A String&quot;,
2135 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002136 },
2137 &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.
2138 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall policy rule.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002139 &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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002140 &quot;A String&quot;,
2141 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002142 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
2143 &quot;A String&quot;,
2144 ],
2145 },
2146 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002147 &quot;shortName&quot;: &quot;A String&quot;, # [Output Only] The short name of the firewall policy.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002148 &quot;type&quot;: &quot;A String&quot;, # [Output Only] The type of the firewall policy.
2149 },
2150 ],
2151 &quot;firewalls&quot;: [ # Effective firewalls on the instance.
2152 { # Represents a Firewall Rule resource.
2153 #
2154 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
2155 &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.
2156 {
2157 &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.
2158 &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.
2159 #
2160 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2161 &quot;A String&quot;,
2162 ],
2163 },
2164 ],
2165 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2166 &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.
2167 {
2168 &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.
2169 &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.
2170 #
2171 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2172 &quot;A String&quot;,
2173 ],
2174 },
2175 ],
2176 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
2177 &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.
2178 &quot;A String&quot;,
2179 ],
2180 &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.
2181 &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.
2182 &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.
2183 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2184 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
2185 &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.
2186 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
2187 &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.
2188 },
2189 &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.
2190 &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:
2191 # global/networks/default
2192 # 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:
2193 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
2194 # - projects/myproject/global/networks/my-network
2195 # - global/networks/default
2196 &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`.
2197 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2198 &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.
2199 &quot;A String&quot;,
2200 ],
2201 &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.
2202 &quot;A String&quot;,
2203 ],
2204 &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.
2205 &quot;A String&quot;,
2206 ],
2207 &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.
2208 &quot;A String&quot;,
2209 ],
2210 &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.
2211 &quot;A String&quot;,
2212 ],
2213 },
2214 ],
2215 &quot;organizationFirewalls&quot;: [ # Effective firewalls from organization policies.
2216 { # A pruned SecurityPolicy containing ID and any applicable firewall rules.
2217 &quot;id&quot;: &quot;A String&quot;, # The unique identifier for the security policy. This identifier is defined by the server.
2218 &quot;rules&quot;: [ # The rules that apply to the network.
2219 { # 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).
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04002220 &quot;action&quot;: &quot;A String&quot;, # The Action to perform 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002221 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2222 &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.
2223 &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.
2224 #
2225 # This field may only be specified when the versioned_expr is set to FIREWALL.
2226 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
2227 &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.
2228 &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.
2229 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2230 #
2231 # This field may only be specified when versioned_expr is set to FIREWALL.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002232 &quot;A String&quot;,
2233 ],
2234 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002235 #
2236 # This field may only be specified when versioned_expr is set to FIREWALL.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002237 {
2238 &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.
2239 &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.
2240 #
2241 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002242 #
2243 # This field may only be specified when versioned_expr is set to FIREWALL.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002244 &quot;A String&quot;,
2245 ],
2246 },
2247 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002248 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08002249 &quot;A String&quot;,
2250 ],
2251 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002252 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002253 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002254 # Example (Comparison):
Bu Sun Kim65020912020-05-20 12:08:20 -07002255 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002256 # 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;
2257 #
2258 # Example (Equality):
2259 #
2260 # 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;
2261 #
2262 # Example (Logic):
2263 #
2264 # 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;
2265 #
2266 # Example (Data Manipulation):
2267 #
2268 # 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;
2269 #
2270 # 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.
2271 &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.
2272 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2273 &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.
2274 &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.
2275 },
2276 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002277 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002278 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002279 &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 priority.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002280 &quot;ruleNumber&quot;: &quot;A String&quot;, # Identifier for the rule. This is only unique within the given security policy. This can only be set during rule creation, if rule number is not specified it will be generated by the server.
2281 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
2282 &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.
2283 #
2284 # This field may only be specified when versioned_expr is set to FIREWALL.
2285 &quot;A String&quot;,
2286 ],
2287 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
2288 &quot;A String&quot;,
2289 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002290 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002291 ],
2292 },
2293 ],
2294}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07002295</div>
2296
2297<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002298 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002299 <pre>Returns the specified guest attributes entry.
2300
2301Args:
2302 project: string, Project ID for this request. (required)
2303 zone: string, The name of the zone for this request. (required)
2304 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002305 queryPath: string, Specifies the guest attributes path to be queried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002306 variableKey: string, Specifies the key for the guest attributes entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002307
2308Returns:
2309 An object of the form:
2310
2311 { # A guest attributes entry.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002312 &quot;kind&quot;: &quot;compute#guestAttributes&quot;, # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
2313 &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;)
2314 &quot;queryValue&quot;: { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
2315 &quot;items&quot;: [
2316 { # A guest attributes namespace/key/value entry.
2317 &quot;key&quot;: &quot;A String&quot;, # Key for the guest attribute entry.
2318 &quot;namespace&quot;: &quot;A String&quot;, # Namespace for the guest attribute entry.
2319 &quot;value&quot;: &quot;A String&quot;, # Value for the guest attribute entry.
2320 },
2321 ],
2322 },
2323 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2324 &quot;variableKey&quot;: &quot;A String&quot;, # The key to search for.
2325 &quot;variableValue&quot;: &quot;A String&quot;, # [Output Only] The value found for the requested key.
2326}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002327</div>
2328
2329<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002330 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002331 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
2332
2333Args:
2334 project: string, Project ID for this request. (required)
2335 zone: string, The name of the zone for this request. (required)
2336 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002337 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002338
2339Returns:
2340 An object of the form:
2341
Dan O'Mearadd494642020-05-01 07:42:23 -07002342 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002343 #
2344 #
2345 #
2346 # 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.
2347 #
2348 # 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).
2349 #
2350 # **JSON example:**
2351 #
2352 # { &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 }
2353 #
2354 # **YAML example:**
2355 #
2356 # 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
2357 #
2358 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
2359 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2360 { # 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.
2361 #
2362 # 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.
2363 #
2364 # Example Policy with multiple AuditConfigs:
2365 #
2366 # { &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; ] } ] } ] }
2367 #
2368 # 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.
2369 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2370 { # Provides the configuration for logging a type of permissions. Example:
Bu Sun Kim65020912020-05-20 12:08:20 -07002371 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002372 # { &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 Kim65020912020-05-20 12:08:20 -07002373 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002374 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2375 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2376 &quot;A String&quot;,
2377 ],
2378 &quot;ignoreChildExemptions&quot;: True or False,
2379 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -07002380 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002381 ],
2382 &quot;exemptedMembers&quot;: [
2383 &quot;A String&quot;,
2384 ],
2385 &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.
2386 },
2387 ],
2388 &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.
2389 { # Associates `members` with a `role`.
2390 &quot;bindingId&quot;: &quot;A String&quot;,
2391 &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.
2392 #
2393 # If the condition evaluates to `true`, then this binding applies to the current request.
2394 #
2395 # 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.
2396 #
2397 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2398 #
2399 # Example (Comparison):
2400 #
2401 # 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;
2402 #
2403 # Example (Equality):
2404 #
2405 # 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;
2406 #
2407 # Example (Logic):
2408 #
2409 # 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;
2410 #
2411 # Example (Data Manipulation):
2412 #
2413 # 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;
2414 #
2415 # 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.
2416 &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.
2417 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2418 &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.
2419 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002420 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002421 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2422 #
2423 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2424 #
2425 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2426 #
2427 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2428 #
2429 #
2430 #
2431 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2432 #
2433 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2434 #
2435 # * `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.
2436 #
2437 # * `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.
2438 #
2439 # * `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.
2440 #
2441 #
2442 #
2443 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2444 &quot;A String&quot;,
2445 ],
2446 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2447 },
2448 ],
2449 &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.
2450 #
2451 # **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.
2452 &quot;iamOwned&quot;: True or False,
2453 &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.
2454 { # A rule to be applied in a Policy.
2455 &quot;action&quot;: &quot;A String&quot;, # Required
2456 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2457 { # A condition to be met.
2458 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
2459 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
2460 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
2461 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2462 &quot;values&quot;: [ # The objects of the condition.
2463 &quot;A String&quot;,
2464 ],
2465 },
2466 ],
2467 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
2468 &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.
2469 &quot;A String&quot;,
2470 ],
2471 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2472 { # Specifies what kind of log the caller must write
2473 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
2474 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2475 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
2476 },
2477 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim65020912020-05-20 12:08:20 -07002478 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002479 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
2480 #
2481 # 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.
2482 #
2483 # Field names correspond to IAM request parameters and field values are their respective values.
2484 #
2485 # 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.
2486 #
2487 # 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]}
2488 &quot;customFields&quot;: [ # Custom fields.
2489 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2490 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2491 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002492 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002493 ],
2494 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2495 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
Bu Sun Kim65020912020-05-20 12:08:20 -07002496 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002497 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2498 &quot;logMode&quot;: &quot;A String&quot;,
2499 },
2500 },
2501 ],
2502 &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.
2503 &quot;A String&quot;,
2504 ],
2505 &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.
2506 &quot;A String&quot;,
2507 ],
2508 },
2509 ],
2510 &quot;version&quot;: 42, # Specifies the format of the policy.
2511 #
2512 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2513 #
2514 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2515 #
2516 # * 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
2517 #
2518 # **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.
2519 #
2520 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2521 #
2522 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2523}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002524</div>
2525
2526<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002527 <code class="details" id="getScreenshot">getScreenshot(project, zone, instance)</code>
2528 <pre>Returns the screenshot from the specified instance.
2529
2530Args:
2531 project: string, Project ID for this request. (required)
2532 zone: string, The name of the zone for this request. (required)
2533 instance: string, Name of the instance scoping this request. (required)
2534
2535Returns:
2536 An object of the form:
2537
Bu Sun Kim65020912020-05-20 12:08:20 -07002538 { # An instance&#x27;s screenshot.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002539 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The Base64-encoded screenshot data.
2540 &quot;kind&quot;: &quot;compute#screenshot&quot;, # [Output Only] Type of the resource. Always compute#screenshot for the screenshots.
2541}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07002542</div>
2543
2544<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002545 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002546 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002547
2548Args:
2549 project: string, Project ID for this request. (required)
2550 zone: string, The name of the zone for this request. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002551 instance: string, Name of the instance for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002552 port: integer, Specifies which COM or serial port to retrieve data from.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002553 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`.
2554
2555If 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.
2556
2557You 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 -07002558
2559Returns:
2560 An object of the form:
2561
Bu Sun Kim65020912020-05-20 12:08:20 -07002562 { # An instance&#x27;s serial console output.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002563 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The contents of the console output.
2564 &quot;kind&quot;: &quot;compute#serialPortOutput&quot;, # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
2565 &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.
2566 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2567 &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.
2568}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002569</div>
2570
2571<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002572 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
2573 <pre>Returns the Shielded Instance Identity of an instance
2574
2575Args:
2576 project: string, Project ID for this request. (required)
2577 zone: string, The name of the zone for this request. (required)
2578 instance: string, Name or id of the instance scoping this request. (required)
2579
2580Returns:
2581 An object of the form:
2582
2583 { # A shielded Instance identity entry.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002584 &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.
2585 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2586 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
2587 },
2588 &quot;kind&quot;: &quot;compute#shieldedInstanceIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
2589 &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.
2590 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2591 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
2592 },
2593}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002594</div>
2595
2596<div class="method">
2597 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
2598 <pre>Returns the Shielded VM Identity of an instance
2599
2600Args:
2601 project: string, Project ID for this request. (required)
2602 zone: string, The name of the zone for this request. (required)
2603 instance: string, Name of the instance scoping this request. (required)
2604
2605Returns:
2606 An object of the form:
2607
2608 { # A shielded VM identity entry.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002609 &quot;encryptionKey&quot;: { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM&#x27;s vTPM.
2610 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2611 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
2612 },
2613 &quot;kind&quot;: &quot;compute#shieldedVmIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
2614 &quot;signingKey&quot;: { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM&#x27;s vTPM.
2615 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2616 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
2617 },
2618}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002619</div>
2620
2621<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002622 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None, sourceMachineImage=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002623 <pre>Creates an instance resource in the specified project using the data included in the request.
2624
2625Args:
2626 project: string, Project ID for this request. (required)
2627 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002628 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002629 The object takes the form of:
2630
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002631{ # Represents an Instance resource.
2632 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002633 # 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 ==)
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002634 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
2635 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04002636 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002637 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002638 &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 -07002639 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
2640 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
2641 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002642 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2643 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2644 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2645 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2646 &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 -07002647 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002648 &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).
2649 &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.
2650 &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.
2651 #
2652 # 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 -07002653 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002654 #
2655 # 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.
2656 #
2657 # 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.
2658 #
2659 # 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.
2660 #
2661 # 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 -07002662 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2663 &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.
2664 &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.
2665 &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 -07002666 #
2667 # The key must meet the following requirements before you can provide it to Compute Engine:
2668 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002669 # - 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 -07002670 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002671 &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 -07002672 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002673 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2674 &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.
2675 { # Guest OS features.
2676 &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.
2677 },
2678 ],
2679 &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.
2680 &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 -07002681 #
2682 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2683 #
2684 # 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 -07002685 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2686 &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.
2687 &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.
2688 &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 -07002689 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2690 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002691 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002692 # 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:
2693 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2694 # - projects/project/zones/zone/diskTypes/diskType
2695 # - 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 -07002696 &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 -07002697 #
2698 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2699 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07002700 &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 -07002701 },
2702 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002703 &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.
2704 &quot;a_key&quot;: &quot;A String&quot;,
2705 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002706 &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 -07002707 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002708 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002709 &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.
2710 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002711 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002712 &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 -07002713 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002714 # 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:
2715 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002716 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002717 #
2718 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002719 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002720 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002721 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002722 # To create a disk with a custom image that you created, specify the image name in the following format:
2723 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002724 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002725 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002726 # 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:
2727 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002728 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002729 #
2730 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002731 &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 -07002732 #
2733 # 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.
2734 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2735 &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.
2736 &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.
2737 &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 -07002738 #
2739 # The key must meet the following requirements before you can provide it to Compute Engine:
2740 # - The key is wrapped using a RSA public key certificate provided by Google.
2741 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2742 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002743 &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.
2744 },
2745 &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.
2746 #
2747 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2748 # global/snapshots/my-backup
2749 #
2750 #
2751 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002752 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07002753 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2754 &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.
2755 &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.
2756 &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.
2757 #
2758 # The key must meet the following requirements before you can provide it to Compute Engine:
2759 # - The key is wrapped using a RSA public key certificate provided by Google.
2760 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2761 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2762 &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 -07002763 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002764 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002765 &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.
2766 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2767 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2768 &quot;A String&quot;,
2769 ],
2770 &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.
2771 &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
2772 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07002773 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002774 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2775 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002776 },
2777 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002778 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07002779 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002780 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2781 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002782 },
2783 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002784 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07002785 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002786 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2787 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002788 },
2789 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002790 &quot;pk&quot;: { # The Platform Key (PK).
2791 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2792 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002793 },
2794 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002795 &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 -08002796 #
2797 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2798 #
2799 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002800 &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 -07002801 },
2802 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002803 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2804 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
2805 },
2806 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2807 &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.
2808 #
2809 # To see the latest fingerprint, make get() request to the instance.
2810 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2811 { # A specification of the type and number of accelerator cards attached to the instance.
2812 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2813 &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.
2814 },
2815 ],
2816 &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.
2817 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2818 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2819 &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.
2820 #
2821 # To see the latest fingerprint, make get() request to the instance.
2822 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2823 &quot;a_key&quot;: &quot;A String&quot;,
2824 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002825 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
2826 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
2827 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07002828 &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:
2829 # zones/us-central1-f/machineTypes/n1-standard-1
2830 #
2831 #
2832 # 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):
2833 # zones/zone/machineTypes/custom-CPUS-MEMORY
2834 #
2835 #
2836 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2837 #
2838 # For a full list of restrictions, read the Specifications for custom machine types.
2839 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2840 &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.
2841 #
2842 # To see the latest fingerprint, make a get() request to retrieve the resource.
2843 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2844 {
2845 &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.
2846 &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).
2847 },
2848 ],
2849 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2850 },
2851 &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;.
2852 &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.
2853 &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.
2854 { # A network interface resource attached to an instance.
2855 &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.
2856 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2857 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2858 &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.
2859 &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.
2860 &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.
2861 #
2862 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2863 #
2864 # 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.
2865 &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.
2866 &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.
2867 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2868 },
2869 ],
2870 &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.
2871 { # An alias IP range attached to an instance&#x27;s network interface.
2872 &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).
2873 &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.
2874 },
2875 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002876 &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. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Bu Sun Kim65020912020-05-20 12:08:20 -07002877 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
2878 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2879 &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.
2880 &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.
2881 #
2882 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2883 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2884 # - projects/project/global/networks/network
2885 # - global/networks/default
2886 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002887 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
Bu Sun Kim65020912020-05-20 12:08:20 -07002888 &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:
2889 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2890 # - regions/region/subnetworks/subnetwork
2891 },
2892 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002893 &quot;networkPerformanceConfig&quot;: {
2894 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
2895 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002896 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002897 &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.
2898 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2899 &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.
2900 &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.
2901 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2902 &quot;A String&quot;,
2903 ],
2904 },
2905 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2906 &quot;A String&quot;,
2907 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002908 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002909 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002910 &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.
2911 #
2912 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002913 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -07002914 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after VM instance creation where the VM won&#x27;t be scheduled for maintenance.
2915 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # For more information about maintenance intervals, see Setting maintenance intervals.
Bu Sun Kim65020912020-05-20 12:08:20 -07002916 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
2917 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2918 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2919 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2920 &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.
2921 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2922 &quot;A String&quot;,
2923 ],
2924 },
2925 ],
2926 &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 -07002927 &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 -07002928 },
2929 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2930 &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.
2931 #
2932 # 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.
2933 { # A service account.
2934 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2935 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2936 &quot;A String&quot;,
2937 ],
2938 },
2939 ],
2940 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2941 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2942 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2943 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2944 },
2945 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2946 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2947 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002948 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07002949 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
2950 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
2951 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
2952 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002953 &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 -07002954 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2955 },
2956 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
yoshi-code-bota8b35b92021-03-31 13:33:30 -07002957 &quot;sourceMachineImageEncryptionKey&quot;: { # Source machine image encryption key when creating an instance from a machine image.
Bu Sun Kim65020912020-05-20 12:08:20 -07002958 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2959 &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.
2960 &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.
2961 &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.
2962 #
2963 # The key must meet the following requirements before you can provide it to Compute Engine:
2964 # - The key is wrapped using a RSA public key certificate provided by Google.
2965 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2966 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2967 &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.
2968 },
2969 &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 Kim673ec5c2020-11-16 11:05:03 -07002970 &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. For more information about the status of the instance, see Instance life cycle.
Bu Sun Kim65020912020-05-20 12:08:20 -07002971 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2972 &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.
2973 &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.
2974 #
2975 # To see the latest fingerprint, make get() request to the instance.
2976 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2977 &quot;A String&quot;,
2978 ],
2979 },
2980 &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 -07002981}
2982
Bu Sun Kim65020912020-05-20 12:08:20 -07002983 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.
2984
2985For 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.
2986
2987The 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 -07002988 sourceInstanceTemplate: string, Specifies instance template to create the instance.
2989
2990This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2991- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
2992- projects/project/global/instanceTemplates/instanceTemplate
2993- global/instanceTemplates/instanceTemplate
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002994 sourceMachineImage: string, Specifies the machine image to use to create the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002995
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002996This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image:
Dan O'Mearadd494642020-05-01 07:42:23 -07002997- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
2998- projects/project/global/global/machineImages/machineImage
2999- global/machineImages/machineImage
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003000
3001Returns:
3002 An object of the form:
3003
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003004 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003005 #
3006 # Google Compute Engine has three Operation resources:
3007 #
3008 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3009 #
3010 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3011 #
3012 # Operations can be global, regional or zonal.
3013 # - For global operations, use the `globalOperations` resource.
3014 # - For regional operations, use the `regionOperations` resource.
3015 # - For zonal operations, use the `zonalOperations` resource.
3016 #
3017 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3018 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3019 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3020 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3021 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3022 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3023 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003024 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003025 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3026 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3027 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003028 },
3029 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003030 },
3031 &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`.
3032 &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.
3033 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3034 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3035 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3036 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003037 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003038 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3039 &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.
3040 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3041 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3042 &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.
3043 &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`.
3044 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3045 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3046 &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.
3047 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3048 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3049 {
3050 &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.
3051 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3052 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3053 {
3054 &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).
3055 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3056 },
3057 ],
3058 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3059 },
3060 ],
3061 &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.
3062}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003063</div>
3064
3065<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003066 <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 -07003067 <pre>Retrieves the list of instances contained within the specified zone.
3068
3069Args:
3070 project: string, Project ID for this request. (required)
3071 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003072 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 -07003073
Dan O'Mearadd494642020-05-01 07:42:23 -07003074For 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 -07003075
Dan O'Mearadd494642020-05-01 07:42:23 -07003076You 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 -07003077
Bu Sun Kim65020912020-05-20 12:08:20 -07003078To 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) ```
3079 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`)
3080 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3081
3082You 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.
3083
3084Currently, only sorting by `name` or `creationTimestamp desc` is supported.
3085 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003086 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003087
3088Returns:
3089 An object of the form:
3090
3091 { # Contains a list of instances.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003092 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3093 &quot;items&quot;: [ # A list of Instance resources.
3094 { # Represents an Instance resource.
3095 #
3096 # 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 ==)
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003097 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
3098 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04003099 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003100 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003101 &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.
3102 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
3103 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
3104 },
3105 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
3106 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3107 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
3108 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3109 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
3110 { # An instance-attached disk resource.
3111 &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).
3112 &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.
3113 &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.
3114 #
3115 # 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.
3116 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
3117 #
3118 # 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.
3119 #
3120 # 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.
3121 #
3122 # 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.
3123 #
3124 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
3125 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3126 &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.
3127 &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.
3128 &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 Kim65020912020-05-20 12:08:20 -07003129 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003130 # The key must meet the following requirements before you can provide it to Compute Engine:
3131 # - The key is wrapped using a RSA public key certificate provided by Google.
3132 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3133 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3134 &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.
3135 },
3136 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
3137 &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.
3138 { # Guest OS features.
3139 &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.
3140 },
3141 ],
3142 &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.
3143 &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.
3144 #
3145 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
3146 #
3147 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
3148 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
3149 &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.
3150 &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.
3151 &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:
3152 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003153 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003154 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003155 # 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:
3156 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
3157 # - projects/project/zones/zone/diskTypes/diskType
3158 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
3159 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003160 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003161 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
3162 { # Guest OS features.
3163 &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.
3164 },
3165 ],
3166 &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.
3167 &quot;a_key&quot;: &quot;A String&quot;,
3168 },
3169 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
3170 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003171 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003172 &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.
3173 &quot;A String&quot;,
3174 ],
3175 &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 -07003176 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003177 # 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:
3178 # projects/debian-cloud/global/images/family/debian-9
3179 #
3180 #
3181 # Alternatively, use a specific version of a public operating system image:
3182 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
3183 #
3184 #
3185 # To create a disk with a custom image that you created, specify the image name in the following format:
3186 # global/images/my-custom-image
3187 #
3188 #
3189 # 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:
3190 # global/images/family/my-image-family
3191 #
3192 #
3193 # If the source image is deleted later, this field will not be set.
3194 &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.
3195 #
3196 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07003197 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3198 &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.
3199 &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.
3200 &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 -07003201 #
3202 # The key must meet the following requirements before you can provide it to Compute Engine:
3203 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003204 # - 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 -07003205 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07003206 &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 -07003207 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003208 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003209 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003210 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
3211 # global/snapshots/my-backup
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003212 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003213 #
3214 # If the source snapshot is deleted later, this field will not be set.
3215 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
3216 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3217 &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.
3218 &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.
3219 &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 -07003220 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003221 # The key must meet the following requirements before you can provide it to Compute Engine:
3222 # - The key is wrapped using a RSA public key certificate provided by Google.
3223 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3224 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3225 &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 -07003226 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003227 },
3228 &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.
3229 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
3230 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
3231 &quot;A String&quot;,
3232 ],
3233 &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.
3234 &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
3235 &quot;dbs&quot;: [ # The Key Database (db).
3236 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003237 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3238 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07003239 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003240 ],
3241 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
3242 {
3243 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3244 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3245 },
3246 ],
3247 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
3248 {
3249 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3250 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3251 },
3252 ],
3253 &quot;pk&quot;: { # The Platform Key (PK).
3254 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3255 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07003256 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003257 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003258 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07003259 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003260 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
3261 #
3262 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
3263 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim65020912020-05-20 12:08:20 -07003264 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003265 ],
3266 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
3267 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
3268 },
3269 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
3270 &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.
3271 #
3272 # To see the latest fingerprint, make get() request to the instance.
3273 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
3274 { # A specification of the type and number of accelerator cards attached to the instance.
3275 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
3276 &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.
3277 },
3278 ],
3279 &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.
3280 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3281 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
3282 &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.
3283 #
3284 # To see the latest fingerprint, make get() request to the instance.
3285 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
3286 &quot;a_key&quot;: &quot;A String&quot;,
3287 },
3288 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
3289 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
3290 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
3291 &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:
3292 # zones/us-central1-f/machineTypes/n1-standard-1
3293 #
3294 #
3295 # 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):
3296 # zones/zone/machineTypes/custom-CPUS-MEMORY
3297 #
3298 #
3299 # For example: zones/us-central1-f/machineTypes/custom-4-5120
3300 #
3301 # For a full list of restrictions, read the Specifications for custom machine types.
3302 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
3303 &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.
3304 #
3305 # To see the latest fingerprint, make a get() request to retrieve the resource.
3306 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3307 {
3308 &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.
3309 &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).
Bu Sun Kim65020912020-05-20 12:08:20 -07003310 },
3311 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003312 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
3313 },
3314 &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;.
3315 &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.
3316 &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.
3317 { # A network interface resource attached to an instance.
3318 &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.
3319 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
3320 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
3321 &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.
3322 &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.
3323 &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.
3324 #
3325 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
3326 #
3327 # 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.
3328 &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.
3329 &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.
3330 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
3331 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003332 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003333 &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.
3334 { # An alias IP range attached to an instance&#x27;s network interface.
3335 &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).
3336 &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.
3337 },
3338 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003339 &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. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003340 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
3341 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
3342 &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.
3343 &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.
3344 #
3345 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
3346 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
3347 # - projects/project/global/networks/network
3348 # - global/networks/default
3349 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003350 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003351 &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:
3352 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
3353 # - regions/region/subnetworks/subnetwork
Bu Sun Kim65020912020-05-20 12:08:20 -07003354 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003355 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003356 &quot;networkPerformanceConfig&quot;: {
3357 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
3358 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003359 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003360 &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.
3361 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
3362 &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.
3363 &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.
3364 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003365 &quot;A String&quot;,
3366 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003367 },
3368 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
3369 &quot;A String&quot;,
3370 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003371 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003372 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Sets the scheduling options for this instance.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003373 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07003374 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003375 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003376 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -07003377 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after VM instance creation where the VM won&#x27;t be scheduled for maintenance.
3378 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # For more information about maintenance intervals, see Setting maintenance intervals.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003379 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
3380 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
3381 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
3382 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3383 &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.
3384 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003385 &quot;A String&quot;,
3386 ],
3387 },
3388 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003389 &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.
3390 &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.
3391 },
3392 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3393 &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.
3394 #
3395 # 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.
3396 { # A service account.
3397 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3398 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
Bu Sun Kim65020912020-05-20 12:08:20 -07003399 &quot;A String&quot;,
3400 ],
3401 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003402 ],
3403 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
3404 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
3405 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
3406 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
3407 },
3408 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
3409 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3410 },
3411 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
3412 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
3413 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
3414 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
3415 },
3416 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured. # Deprecating, please use shielded_instance_integrity_policy.
3417 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3418 },
3419 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
yoshi-code-bota8b35b92021-03-31 13:33:30 -07003420 &quot;sourceMachineImageEncryptionKey&quot;: { # Source machine image encryption key when creating an instance from a machine image.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003421 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3422 &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.
3423 &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.
3424 &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.
3425 #
3426 # The key must meet the following requirements before you can provide it to Compute Engine:
3427 # - The key is wrapped using a RSA public key certificate provided by Google.
3428 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3429 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3430 &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.
3431 },
3432 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
3433 &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. For more information about the status of the instance, see Instance life cycle.
3434 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
3435 &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.
3436 &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.
3437 #
3438 # To see the latest fingerprint, make get() request to the instance.
3439 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3440 &quot;A String&quot;,
3441 ],
3442 },
3443 &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.
3444 },
3445 ],
3446 &quot;kind&quot;: &quot;compute#instanceList&quot;, # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
3447 &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.
3448 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3449 &quot;warning&quot;: { # [Output Only] Informational warning message.
3450 &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.
3451 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3452 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3453 {
3454 &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).
3455 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003456 },
3457 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003458 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3459 },
3460}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003461</div>
3462
3463<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003464 <code class="details" id="listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07003465 <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 or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003466
3467Args:
3468 project: string, Project ID for this request. (required)
3469 zone: string, The name of the zone for this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07003470 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 -07003471 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 -04003472
Dan O'Mearadd494642020-05-01 07:42:23 -07003473For 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 -04003474
Dan O'Mearadd494642020-05-01 07:42:23 -07003475You 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 -04003476
Bu Sun Kim65020912020-05-20 12:08:20 -07003477To 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 -07003478 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 -07003479 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3480
3481You 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.
3482
3483Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003484 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003485 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003486
3487Returns:
3488 An object of the form:
3489
3490 { # Contains a list of instance referrers.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003491 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3492 &quot;items&quot;: [ # A list of Reference resources.
3493 { # Represents a reference to a resource.
3494 &quot;kind&quot;: &quot;compute#reference&quot;, # [Output Only] Type of the resource. Always compute#reference for references.
3495 &quot;referenceType&quot;: &quot;A String&quot;, # A description of the reference type with no implied semantics. Possible values include:
3496 # - MEMBER_OF
3497 &quot;referrer&quot;: &quot;A String&quot;, # URL of the resource which refers to the target.
3498 &quot;target&quot;: &quot;A String&quot;, # URL of the resource to which this reference points.
3499 },
3500 ],
3501 &quot;kind&quot;: &quot;compute#instanceListReferrers&quot;, # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
3502 &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.
3503 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3504 &quot;warning&quot;: { # [Output Only] Informational warning message.
3505 &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.
3506 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3507 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3508 {
3509 &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).
3510 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003511 },
3512 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003513 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3514 },
3515}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003516</div>
3517
3518<div class="method">
3519 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
3520 <pre>Retrieves the next page of results.
3521
3522Args:
3523 previous_request: The request for the previous page. (required)
3524 previous_response: The response from the request for the previous page. (required)
3525
3526Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003527 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003528 page. Returns None if there are no more items in the collection.
3529 </pre>
3530</div>
3531
3532<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003533 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3534 <pre>Retrieves the next page of results.
3535
3536Args:
3537 previous_request: The request for the previous page. (required)
3538 previous_response: The response from the request for the previous page. (required)
3539
3540Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003541 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003542 page. Returns None if there are no more items in the collection.
3543 </pre>
3544</div>
3545
3546<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003547 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
3548 <pre>Removes resource policies from an instance.
3549
3550Args:
3551 project: string, Project ID for this request. (required)
3552 zone: string, The name of the zone for this request. (required)
3553 instance: string, The instance name for this request. (required)
3554 body: object, The request body.
3555 The object takes the form of:
3556
3557{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003558 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this instance.
3559 &quot;A String&quot;,
3560 ],
3561}
Dan O'Mearadd494642020-05-01 07:42:23 -07003562
3563 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.
3564
3565For 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.
3566
3567The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3568
3569Returns:
3570 An object of the form:
3571
3572 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003573 #
3574 # Google Compute Engine has three Operation resources:
3575 #
3576 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3577 #
3578 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3579 #
3580 # Operations can be global, regional or zonal.
3581 # - For global operations, use the `globalOperations` resource.
3582 # - For regional operations, use the `regionOperations` resource.
3583 # - For zonal operations, use the `zonalOperations` resource.
3584 #
3585 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3586 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3587 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3588 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3589 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3590 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3591 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003592 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003593 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3594 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3595 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003596 },
3597 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003598 },
3599 &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`.
3600 &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.
3601 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3602 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3603 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3604 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003605 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003606 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3607 &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.
3608 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3609 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3610 &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.
3611 &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`.
3612 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3613 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3614 &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.
3615 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3616 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3617 {
3618 &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.
3619 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3620 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3621 {
3622 &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).
3623 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3624 },
3625 ],
3626 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3627 },
3628 ],
3629 &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.
3630}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07003631</div>
3632
3633<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003634 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
3635 <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 -07003636
3637Args:
3638 project: string, Project ID for this request. (required)
3639 zone: string, The name of the zone for this request. (required)
3640 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003641 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.
3642
3643For 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.
3644
3645The 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 -07003646
3647Returns:
3648 An object of the form:
3649
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003650 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003651 #
3652 # Google Compute Engine has three Operation resources:
3653 #
3654 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3655 #
3656 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3657 #
3658 # Operations can be global, regional or zonal.
3659 # - For global operations, use the `globalOperations` resource.
3660 # - For regional operations, use the `regionOperations` resource.
3661 # - For zonal operations, use the `zonalOperations` resource.
3662 #
3663 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3664 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3665 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3666 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3667 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3668 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3669 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003670 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003671 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3672 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3673 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003674 },
3675 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003676 },
3677 &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`.
3678 &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.
3679 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3680 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3681 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3682 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003683 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003684 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3685 &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.
3686 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3687 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3688 &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.
3689 &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`.
3690 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3691 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3692 &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.
3693 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3694 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3695 {
3696 &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.
3697 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3698 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3699 {
3700 &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).
3701 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3702 },
3703 ],
3704 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3705 },
3706 ],
3707 &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.
3708}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003709</div>
3710
3711<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003712 <code class="details" id="resume">resume(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003713 <pre>Resumes an instance that was suspended using the instances().suspend method.
3714
3715Args:
3716 project: string, Project ID for this request. (required)
3717 zone: string, The name of the zone for this request. (required)
3718 instance: string, Name of the instance resource to resume. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003719 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003720 The object takes the form of:
3721
3722{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003723 &quot;disks&quot;: [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
3724 #
3725 # In order to resume the instance, the disk url and its corresponding key must be provided.
3726 #
3727 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
3728 {
3729 &quot;diskEncryptionKey&quot;: { # Decrypts data associated with the disk with a customer-supplied encryption key.
3730 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3731 &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.
3732 &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.
3733 &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.
3734 #
3735 # The key must meet the following requirements before you can provide it to Compute Engine:
3736 # - The key is wrapped using a RSA public key certificate provided by Google.
3737 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3738 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3739 &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 -07003740 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003741 &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 Kim65020912020-05-20 12:08:20 -07003742 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003743 ],
3744 &quot;instanceEncryptionKey&quot;: { # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
3745 #
3746 # 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.
3747 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3748 &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.
3749 &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.
3750 &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.
3751 #
3752 # The key must meet the following requirements before you can provide it to Compute Engine:
3753 # - The key is wrapped using a RSA public key certificate provided by Google.
3754 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3755 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3756 &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.
3757 },
3758}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003759
3760 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.
3761
3762For 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.
3763
3764The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3765
3766Returns:
3767 An object of the form:
3768
3769 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003770 #
3771 # Google Compute Engine has three Operation resources:
3772 #
3773 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3774 #
3775 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3776 #
3777 # Operations can be global, regional or zonal.
3778 # - For global operations, use the `globalOperations` resource.
3779 # - For regional operations, use the `regionOperations` resource.
3780 # - For zonal operations, use the `zonalOperations` resource.
3781 #
3782 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3783 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3784 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3785 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3786 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3787 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3788 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003789 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003790 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3791 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3792 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003793 },
3794 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003795 },
3796 &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`.
3797 &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.
3798 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3799 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3800 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3801 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003802 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003803 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3804 &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.
3805 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3806 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3807 &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.
3808 &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`.
3809 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3810 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3811 &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.
3812 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3813 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3814 {
3815 &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.
3816 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3817 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3818 {
3819 &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).
3820 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3821 },
3822 ],
3823 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3824 },
3825 ],
3826 &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.
3827}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003828</div>
3829
3830<div class="method">
3831 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
3832 <pre>Sets deletion protection on the instance.
3833
3834Args:
3835 project: string, Project ID for this request. (required)
3836 zone: string, The name of the zone for this request. (required)
3837 resource: string, Name or id of the resource for this request. (required)
3838 deletionProtection: boolean, Whether the resource should be protected against deletion.
3839 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.
3840
3841For 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.
3842
3843The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3844
3845Returns:
3846 An object of the form:
3847
3848 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003849 #
3850 # Google Compute Engine has three Operation resources:
3851 #
3852 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3853 #
3854 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3855 #
3856 # Operations can be global, regional or zonal.
3857 # - For global operations, use the `globalOperations` resource.
3858 # - For regional operations, use the `regionOperations` resource.
3859 # - For zonal operations, use the `zonalOperations` resource.
3860 #
3861 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3862 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3863 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3864 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3865 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3866 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3867 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003868 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003869 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3870 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3871 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003872 },
3873 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003874 },
3875 &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`.
3876 &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.
3877 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3878 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3879 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3880 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003881 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003882 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3883 &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.
3884 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3885 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3886 &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.
3887 &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`.
3888 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3889 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3890 &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.
3891 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3892 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3893 {
3894 &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.
3895 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3896 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3897 {
3898 &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).
3899 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3900 },
3901 ],
3902 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3903 },
3904 ],
3905 &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.
3906}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003907</div>
3908
3909<div class="method">
3910 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003911 <pre>Sets the auto-delete flag for a disk attached to an instance.
3912
3913Args:
3914 project: string, Project ID for this request. (required)
3915 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003916 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003917 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003918 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)
3919 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.
3920
3921For 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.
3922
3923The 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 -07003924
3925Returns:
3926 An object of the form:
3927
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003928 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003929 #
3930 # Google Compute Engine has three Operation resources:
3931 #
3932 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3933 #
3934 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3935 #
3936 # Operations can be global, regional or zonal.
3937 # - For global operations, use the `globalOperations` resource.
3938 # - For regional operations, use the `regionOperations` resource.
3939 # - For zonal operations, use the `zonalOperations` resource.
3940 #
3941 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3942 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3943 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3944 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3945 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3946 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3947 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07003948 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003949 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3950 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3951 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07003952 },
3953 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003954 },
3955 &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`.
3956 &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.
3957 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3958 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3959 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3960 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08003961 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08003962 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3963 &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.
3964 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3965 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3966 &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.
3967 &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`.
3968 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3969 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3970 &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.
3971 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3972 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3973 {
3974 &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.
3975 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3976 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3977 {
3978 &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).
3979 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3980 },
3981 ],
3982 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3983 },
3984 ],
3985 &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.
3986}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003987</div>
3988
3989<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003990 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003991 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
3992
3993Args:
3994 project: string, Project ID for this request. (required)
3995 zone: string, The name of the zone for this request. (required)
3996 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003997 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003998 The object takes the form of:
3999
4000{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004001 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
4002 { # Associates `members` with a `role`.
4003 &quot;bindingId&quot;: &quot;A String&quot;,
4004 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07004005 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004006 # If the condition evaluates to `true`, then this binding applies to the current request.
Bu Sun Kim65020912020-05-20 12:08:20 -07004007 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004008 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07004009 #
4010 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004011 #
4012 # Example (Comparison):
4013 #
4014 # 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;
4015 #
4016 # Example (Equality):
4017 #
4018 # 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;
4019 #
4020 # Example (Logic):
4021 #
4022 # 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;
4023 #
4024 # Example (Data Manipulation):
4025 #
4026 # 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;
4027 #
4028 # 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.
4029 &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.
4030 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4031 &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.
4032 &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.
4033 },
4034 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
4035 #
4036 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4037 #
4038 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4039 #
4040 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
4041 #
4042 #
4043 #
4044 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4045 #
4046 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4047 #
4048 # * `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.
4049 #
4050 # * `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.
4051 #
4052 # * `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.
4053 #
4054 #
4055 #
4056 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
4057 &quot;A String&quot;,
4058 ],
4059 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004060 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004061 ],
4062 &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.
4063 &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 -07004064 #
4065 #
4066 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004067 # 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 -07004068 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004069 # 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 -07004070 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004071 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004072 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004073 # { &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 -07004074 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004075 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004076 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004077 # 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 -07004078 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004079 # 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 -07004080 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004081 { # 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.
4082 #
4083 # 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.
4084 #
4085 # Example Policy with multiple AuditConfigs:
4086 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004087 # { &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 -07004088 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004089 # 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 -07004090 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004091 { # Provides the configuration for logging a type of permissions. Example:
4092 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004093 # { &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 -07004094 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004095 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
4096 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4097 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004098 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004099 &quot;ignoreChildExemptions&quot;: True or False,
4100 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004101 },
4102 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004103 &quot;exemptedMembers&quot;: [
4104 &quot;A String&quot;,
4105 ],
4106 &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 -07004107 },
4108 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004109 &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 -07004110 { # Associates `members` with a `role`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08004111 &quot;bindingId&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07004112 &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.
4113 #
4114 # If the condition evaluates to `true`, then this binding applies to the current request.
4115 #
4116 # 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.
4117 #
4118 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4119 #
4120 # Example (Comparison):
4121 #
4122 # 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;
4123 #
4124 # Example (Equality):
4125 #
4126 # 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;
4127 #
4128 # Example (Logic):
4129 #
4130 # 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;
4131 #
4132 # Example (Data Manipulation):
4133 #
4134 # 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;
4135 #
4136 # 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.
4137 &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.
4138 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4139 &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.
4140 &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.
4141 },
4142 &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 -07004143 #
4144 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4145 #
4146 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4147 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004148 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004149 #
4150 #
4151 #
4152 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4153 #
4154 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4155 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004156 # * `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.
4157 #
4158 # * `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.
4159 #
4160 # * `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.
4161 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004162 #
4163 #
4164 # * `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 -07004165 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004166 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004167 &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 -07004168 },
4169 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004170 &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.
4171 #
4172 # **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.
4173 &quot;iamOwned&quot;: True or False,
4174 &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.
4175 { # A rule to be applied in a Policy.
4176 &quot;action&quot;: &quot;A String&quot;, # Required
4177 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4178 { # A condition to be met.
4179 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
4180 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
4181 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
4182 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4183 &quot;values&quot;: [ # The objects of the condition.
4184 &quot;A String&quot;,
4185 ],
4186 },
4187 ],
4188 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
4189 &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.
4190 &quot;A String&quot;,
4191 ],
4192 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4193 { # Specifies what kind of log the caller must write
4194 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
4195 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4196 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
4197 },
4198 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
4199 },
4200 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
4201 #
4202 # 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.
4203 #
4204 # Field names correspond to IAM request parameters and field values are their respective values.
4205 #
4206 # 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.
4207 #
4208 # 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]}
4209 &quot;customFields&quot;: [ # Custom fields.
4210 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4211 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
4212 &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.
4213 },
4214 ],
4215 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
4216 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
4217 },
4218 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
4219 &quot;logMode&quot;: &quot;A String&quot;,
4220 },
4221 },
4222 ],
4223 &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.
4224 &quot;A String&quot;,
4225 ],
4226 &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.
4227 &quot;A String&quot;,
4228 ],
4229 },
4230 ],
4231 &quot;version&quot;: 42, # Specifies the format of the policy.
4232 #
4233 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4234 #
4235 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4236 #
4237 # * 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
4238 #
4239 # **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.
4240 #
4241 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
4242 #
4243 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004244 },
4245}
4246
4247
4248Returns:
4249 An object of the form:
4250
4251 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
4252 #
4253 #
4254 #
4255 # 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.
4256 #
4257 # 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).
4258 #
4259 # **JSON example:**
4260 #
4261 # { &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 }
4262 #
4263 # **YAML example:**
4264 #
4265 # 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
4266 #
4267 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
4268 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
4269 { # 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.
4270 #
4271 # 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.
4272 #
4273 # Example Policy with multiple AuditConfigs:
4274 #
4275 # { &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; ] } ] } ] }
4276 #
4277 # 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.
4278 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
4279 { # Provides the configuration for logging a type of permissions. Example:
4280 #
4281 # { &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; } ] }
4282 #
4283 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
4284 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4285 &quot;A String&quot;,
4286 ],
4287 &quot;ignoreChildExemptions&quot;: True or False,
4288 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
4289 },
4290 ],
4291 &quot;exemptedMembers&quot;: [
4292 &quot;A String&quot;,
4293 ],
4294 &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.
4295 },
4296 ],
4297 &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.
4298 { # Associates `members` with a `role`.
4299 &quot;bindingId&quot;: &quot;A String&quot;,
4300 &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.
4301 #
4302 # If the condition evaluates to `true`, then this binding applies to the current request.
4303 #
4304 # 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.
4305 #
4306 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4307 #
4308 # Example (Comparison):
4309 #
4310 # 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;
4311 #
4312 # Example (Equality):
4313 #
4314 # 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;
4315 #
4316 # Example (Logic):
4317 #
4318 # 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;
4319 #
4320 # Example (Data Manipulation):
4321 #
4322 # 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;
4323 #
4324 # 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.
4325 &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.
4326 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4327 &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.
4328 &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.
4329 },
4330 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
4331 #
4332 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4333 #
4334 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4335 #
4336 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
4337 #
4338 #
4339 #
4340 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4341 #
4342 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4343 #
4344 # * `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.
4345 #
4346 # * `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.
4347 #
4348 # * `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.
4349 #
4350 #
4351 #
4352 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
4353 &quot;A String&quot;,
4354 ],
4355 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
4356 },
4357 ],
4358 &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.
4359 #
4360 # **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.
4361 &quot;iamOwned&quot;: True or False,
4362 &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.
4363 { # A rule to be applied in a Policy.
4364 &quot;action&quot;: &quot;A String&quot;, # Required
4365 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4366 { # A condition to be met.
4367 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
4368 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
4369 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
4370 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4371 &quot;values&quot;: [ # The objects of the condition.
4372 &quot;A String&quot;,
4373 ],
4374 },
4375 ],
4376 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
4377 &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.
4378 &quot;A String&quot;,
4379 ],
4380 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4381 { # Specifies what kind of log the caller must write
4382 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
4383 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4384 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
4385 },
4386 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
4387 },
4388 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
4389 #
4390 # 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.
4391 #
4392 # Field names correspond to IAM request parameters and field values are their respective values.
4393 #
4394 # 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.
4395 #
4396 # 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]}
4397 &quot;customFields&quot;: [ # Custom fields.
4398 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4399 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
4400 &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.
4401 },
4402 ],
4403 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
4404 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
4405 },
4406 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
4407 &quot;logMode&quot;: &quot;A String&quot;,
4408 },
4409 },
4410 ],
4411 &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.
4412 &quot;A String&quot;,
4413 ],
4414 &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.
4415 &quot;A String&quot;,
4416 ],
4417 },
4418 ],
4419 &quot;version&quot;: 42, # Specifies the format of the policy.
4420 #
4421 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4422 #
4423 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4424 #
4425 # * 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
4426 #
4427 # **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.
4428 #
4429 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
4430 #
4431 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4432}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004433</div>
4434
4435<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004436 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004437 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004438
4439Args:
4440 project: string, Project ID for this request. (required)
4441 zone: string, The name of the zone for this request. (required)
4442 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004443 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004444 The object takes the form of:
4445
4446{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004447 &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.
4448 &quot;labels&quot;: {
4449 &quot;a_key&quot;: &quot;A String&quot;,
4450 },
4451}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004452
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004453 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.
4454
4455For 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.
4456
4457The 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 -07004458
4459Returns:
4460 An object of the form:
4461
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004462 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004463 #
4464 # Google Compute Engine has three Operation resources:
4465 #
4466 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4467 #
4468 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4469 #
4470 # Operations can be global, regional or zonal.
4471 # - For global operations, use the `globalOperations` resource.
4472 # - For regional operations, use the `regionOperations` resource.
4473 # - For zonal operations, use the `zonalOperations` resource.
4474 #
4475 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4476 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4477 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4478 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4479 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4480 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4481 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07004482 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004483 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4484 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4485 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07004486 },
4487 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004488 },
4489 &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`.
4490 &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.
4491 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4492 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4493 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4494 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08004495 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004496 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4497 &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.
4498 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4499 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4500 &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.
4501 &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`.
4502 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4503 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4504 &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.
4505 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4506 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4507 {
4508 &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.
4509 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4510 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4511 {
4512 &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).
4513 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4514 },
4515 ],
4516 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4517 },
4518 ],
4519 &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.
4520}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004521</div>
4522
4523<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004524 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004525 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
4526
4527Args:
4528 project: string, Project ID for this request. (required)
4529 zone: string, The name of the zone for this request. (required)
4530 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004531 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004532 The object takes the form of:
4533
4534{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004535 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
4536 { # A specification of the type and number of accelerator cards attached to the instance.
4537 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
4538 &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.
4539 },
4540 ],
4541}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004542
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).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004548
4549Returns:
4550 An object of the form:
4551
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004552 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004553 #
4554 # 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 #
4558 # 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.
4561 # - For global operations, use the `globalOperations` resource.
4562 # - For regional operations, use the `regionOperations` resource.
4563 # - For zonal operations, use the `zonalOperations` resource.
4564 #
4565 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4566 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07004572 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004573 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07004576 },
4577 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004578 },
4579 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08004585 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004586 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4587 &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.
4588 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4589 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4590 &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.
4591 &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`.
4592 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4593 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4594 &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.
4595 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4596 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4597 {
4598 &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.
4599 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4600 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4601 {
4602 &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).
4603 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4604 },
4605 ],
4606 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4607 },
4608 ],
4609 &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.
4610}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004611</div>
4612
4613<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004614 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004615 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
4616
4617Args:
4618 project: string, Project ID for this request. (required)
4619 zone: string, The name of the zone for this request. (required)
4620 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004621 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004622 The object takes the form of:
4623
4624{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004625 &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
4626}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004627
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004628 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.
4629
4630For 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.
4631
4632The 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 -07004633
4634Returns:
4635 An object of the form:
4636
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004637 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004638 #
4639 # Google Compute Engine has three Operation resources:
4640 #
4641 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4642 #
4643 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4644 #
4645 # Operations can be global, regional or zonal.
4646 # - For global operations, use the `globalOperations` resource.
4647 # - For regional operations, use the `regionOperations` resource.
4648 # - For zonal operations, use the `zonalOperations` resource.
4649 #
4650 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4651 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4652 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4653 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4654 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4655 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4656 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07004657 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004658 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4659 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4660 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07004661 },
4662 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004663 },
4664 &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`.
4665 &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.
4666 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4667 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4668 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4669 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08004670 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004671 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4672 &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.
4673 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4674 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4675 &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.
4676 &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`.
4677 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4678 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4679 &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.
4680 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4681 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4682 {
4683 &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.
4684 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4685 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4686 {
4687 &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).
4688 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4689 },
4690 ],
4691 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4692 },
4693 ],
4694 &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.
4695}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004696</div>
4697
4698<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004699 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004700 <pre>Sets metadata for the specified instance to the data included in the request.
4701
4702Args:
4703 project: string, Project ID for this request. (required)
4704 zone: string, The name of the zone for this request. (required)
4705 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004706 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004707 The object takes the form of:
4708
4709{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07004710 &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 -07004711 #
4712 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004713 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4714 {
4715 &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.
4716 &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).
4717 },
4718 ],
4719 &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 -07004720}
4721
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004722 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.
4723
4724For 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.
4725
4726The 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 -07004727
4728Returns:
4729 An object of the form:
4730
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004731 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004732 #
4733 # Google Compute Engine has three Operation resources:
4734 #
4735 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4736 #
4737 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4738 #
4739 # Operations can be global, regional or zonal.
4740 # - For global operations, use the `globalOperations` resource.
4741 # - For regional operations, use the `regionOperations` resource.
4742 # - For zonal operations, use the `zonalOperations` resource.
4743 #
4744 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4745 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4746 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4747 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4748 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4749 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4750 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07004751 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004752 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4753 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4754 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07004755 },
4756 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004757 },
4758 &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`.
4759 &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.
4760 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4761 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4762 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4763 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08004764 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004765 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4766 &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.
4767 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4768 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4769 &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.
4770 &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`.
4771 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4772 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4773 &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.
4774 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4775 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4776 {
4777 &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.
4778 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4779 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4780 {
4781 &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).
4782 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4783 },
4784 ],
4785 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4786 },
4787 ],
4788 &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.
4789}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004790</div>
4791
4792<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004793 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004794 <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 -04004795
4796Args:
4797 project: string, Project ID for this request. (required)
4798 zone: string, The name of the zone for this request. (required)
4799 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004800 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004801 The object takes the form of:
4802
4803{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004804 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform this instance should be started at.
4805}
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004806
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004807 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.
4808
4809For 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.
4810
4811The 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 -04004812
4813Returns:
4814 An object of the form:
4815
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004816 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004817 #
4818 # Google Compute Engine has three Operation resources:
4819 #
4820 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4821 #
4822 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4823 #
4824 # Operations can be global, regional or zonal.
4825 # - For global operations, use the `globalOperations` resource.
4826 # - For regional operations, use the `regionOperations` resource.
4827 # - For zonal operations, use the `zonalOperations` resource.
4828 #
4829 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4830 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4831 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4832 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4833 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4834 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4835 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07004836 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004837 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4838 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4839 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07004840 },
4841 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004842 },
4843 &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`.
4844 &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.
4845 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4846 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4847 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4848 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08004849 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004850 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4851 &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.
4852 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4853 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4854 &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.
4855 &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`.
4856 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4857 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4858 &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.
4859 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4860 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4861 {
4862 &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.
4863 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4864 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4865 {
4866 &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).
4867 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4868 },
4869 ],
4870 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4871 },
4872 ],
4873 &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.
4874}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004875</div>
4876
4877<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004878 <code class="details" id="setName">setName(project, zone, instance, body=None, requestId=None)</code>
4879 <pre>Sets name of an instance.
4880
4881Args:
4882 project: string, Project ID for this request. (required)
4883 zone: string, The name of the zone for this request. (required)
4884 instance: string, The instance name for this request. (required)
4885 body: object, The request body.
4886 The object takes the form of:
4887
4888{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004889 &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.
4890 &quot;name&quot;: &quot;A String&quot;, # The name to be applied to the instance. Needs to be RFC 1035 compliant.
4891}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004892
4893 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.
4894
4895For 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.
4896
4897The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4898
4899Returns:
4900 An object of the form:
4901
4902 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004903 #
4904 # Google Compute Engine has three Operation resources:
4905 #
4906 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4907 #
4908 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4909 #
4910 # Operations can be global, regional or zonal.
4911 # - For global operations, use the `globalOperations` resource.
4912 # - For regional operations, use the `regionOperations` resource.
4913 # - For zonal operations, use the `zonalOperations` resource.
4914 #
4915 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4916 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4917 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4918 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4919 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4920 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4921 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004922 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004923 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4924 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4925 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004926 },
4927 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004928 },
4929 &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`.
4930 &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.
4931 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4932 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4933 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4934 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08004935 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08004936 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4937 &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.
4938 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4939 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4940 &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.
4941 &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`.
4942 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4943 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4944 &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.
4945 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4946 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4947 {
4948 &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.
4949 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4950 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4951 {
4952 &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).
4953 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4954 },
4955 ],
4956 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4957 },
4958 ],
4959 &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.
4960}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004961</div>
4962
4963<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004964 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004965 <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 -07004966
4967Args:
4968 project: string, Project ID for this request. (required)
4969 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004970 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004971 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004972 The object takes the form of:
4973
yoshi-code-bota8b35b92021-03-31 13:33:30 -07004974{ # Sets the scheduling options for an Instance. NextID: 20
Bu Sun Kim65020912020-05-20 12:08:20 -07004975 &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 -04004976 #
4977 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08004978 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -07004979 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after VM instance creation where the VM won&#x27;t be scheduled for maintenance.
4980 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # For more information about maintenance intervals, see Setting maintenance intervals.
Bu Sun Kim65020912020-05-20 12:08:20 -07004981 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
4982 &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 -07004983 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Bu Sun Kim65020912020-05-20 12:08:20 -07004984 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
4985 &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.
4986 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
4987 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004988 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004989 },
4990 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004991 &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 -07004992 &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 -07004993}
4994
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004995 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.
4996
4997For 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.
4998
4999The 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 -07005000
5001Returns:
5002 An object of the form:
5003
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005004 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005005 #
5006 # Google Compute Engine has three Operation resources:
5007 #
5008 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5009 #
5010 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5011 #
5012 # Operations can be global, regional or zonal.
5013 # - For global operations, use the `globalOperations` resource.
5014 # - For regional operations, use the `regionOperations` resource.
5015 # - For zonal operations, use the `zonalOperations` resource.
5016 #
5017 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5018 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5019 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5020 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5021 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5022 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5023 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005024 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005025 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5026 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5027 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005028 },
5029 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005030 },
5031 &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`.
5032 &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.
5033 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5034 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5035 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5036 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005037 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005038 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5039 &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.
5040 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5041 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5042 &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.
5043 &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`.
5044 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5045 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5046 &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.
5047 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5048 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5049 {
5050 &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.
5051 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5052 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5053 {
5054 &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).
5055 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5056 },
5057 ],
5058 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5059 },
5060 ],
5061 &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.
5062}</pre>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005063</div>
5064
5065<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005066 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005067 <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 -08005068
5069Args:
5070 project: string, Project ID for this request. (required)
5071 zone: string, The name of the zone for this request. (required)
5072 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005073 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005074 The object takes the form of:
5075
5076{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005077 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
5078 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
5079 &quot;A String&quot;,
5080 ],
5081}
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005082
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005083 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.
5084
5085For 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.
5086
5087The 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 -08005088
5089Returns:
5090 An object of the form:
5091
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005092 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005093 #
5094 # Google Compute Engine has three Operation resources:
5095 #
5096 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5097 #
5098 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5099 #
5100 # Operations can be global, regional or zonal.
5101 # - For global operations, use the `globalOperations` resource.
5102 # - For regional operations, use the `regionOperations` resource.
5103 # - For zonal operations, use the `zonalOperations` resource.
5104 #
5105 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5106 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5107 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5108 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5109 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5110 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5111 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005112 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005113 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5114 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5115 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005116 },
5117 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005118 },
5119 &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`.
5120 &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.
5121 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5122 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5123 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5124 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005125 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005126 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5127 &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.
5128 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5129 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5130 &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.
5131 &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`.
5132 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5133 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5134 &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.
5135 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5136 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5137 {
5138 &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.
5139 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5140 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5141 {
5142 &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).
5143 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5144 },
5145 ],
5146 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5147 },
5148 ],
5149 &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.
5150}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005151</div>
5152
5153<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005154 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005155 <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.
5156
5157Args:
5158 project: string, Project ID for this request. (required)
5159 zone: string, The name of the zone for this request. (required)
5160 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005161 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005162 The object takes the form of:
5163
5164{ # The policy describes the baseline against which Instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07005165 &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 -07005166}
5167
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005168 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.
5169
5170For 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.
5171
5172The 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 -07005173
5174Returns:
5175 An object of the form:
5176
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005177 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005178 #
5179 # Google Compute Engine has three Operation resources:
5180 #
5181 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5182 #
5183 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5184 #
5185 # Operations can be global, regional or zonal.
5186 # - For global operations, use the `globalOperations` resource.
5187 # - For regional operations, use the `regionOperations` resource.
5188 # - For zonal operations, use the `zonalOperations` resource.
5189 #
5190 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5191 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5192 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5193 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5194 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5195 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5196 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005197 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005198 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5199 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5200 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005201 },
5202 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005203 },
5204 &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`.
5205 &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.
5206 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5207 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5208 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5209 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005210 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005211 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5212 &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.
5213 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5214 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5215 &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.
5216 &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`.
5217 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5218 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5219 &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.
5220 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5221 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5222 {
5223 &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.
5224 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5225 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5226 {
5227 &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).
5228 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5229 },
5230 ],
5231 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5232 },
5233 ],
5234 &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.
5235}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -07005236</div>
5237
5238<div class="method">
5239 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
5240 <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.
5241
5242Args:
5243 project: string, Project ID for this request. (required)
5244 zone: string, The name of the zone for this request. (required)
5245 instance: string, Name of the instance scoping this request. (required)
5246 body: object, The request body.
5247 The object takes the form of:
5248
5249{ # The policy describes the baseline against which VM instance boot integrity is measured.
5250 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
5251}
5252
5253 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.
5254
5255For 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.
5256
5257The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5258
5259Returns:
5260 An object of the form:
5261
5262 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005263 #
5264 # Google Compute Engine has three Operation resources:
5265 #
5266 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5267 #
5268 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5269 #
5270 # Operations can be global, regional or zonal.
5271 # - For global operations, use the `globalOperations` resource.
5272 # - For regional operations, use the `regionOperations` resource.
5273 # - For zonal operations, use the `zonalOperations` resource.
5274 #
5275 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5276 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5277 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5278 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5279 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5280 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5281 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005282 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005283 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5284 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5285 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005286 },
5287 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005288 },
5289 &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`.
5290 &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.
5291 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5292 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5293 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5294 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005295 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005296 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5297 &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.
5298 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5299 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5300 &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.
5301 &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`.
5302 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5303 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5304 &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.
5305 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5306 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5307 {
5308 &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.
5309 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5310 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5311 {
5312 &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).
5313 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5314 },
5315 ],
5316 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5317 },
5318 ],
5319 &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.
5320}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -07005321</div>
5322
5323<div class="method">
5324 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
5325 <pre>Sets network tags for the specified instance to the data included in the request.
5326
5327Args:
5328 project: string, Project ID for this request. (required)
5329 zone: string, The name of the zone for this request. (required)
5330 instance: string, Name of the instance scoping this request. (required)
5331 body: object, The request body.
5332 The object takes the form of:
5333
5334{ # A set of instance tags.
5335 &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.
5336 #
5337 # To see the latest fingerprint, make get() request to the instance.
5338 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
5339 &quot;A String&quot;,
5340 ],
5341}
5342
5343 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.
5344
5345For 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.
5346
5347The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5348
5349Returns:
5350 An object of the form:
5351
5352 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005353 #
5354 # Google Compute Engine has three Operation resources:
5355 #
5356 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5357 #
5358 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5359 #
5360 # Operations can be global, regional or zonal.
5361 # - For global operations, use the `globalOperations` resource.
5362 # - For regional operations, use the `regionOperations` resource.
5363 # - For zonal operations, use the `zonalOperations` resource.
5364 #
5365 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5366 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5367 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5368 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5369 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5370 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5371 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005372 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005373 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5374 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5375 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005376 },
5377 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005378 },
5379 &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`.
5380 &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.
5381 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5382 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5383 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5384 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005385 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005386 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5387 &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.
5388 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5389 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5390 &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.
5391 &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`.
5392 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5393 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5394 &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.
5395 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5396 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5397 {
5398 &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.
5399 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5400 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5401 {
5402 &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).
5403 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5404 },
5405 ],
5406 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5407 },
5408 ],
5409 &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.
5410}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005411</div>
5412
5413<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005414 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
5415 <pre>Simulates a maintenance event on the instance.
5416
5417Args:
5418 project: string, Project ID for this request. (required)
5419 zone: string, The name of the zone for this request. (required)
5420 instance: string, Name of the instance scoping this request. (required)
5421
5422Returns:
5423 An object of the form:
5424
5425 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005426 #
5427 # Google Compute Engine has three Operation resources:
5428 #
5429 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5430 #
5431 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5432 #
5433 # Operations can be global, regional or zonal.
5434 # - For global operations, use the `globalOperations` resource.
5435 # - For regional operations, use the `regionOperations` resource.
5436 # - For zonal operations, use the `zonalOperations` resource.
5437 #
5438 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5439 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5440 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5441 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5442 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5443 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5444 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005445 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005446 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5447 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5448 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005449 },
5450 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005451 },
5452 &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`.
5453 &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.
5454 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5455 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5456 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5457 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005458 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005459 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5460 &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.
5461 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5462 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5463 &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.
5464 &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`.
5465 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5466 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5467 &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.
5468 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5469 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5470 {
5471 &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.
5472 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5473 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5474 {
5475 &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).
5476 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5477 },
5478 ],
5479 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5480 },
5481 ],
5482 &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.
5483}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005484</div>
5485
5486<div class="method">
5487 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
5488 <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 -07005489
5490Args:
5491 project: string, Project ID for this request. (required)
5492 zone: string, The name of the zone for this request. (required)
5493 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005494 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.
5495
5496For 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.
5497
5498The 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 -07005499
5500Returns:
5501 An object of the form:
5502
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005503 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005504 #
5505 # Google Compute Engine has three Operation resources:
5506 #
5507 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5508 #
5509 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5510 #
5511 # Operations can be global, regional or zonal.
5512 # - For global operations, use the `globalOperations` resource.
5513 # - For regional operations, use the `regionOperations` resource.
5514 # - For zonal operations, use the `zonalOperations` resource.
5515 #
5516 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5517 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5518 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5519 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5520 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5521 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5522 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005523 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005524 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5525 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5526 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005527 },
5528 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005529 },
5530 &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`.
5531 &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.
5532 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5533 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5534 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5535 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005536 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005537 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5538 &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.
5539 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5540 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5541 &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.
5542 &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`.
5543 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5544 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5545 &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.
5546 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5547 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5548 {
5549 &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.
5550 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5551 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5552 {
5553 &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).
5554 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5555 },
5556 ],
5557 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5558 },
5559 ],
5560 &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.
5561}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005562</div>
5563
5564<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005565 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005566 <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 -07005567
5568Args:
5569 project: string, Project ID for this request. (required)
5570 zone: string, The name of the zone for this request. (required)
5571 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005572 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005573 The object takes the form of:
5574
5575{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005576 &quot;disks&quot;: [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
5577 #
5578 # In order to start the instance, the disk url and its corresponding key must be provided.
5579 #
5580 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
5581 {
5582 &quot;diskEncryptionKey&quot;: { # Decrypts data associated with the disk with a customer-supplied encryption key.
5583 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5584 &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.
5585 &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.
5586 &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.
5587 #
5588 # The key must meet the following requirements before you can provide it to Compute Engine:
5589 # - The key is wrapped using a RSA public key certificate provided by Google.
5590 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5591 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5592 &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 -07005593 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005594 &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.
5595 },
5596 ],
5597}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005598
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005599 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.
5600
5601For 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.
5602
5603The 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 -07005604
5605Returns:
5606 An object of the form:
5607
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005608 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005609 #
5610 # Google Compute Engine has three Operation resources:
5611 #
5612 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5613 #
5614 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5615 #
5616 # Operations can be global, regional or zonal.
5617 # - For global operations, use the `globalOperations` resource.
5618 # - For regional operations, use the `regionOperations` resource.
5619 # - For zonal operations, use the `zonalOperations` resource.
5620 #
5621 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5622 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5623 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5624 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5625 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5626 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5627 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005628 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005629 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5630 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5631 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005632 },
5633 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005634 },
5635 &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`.
5636 &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.
5637 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5638 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5639 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5640 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005641 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005642 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5643 &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.
5644 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5645 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5646 &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.
5647 &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`.
5648 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5649 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5650 &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.
5651 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5652 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5653 {
5654 &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.
5655 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5656 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5657 {
5658 &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).
5659 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5660 },
5661 ],
5662 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5663 },
5664 ],
5665 &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.
5666}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005667</div>
5668
5669<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005670 <code class="details" id="stop">stop(project, zone, instance, requestId=None)</code>
5671 <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 -07005672
5673Args:
5674 project: string, Project ID for this request. (required)
5675 zone: string, The name of the zone for this request. (required)
5676 instance: string, Name of the instance resource to stop. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005677 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.
5678
5679For 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.
5680
5681The 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 -07005682
5683Returns:
5684 An object of the form:
5685
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005686 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005687 #
5688 # Google Compute Engine has three Operation resources:
5689 #
5690 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5691 #
5692 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5693 #
5694 # Operations can be global, regional or zonal.
5695 # - For global operations, use the `globalOperations` resource.
5696 # - For regional operations, use the `regionOperations` resource.
5697 # - For zonal operations, use the `zonalOperations` resource.
5698 #
5699 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5700 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5701 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5702 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5703 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5704 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5705 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005706 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005707 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5708 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5709 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005710 },
5711 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005712 },
5713 &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`.
5714 &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.
5715 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5716 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5717 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5718 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005719 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005720 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5721 &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.
5722 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5723 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5724 &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.
5725 &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`.
5726 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5727 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5728 &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.
5729 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5730 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5731 {
5732 &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.
5733 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5734 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5735 {
5736 &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).
5737 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5738 },
5739 ],
5740 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5741 },
5742 ],
5743 &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.
5744}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005745</div>
5746
5747<div class="method">
5748 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
5749 <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.
5750
5751Args:
5752 project: string, Project ID for this request. (required)
5753 zone: string, The name of the zone for this request. (required)
5754 instance: string, Name of the instance resource to suspend. (required)
5755 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
5756 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.
5757
5758For 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.
5759
5760The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5761
5762Returns:
5763 An object of the form:
5764
5765 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005766 #
5767 # Google Compute Engine has three Operation resources:
5768 #
5769 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5770 #
5771 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5772 #
5773 # Operations can be global, regional or zonal.
5774 # - For global operations, use the `globalOperations` resource.
5775 # - For regional operations, use the `regionOperations` resource.
5776 # - For zonal operations, use the `zonalOperations` resource.
5777 #
5778 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5779 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5780 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5781 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5782 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5783 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5784 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07005785 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005786 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5787 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5788 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07005789 },
5790 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005791 },
5792 &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`.
5793 &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.
5794 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5795 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5796 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5797 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005798 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005799 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5800 &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.
5801 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5802 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5803 &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.
5804 &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`.
5805 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5806 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5807 &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.
5808 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5809 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5810 {
5811 &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.
5812 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5813 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5814 {
5815 &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).
5816 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5817 },
5818 ],
5819 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5820 },
5821 ],
5822 &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.
5823}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005824</div>
5825
5826<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005827 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005828 <pre>Returns permissions that a caller has on the specified resource.
5829
5830Args:
5831 project: string, Project ID for this request. (required)
5832 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005833 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005834 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005835 The object takes the form of:
5836
5837{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005838 &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.
5839 &quot;A String&quot;,
5840 ],
5841}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005842
5843
5844Returns:
5845 An object of the form:
5846
5847 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08005848 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
5849 &quot;A String&quot;,
5850 ],
5851}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005852</div>
5853
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005854<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07005855 <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 -07005856 <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.
5857
5858Args:
5859 project: string, Project ID for this request. (required)
5860 zone: string, The name of the zone for this request. (required)
5861 instance: string, Name of the instance resource to update. (required)
5862 body: object, The request body.
5863 The object takes the form of:
5864
5865{ # Represents an Instance resource.
5866 #
5867 # 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 ==)
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005868 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
5869 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
Anthonios Partheniou10f4b672021-04-13 14:47:53 -04005870 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005871 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005872 &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 -07005873 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
5874 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
5875 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005876 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
5877 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
5878 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
5879 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
5880 &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 -07005881 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07005882 &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).
5883 &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.
5884 &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.
5885 #
5886 # 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 -07005887 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07005888 #
5889 # 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.
5890 #
5891 # 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.
5892 #
5893 # 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.
5894 #
5895 # 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 -07005896 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5897 &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.
5898 &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.
5899 &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 -07005900 #
5901 # The key must meet the following requirements before you can provide it to Compute Engine:
5902 # - The key is wrapped using a RSA public key certificate provided by Google.
5903 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5904 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07005905 &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 -07005906 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005907 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
5908 &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.
5909 { # Guest OS features.
5910 &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.
5911 },
5912 ],
5913 &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.
5914 &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 -07005915 #
5916 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
5917 #
5918 # 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 -07005919 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
5920 &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.
5921 &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.
5922 &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 -07005923 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
5924 #
5925 #
5926 # 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:
5927 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
5928 # - projects/project/zones/zone/diskTypes/diskType
5929 # - 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 -07005930 &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 -07005931 #
5932 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
5933 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07005934 &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 -07005935 },
5936 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005937 &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.
5938 &quot;a_key&quot;: &quot;A String&quot;,
5939 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005940 &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 -07005941 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08005942 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07005943 &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.
5944 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07005945 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005946 &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 -07005947 #
5948 # 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:
5949 # projects/debian-cloud/global/images/family/debian-9
5950 #
5951 #
5952 # Alternatively, use a specific version of a public operating system image:
5953 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
5954 #
5955 #
5956 # To create a disk with a custom image that you created, specify the image name in the following format:
5957 # global/images/my-custom-image
5958 #
5959 #
5960 # 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:
5961 # global/images/family/my-image-family
5962 #
5963 #
5964 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005965 &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 -07005966 #
5967 # 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.
5968 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5969 &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.
5970 &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.
5971 &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 -07005972 #
5973 # The key must meet the following requirements before you can provide it to Compute Engine:
5974 # - The key is wrapped using a RSA public key certificate provided by Google.
5975 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5976 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07005977 &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.
5978 },
5979 &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.
5980 #
5981 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
5982 # global/snapshots/my-backup
5983 #
5984 #
5985 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005986 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07005987 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5988 &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.
5989 &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.
5990 &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.
5991 #
5992 # The key must meet the following requirements before you can provide it to Compute Engine:
5993 # - The key is wrapped using a RSA public key certificate provided by Google.
5994 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5995 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5996 &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 -07005997 },
5998 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005999 &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.
6000 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
6001 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
6002 &quot;A String&quot;,
6003 ],
6004 &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.
6005 &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
6006 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07006007 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006008 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6009 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07006010 },
6011 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006012 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07006013 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006014 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6015 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07006016 },
6017 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006018 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07006019 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006020 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6021 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07006022 },
6023 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006024 &quot;pk&quot;: { # The Platform Key (PK).
6025 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6026 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07006027 },
6028 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006029 &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 -07006030 #
6031 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
6032 #
6033 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07006034 &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 -07006035 },
6036 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006037 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
6038 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
6039 },
6040 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
6041 &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.
6042 #
6043 # To see the latest fingerprint, make get() request to the instance.
6044 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
6045 { # A specification of the type and number of accelerator cards attached to the instance.
6046 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
6047 &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.
6048 },
6049 ],
6050 &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.
6051 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
6052 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
6053 &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.
6054 #
6055 # To see the latest fingerprint, make get() request to the instance.
6056 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
6057 &quot;a_key&quot;: &quot;A String&quot;,
6058 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07006059 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
6060 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
6061 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07006062 &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:
6063 # zones/us-central1-f/machineTypes/n1-standard-1
6064 #
6065 #
6066 # 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):
6067 # zones/zone/machineTypes/custom-CPUS-MEMORY
6068 #
6069 #
6070 # For example: zones/us-central1-f/machineTypes/custom-4-5120
6071 #
6072 # For a full list of restrictions, read the Specifications for custom machine types.
6073 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
6074 &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.
6075 #
6076 # To see the latest fingerprint, make a get() request to retrieve the resource.
6077 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
6078 {
6079 &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.
6080 &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).
6081 },
6082 ],
6083 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
6084 },
6085 &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;.
6086 &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.
6087 &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.
6088 { # A network interface resource attached to an instance.
6089 &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.
6090 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6091 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6092 &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.
6093 &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.
6094 &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.
6095 #
6096 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6097 #
6098 # 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.
6099 &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.
6100 &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.
6101 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
6102 },
6103 ],
6104 &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.
6105 { # An alias IP range attached to an instance&#x27;s network interface.
6106 &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).
6107 &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.
6108 },
6109 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07006110 &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. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Bu Sun Kim65020912020-05-20 12:08:20 -07006111 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
6112 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
6113 &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.
6114 &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.
6115 #
6116 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6117 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6118 # - projects/project/global/networks/network
6119 # - global/networks/default
6120 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006121 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
Bu Sun Kim65020912020-05-20 12:08:20 -07006122 &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:
6123 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6124 # - regions/region/subnetworks/subnetwork
6125 },
6126 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006127 &quot;networkPerformanceConfig&quot;: {
6128 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
6129 },
yoshi-code-bota8b35b92021-03-31 13:33:30 -07006130 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006131 &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.
6132 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
6133 &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.
6134 &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.
6135 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
6136 &quot;A String&quot;,
6137 ],
6138 },
6139 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
6140 &quot;A String&quot;,
6141 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006142 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07006143 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006144 &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.
6145 #
6146 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006147 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
yoshi-code-bot9e2cde22021-04-29 03:48:05 -07006148 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after VM instance creation where the VM won&#x27;t be scheduled for maintenance.
6149 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # For more information about maintenance intervals, see Setting maintenance intervals.
Bu Sun Kim65020912020-05-20 12:08:20 -07006150 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
6151 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
6152 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
6153 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
6154 &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.
6155 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
6156 &quot;A String&quot;,
6157 ],
6158 },
6159 ],
6160 &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 -07006161 &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 -07006162 },
6163 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
6164 &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.
6165 #
6166 # 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.
6167 { # A service account.
6168 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
6169 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
6170 &quot;A String&quot;,
6171 ],
6172 },
6173 ],
6174 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
6175 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
6176 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
6177 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
6178 },
6179 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
6180 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
6181 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006182 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07006183 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
6184 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
6185 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
6186 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006187 &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 -07006188 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
6189 },
6190 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
yoshi-code-bota8b35b92021-03-31 13:33:30 -07006191 &quot;sourceMachineImageEncryptionKey&quot;: { # Source machine image encryption key when creating an instance from a machine image.
Bu Sun Kim65020912020-05-20 12:08:20 -07006192 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6193 &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.
6194 &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.
6195 &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.
6196 #
6197 # The key must meet the following requirements before you can provide it to Compute Engine:
6198 # - The key is wrapped using a RSA public key certificate provided by Google.
6199 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6200 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6201 &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.
6202 },
6203 &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 Kim673ec5c2020-11-16 11:05:03 -07006204 &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. For more information about the status of the instance, see Instance life cycle.
Bu Sun Kim65020912020-05-20 12:08:20 -07006205 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
6206 &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.
6207 &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.
6208 #
6209 # To see the latest fingerprint, make get() request to the instance.
6210 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
6211 &quot;A String&quot;,
6212 ],
6213 },
6214 &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 -07006215}
6216
6217 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.
6218 Allowed values
6219 INVALID -
6220 NO_EFFECT -
6221 REFRESH -
6222 RESTART -
Bu Sun Kim65020912020-05-20 12:08:20 -07006223 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.
6224 Allowed values
6225 INVALID -
6226 NO_EFFECT -
6227 REFRESH -
6228 RESTART -
Dan O'Mearadd494642020-05-01 07:42:23 -07006229 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.
6230
6231For 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.
6232
6233The 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 -07006234
6235Returns:
6236 An object of the form:
6237
6238 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006239 #
6240 # Google Compute Engine has three Operation resources:
6241 #
6242 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6243 #
6244 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6245 #
6246 # Operations can be global, regional or zonal.
6247 # - For global operations, use the `globalOperations` resource.
6248 # - For regional operations, use the `regionOperations` resource.
6249 # - For zonal operations, use the `zonalOperations` resource.
6250 #
6251 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
6252 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6253 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6254 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6255 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6256 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6257 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07006258 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006259 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6260 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6261 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07006262 },
6263 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006264 },
6265 &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`.
6266 &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.
6267 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6268 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6269 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6270 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006271 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006272 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6273 &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.
6274 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6275 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6276 &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.
6277 &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`.
6278 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6279 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6280 &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.
6281 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6282 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6283 {
6284 &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.
6285 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6286 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6287 {
6288 &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).
6289 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6290 },
6291 ],
6292 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6293 },
6294 ],
6295 &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.
6296}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07006297</div>
6298
6299<div class="method">
6300 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07006301 <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 -07006302
6303Args:
6304 project: string, Project ID for this request. (required)
6305 zone: string, The name of the zone for this request. (required)
6306 instance: string, The instance name for this request. (required)
6307 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006308 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006309 The object takes the form of:
6310
Bu Sun Kim65020912020-05-20 12:08:20 -07006311{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6312 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6313 &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.
6314 &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.
6315 &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 -07006316 #
6317 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6318 #
6319 # 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 -07006320 &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.
6321 &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.
6322 &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 -07006323}
6324
6325 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.
6326
6327For 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.
6328
6329The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6330
6331Returns:
6332 An object of the form:
6333
6334 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006335 #
6336 # Google Compute Engine has three Operation resources:
6337 #
6338 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6339 #
6340 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6341 #
6342 # Operations can be global, regional or zonal.
6343 # - For global operations, use the `globalOperations` resource.
6344 # - For regional operations, use the `regionOperations` resource.
6345 # - For zonal operations, use the `zonalOperations` resource.
6346 #
6347 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
6348 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6349 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6350 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6351 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6352 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6353 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07006354 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006355 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6356 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6357 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07006358 },
6359 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006360 },
6361 &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`.
6362 &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.
6363 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6364 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6365 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6366 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006367 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006368 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6369 &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.
6370 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6371 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6372 &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.
6373 &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`.
6374 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6375 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6376 &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.
6377 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6378 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6379 {
6380 &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.
6381 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6382 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6383 {
6384 &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).
6385 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6386 },
6387 ],
6388 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6389 },
6390 ],
6391 &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.
6392}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006393</div>
6394
6395<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006396 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006397 <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.
6398
6399Args:
6400 project: string, Project ID for this request. (required)
6401 zone: string, The name of the zone for this request. (required)
6402 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006403 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006404 The object takes the form of:
6405
6406{ # A set of Display Device options
Bu Sun Kim65020912020-05-20 12:08:20 -07006407 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006408}
6409
6410 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.
6411
6412For 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.
6413
6414The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6415
6416Returns:
6417 An object of the form:
6418
6419 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006420 #
6421 # Google Compute Engine has three Operation resources:
6422 #
6423 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6424 #
6425 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6426 #
6427 # Operations can be global, regional or zonal.
6428 # - For global operations, use the `globalOperations` resource.
6429 # - For regional operations, use the `regionOperations` resource.
6430 # - For zonal operations, use the `zonalOperations` resource.
6431 #
6432 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
6433 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6434 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6435 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6436 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6437 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6438 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07006439 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006440 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6441 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6442 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07006443 },
6444 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006445 },
6446 &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`.
6447 &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.
6448 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6449 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6450 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6451 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006452 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006453 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6454 &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.
6455 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6456 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6457 &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.
6458 &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`.
6459 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6460 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6461 &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.
6462 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6463 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6464 {
6465 &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.
6466 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6467 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6468 {
6469 &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).
6470 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6471 },
6472 ],
6473 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6474 },
6475 ],
6476 &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.
6477}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006478</div>
6479
6480<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006481 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006482 <pre>Updates an instance&#x27;s network interface. This method can only update an interface&#x27;s alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006483
6484Args:
6485 project: string, Project ID for this request. (required)
6486 zone: string, The name of the zone for this request. (required)
6487 instance: string, The instance name for this request. (required)
6488 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006489 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006490 The object takes the form of:
6491
6492{ # A network interface resource attached to an instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006493 &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.
6494 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6495 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6496 &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.
6497 &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.
6498 &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 -07006499 #
6500 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6501 #
6502 # 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 -07006503 &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.
6504 &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.
6505 &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 -07006506 },
6507 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006508 &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.
6509 { # An alias IP range attached to an instance&#x27;s network interface.
6510 &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).
6511 &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.
6512 },
6513 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07006514 &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. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Bu Sun Kim65020912020-05-20 12:08:20 -07006515 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
6516 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
6517 &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.
6518 &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 -07006519 #
6520 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6521 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6522 # - projects/project/global/networks/network
6523 # - global/networks/default
Bu Sun Kim65020912020-05-20 12:08:20 -07006524 &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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006525 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
Bu Sun Kim65020912020-05-20 12:08:20 -07006526 &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:
6527 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6528 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006529}
6530
6531 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.
6532
6533For 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.
6534
6535The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6536
6537Returns:
6538 An object of the form:
6539
6540 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006541 #
6542 # Google Compute Engine has three Operation resources:
6543 #
6544 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6545 #
6546 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6547 #
6548 # Operations can be global, regional or zonal.
6549 # - For global operations, use the `globalOperations` resource.
6550 # - For regional operations, use the `regionOperations` resource.
6551 # - For zonal operations, use the `zonalOperations` resource.
6552 #
6553 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
6554 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6555 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6556 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6557 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6558 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6559 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07006560 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006561 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6562 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6563 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07006564 },
6565 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006566 },
6567 &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`.
6568 &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.
6569 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6570 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6571 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6572 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006573 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006574 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6575 &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.
6576 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6577 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6578 &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.
6579 &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`.
6580 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6581 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6582 &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.
6583 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6584 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6585 {
6586 &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.
6587 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6588 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6589 {
6590 &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).
6591 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6592 },
6593 ],
6594 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6595 },
6596 ],
6597 &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.
6598}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006599</div>
6600
6601<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006602 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006603 <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.
6604
6605Args:
6606 project: string, Project ID for this request. (required)
6607 zone: string, The name of the zone for this request. (required)
6608 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006609 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006610 The object takes the form of:
6611
6612{ # A set of Shielded Instance options.
Bu Sun Kim65020912020-05-20 12:08:20 -07006613 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
6614 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
6615 &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 -07006616}
6617
6618 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.
6619
6620For 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.
6621
6622The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6623
6624Returns:
6625 An object of the form:
6626
6627 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006628 #
6629 # Google Compute Engine has three Operation resources:
6630 #
6631 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6632 #
6633 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6634 #
6635 # Operations can be global, regional or zonal.
6636 # - For global operations, use the `globalOperations` resource.
6637 # - For regional operations, use the `regionOperations` resource.
6638 # - For zonal operations, use the `zonalOperations` resource.
6639 #
6640 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
6641 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6642 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6643 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6644 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6645 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6646 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07006647 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006648 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6649 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6650 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07006651 },
6652 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006653 },
6654 &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`.
6655 &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.
6656 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6657 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6658 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6659 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006660 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006661 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6662 &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.
6663 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6664 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6665 &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.
6666 &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`.
6667 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6668 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6669 &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.
6670 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6671 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6672 {
6673 &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.
6674 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6675 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6676 {
6677 &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).
6678 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6679 },
6680 ],
6681 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6682 },
6683 ],
6684 &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.
6685}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006686</div>
6687
6688<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006689 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006690 <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.
6691
6692Args:
6693 project: string, Project ID for this request. (required)
6694 zone: string, The name of the zone for this request. (required)
6695 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006696 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006697 The object takes the form of:
6698
6699{ # A set of Shielded VM options.
Bu Sun Kim65020912020-05-20 12:08:20 -07006700 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
6701 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
6702 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006703}
6704
6705 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.
6706
6707For 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.
6708
6709The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6710
6711Returns:
6712 An object of the form:
6713
6714 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006715 #
6716 # Google Compute Engine has three Operation resources:
6717 #
6718 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6719 #
6720 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6721 #
6722 # Operations can be global, regional or zonal.
6723 # - For global operations, use the `globalOperations` resource.
6724 # - For regional operations, use the `regionOperations` resource.
6725 # - For zonal operations, use the `zonalOperations` resource.
6726 #
6727 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
6728 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6729 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6730 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6731 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6732 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6733 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07006734 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006735 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6736 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6737 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07006738 },
6739 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006740 },
6741 &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`.
6742 &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.
6743 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6744 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6745 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6746 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08006747 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08006748 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6749 &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.
6750 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6751 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6752 &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.
6753 &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`.
6754 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6755 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6756 &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.
6757 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6758 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6759 {
6760 &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.
6761 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6762 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6763 {
6764 &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).
6765 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6766 },
6767 ],
6768 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6769 },
6770 ],
6771 &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.
6772}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006773</div>
6774
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006775</body></html>