blob: 8dc94efab2318ab43a7dc44e374e7fe322344552 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<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">
Bu Sun Kim65020912020-05-20 12:08:20 -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">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
101<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400102 <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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400105 <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">
111 <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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700118<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
119<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">
Bu Sun Kim65020912020-05-20 12:08:20 -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">
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 <code><a href="#listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -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 instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148<p class="firstline">Removes resource policies from an instance.</p>
149<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400150 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<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>
152<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700158<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400159 <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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700163<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
164<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700167<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>
179<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 <code><a href="#setName">setName(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700181<p class="firstline">Sets name of an instance.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400182<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700188<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>
191<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>
194<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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400198 <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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700203<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700206<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400207 <code><a href="#stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208<p class="firstline">Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700209<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400210 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700211<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>
212<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>
215<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>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400224<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>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400226<p class="firstline">Updates an instance's network 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;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
256 &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.
257 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
258 &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.
259 &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 -0700260}
261
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700262 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.
263
264For 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.
265
266The 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 -0700267
268Returns:
269 An object of the form:
270
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 { # Represents an Operation resource.
272 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700273 # Google Compute Engine has three Operation resources:
274 #
275 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
276 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
278 #
279 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700280 # - For global operations, use the `globalOperations` resource.
281 # - For regional operations, use the `regionOperations` resource.
282 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700284 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
286 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
287 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
288 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
289 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
290 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
293 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
294 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 },
296 ],
297 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &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`.
299 &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.
300 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
301 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
302 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
303 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
304 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
305 &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.
306 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
307 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
308 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
309 &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.
310 &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`.
311 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
312 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
313 &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.
314 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
315 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
316 {
317 &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.
318 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
319 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
320 {
321 &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).
322 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
323 },
324 ],
325 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
326 },
327 ],
328 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700329 }</pre>
330</div>
331
332<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700333 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 <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.
335
336Args:
337 project: string, Project ID for this request. (required)
338 zone: string, The name of the zone for this request. (required)
339 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 The object takes the form of:
342
343{
Bu Sun Kim65020912020-05-20 12:08:20 -0700344 &quot;resourcePolicies&quot;: [ # Resource policies to be added to this instance.
345 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 ],
347 }
348
349 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.
350
351For 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.
352
353The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
354
355Returns:
356 An object of the form:
357
358 { # Represents an Operation resource.
359 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700360 # Google Compute Engine has three Operation resources:
361 #
362 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
363 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700364 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
365 #
366 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700367 # - For global operations, use the `globalOperations` resource.
368 # - For regional operations, use the `regionOperations` resource.
369 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700371 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
373 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
374 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
375 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
376 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
377 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700378 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
380 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
381 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700382 },
383 ],
384 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700385 &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`.
386 &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.
387 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
388 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
389 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
390 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
391 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
392 &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.
393 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
394 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
395 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
396 &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.
397 &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`.
398 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
399 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
400 &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.
401 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
402 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
403 {
404 &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.
405 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
406 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
407 {
408 &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).
409 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
410 },
411 ],
412 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
413 },
414 ],
415 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700416 }</pre>
417</div>
418
419<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700420 <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 -0700421 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700422
423Args:
424 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 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 -0700426
Dan O'Mearadd494642020-05-01 07:42:23 -0700427For 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 -0700428
Dan O'Mearadd494642020-05-01 07:42:23 -0700429You 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 -0700430
Bu Sun Kim65020912020-05-20 12:08:20 -0700431To 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 -0700432 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 -0700433 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`)
434 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
435
436You 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.
437
438Currently, only sorting by `name` or `creationTimestamp desc` is supported.
439 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.
440 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700441
442Returns:
443 An object of the form:
444
445 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
447 &quot;items&quot;: { # An object that contains a list of instances scoped by zone.
448 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of instances.
449 &quot;instances&quot;: [ # [Output Only] A list of instances contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 { # Represents an Instance resource.
451 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700452 # 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 ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700453 &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.
454 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
455 &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.
456 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &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.
458 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
459 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
462 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
463 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
464 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
465 &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 -0700466 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &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).
468 &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.
469 &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.
470 #
471 # 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 -0700472 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700473 #
474 # 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.
475 #
476 # 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.
477 #
478 # 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.
479 #
480 # 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 -0700481 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
482 &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.
483 &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.
484 &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 -0700485 #
486 # The key must meet the following requirements before you can provide it to Compute Engine:
487 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700488 # - 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 -0700489 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700490 &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 -0700491 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700492 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
493 &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.
494 { # Guest OS features.
495 &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.
496 },
497 ],
498 &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.
499 &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 -0700500 #
501 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
502 #
503 # 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 -0700504 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
505 &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.
506 &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.
507 &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 -0700508 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
509 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700510 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700511 # 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:
512 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
513 # - projects/project/zones/zone/diskTypes/diskType
514 # - 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 -0700515 &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 -0700516 #
517 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
518 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &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 -0700520 },
521 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 &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.
523 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700524 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700525 &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 -0700526 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700527 &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 -0700528 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
529 &quot;A String&quot;,
530 ],
531 &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.
532 &quot;A String&quot;,
533 ],
534 &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 -0700535 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 # 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:
537 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700538 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700539 #
540 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700541 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700542 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700543 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700544 # To create a disk with a custom image that you created, specify the image name in the following format:
545 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700546 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700547 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 # 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:
549 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700550 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800551 #
552 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700553 &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 -0700554 #
555 # 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.
556 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
557 &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.
558 &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.
559 &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.
560 #
561 # The key must meet the following requirements before you can provide it to Compute Engine:
562 # - The key is wrapped using a RSA public key certificate provided by Google.
563 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
564 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
565 &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.
566 },
567 &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.
568 #
569 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
570 # global/snapshots/my-backup
571 #
572 #
573 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700574 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
576 &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.
577 &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.
578 &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.
579 #
580 # The key must meet the following requirements before you can provide it to Compute Engine:
581 # - The key is wrapped using a RSA public key certificate provided by Google.
582 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
583 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
584 &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 -0700585 },
586 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &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.
588 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
589 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
590 &quot;A String&quot;,
591 ],
592 &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.
593 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
594 &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
595 &quot;dbs&quot;: [ # The Key Database (db).
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;dbxs&quot;: [ # The forbidden key database (dbx).
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;keks&quot;: [ # The Key Exchange Key (KEK).
608 {
609 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
610 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
611 },
612 ],
613 &quot;pk&quot;: { # The Platform Key (PK).
614 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
615 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700617 },
618 &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 -0800619 #
620 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
621 #
622 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700623 &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 -0700624 },
625 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
627 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -0700628 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
630 &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.
631 #
632 # To see the latest fingerprint, make get() request to the instance.
633 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
634 { # A specification of the type and number of accelerator cards attached to the instance.
635 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
636 &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.
637 },
638 ],
639 &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.
640 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700641 &quot;instanceEncryptionKey&quot;: { # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 #
643 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
644 #
645 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
646 #
647 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
648 #
649 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
650 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
651 &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.
652 &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.
653 &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.
654 #
655 # The key must meet the following requirements before you can provide it to Compute Engine:
656 # - The key is wrapped using a RSA public key certificate provided by Google.
657 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
658 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
659 &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.
660 },
661 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
662 &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.
663 #
664 # To see the latest fingerprint, make get() request to the instance.
665 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
666 &quot;a_key&quot;: &quot;A String&quot;,
667 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700668 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
669 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
670 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -0700671 &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:
672 # zones/us-central1-f/machineTypes/n1-standard-1
673 #
674 #
675 # 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):
676 # zones/zone/machineTypes/custom-CPUS-MEMORY
677 #
678 #
679 # For example: zones/us-central1-f/machineTypes/custom-4-5120
680 #
681 # For a full list of restrictions, read the Specifications for custom machine types.
682 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
683 &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.
684 #
685 # To see the latest fingerprint, make a get() request to retrieve the resource.
686 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
687 {
688 &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.
689 &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).
690 },
691 ],
692 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
693 },
694 &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;.
695 &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.
696 &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.
697 { # A network interface resource attached to an instance.
698 &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.
699 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
700 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
701 &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.
702 &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.
703 &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.
704 #
705 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
706 #
707 # 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.
708 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
709 &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.
710 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
711 &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.
712 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
713 },
714 ],
715 &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.
716 { # An alias IP range attached to an instance&#x27;s network interface.
717 &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).
718 &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.
719 },
720 ],
721 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
722 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
723 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
724 &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.
725 &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.
726 #
727 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
728 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
729 # - projects/project/global/networks/network
730 # - global/networks/default
731 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700732 &quot;queueCount&quot;: 42, # The networking queue count for the network interface. Both Rx and Tx queues will be set to this number. If it&#x27;s not specified by the user, a default number of queues will be assigned. For Virtio-net, each interface will get (min(#vCPU, 32) / #vNIC) queues. For gVNIC, each interface will get (min(#vCPU / 2, 16) / #vNIC) qeueus.
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 &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:
734 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
735 # - regions/region/subnetworks/subnetwork
736 },
737 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700738 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
740 &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.
741 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
742 &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.
743 &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.
744 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
745 &quot;A String&quot;,
746 ],
747 },
748 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
749 &quot;A String&quot;,
750 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700751 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
752 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 &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.
754 #
755 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
756 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
757 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700758 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
760 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
761 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
762 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
763 &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.
764 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
765 &quot;A String&quot;,
766 ],
767 },
768 ],
769 &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 -0700770 &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 -0700771 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700772 &quot;secureLabels&quot;: [ # Secure labels to apply to this instance. These can be later modified by the update method. Maximum number of secure labels allowed is 300.
773 &quot;A String&quot;,
774 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700775 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
776 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
777 &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.
778 #
779 # 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.
780 { # A service account.
781 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
782 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
783 &quot;A String&quot;,
784 ],
785 },
786 ],
787 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
788 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
789 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
790 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
791 },
792 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
793 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
794 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700795 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -0700796 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
797 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
798 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
799 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700800 &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 -0700801 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
802 },
803 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700804 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700805 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
806 &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.
807 &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.
808 &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.
809 #
810 # The key must meet the following requirements before you can provide it to Compute Engine:
811 # - The key is wrapped using a RSA public key certificate provided by Google.
812 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
813 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
814 &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.
815 },
816 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700817 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -0700818 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
819 &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.
820 &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.
821 #
822 # To see the latest fingerprint, make get() request to the instance.
823 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
824 &quot;A String&quot;,
825 ],
826 },
827 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700828 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
829 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
831 },
832 &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 -0700833 },
834 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700835 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
836 &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.
837 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
838 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700839 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 &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).
841 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700842 },
843 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700844 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700845 },
846 },
847 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 &quot;kind&quot;: &quot;compute#instanceAggregatedList&quot;, # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
849 &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.
850 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
851 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
852 &quot;A String&quot;,
853 ],
854 &quot;warning&quot;: { # [Output Only] Informational warning message.
855 &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.
856 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
857 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700858 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 &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).
860 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 },
862 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700863 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700865 }</pre>
866</div>
867
868<div class="method">
869 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
870 <pre>Retrieves the next page of results.
871
872Args:
873 previous_request: The request for the previous page. (required)
874 previous_response: The response from the request for the previous page. (required)
875
876Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700878 page. Returns None if there are no more items in the collection.
879 </pre>
880</div>
881
882<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700883 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400884 <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 -0700885
886Args:
887 project: string, Project ID for this request. (required)
888 zone: string, The name of the zone for this request. (required)
889 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700890 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700891 The object takes the form of:
892
893{ # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &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).
895 &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.
896 &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.
897 #
898 # 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 -0700899 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700900 #
901 # 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.
902 #
903 # 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.
904 #
905 # 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.
906 #
907 # 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 -0700908 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
909 &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.
910 &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.
911 &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 -0700912 #
913 # The key must meet the following requirements before you can provide it to Compute Engine:
914 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 # - 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 -0700916 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 &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 -0700918 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700919 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
920 &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.
921 { # Guest OS features.
922 &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.
923 },
924 ],
925 &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.
926 &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 -0700927 #
928 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
929 #
930 # 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 -0700931 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
932 &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.
933 &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.
934 &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 -0700935 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
936 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700937 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700938 # 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:
939 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
940 # - projects/project/zones/zone/diskTypes/diskType
941 # - 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 -0700942 &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 -0700943 #
944 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
945 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700946 &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 -0700947 },
948 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 &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.
950 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700952 &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 -0700953 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700954 &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 -0700955 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
956 &quot;A String&quot;,
957 ],
958 &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.
959 &quot;A String&quot;,
960 ],
961 &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 -0700962 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700963 # 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:
964 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700965 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700966 #
967 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700968 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700969 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700970 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700971 # To create a disk with a custom image that you created, specify the image name in the following format:
972 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700973 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700974 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 # 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:
976 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700977 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800978 #
979 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700980 &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 -0700981 #
982 # 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.
983 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
984 &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.
985 &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.
986 &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.
987 #
988 # The key must meet the following requirements before you can provide it to Compute Engine:
989 # - The key is wrapped using a RSA public key certificate provided by Google.
990 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
991 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
992 &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.
993 },
994 &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.
995 #
996 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
997 # global/snapshots/my-backup
998 #
999 #
1000 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001001 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07001002 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1003 &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.
1004 &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.
1005 &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.
1006 #
1007 # The key must meet the following requirements before you can provide it to Compute Engine:
1008 # - The key is wrapped using a RSA public key certificate provided by Google.
1009 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1010 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1011 &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 -07001012 },
1013 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001014 &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.
1015 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1016 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1017 &quot;A String&quot;,
1018 ],
1019 &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.
1020 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
1021 &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
1022 &quot;dbs&quot;: [ # The Key Database (db).
1023 {
1024 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1025 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1026 },
1027 ],
1028 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1029 {
1030 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1031 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1032 },
1033 ],
1034 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1035 {
1036 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1037 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1038 },
1039 ],
1040 &quot;pk&quot;: { # The Platform Key (PK).
1041 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1042 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001043 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001044 },
1045 &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 -08001046 #
1047 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1048 #
1049 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001050 &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 -07001051}
1052
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001053 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 -07001054 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.
1055
1056For 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.
1057
1058The 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 -07001059
1060Returns:
1061 An object of the form:
1062
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001063 { # Represents an Operation resource.
1064 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001065 # Google Compute Engine has three Operation resources:
1066 #
1067 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1068 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001069 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1070 #
1071 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001072 # - For global operations, use the `globalOperations` resource.
1073 # - For regional operations, use the `regionOperations` resource.
1074 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001075 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001076 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001077 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1078 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1079 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1080 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1081 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1082 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001083 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001084 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1085 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1086 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07001087 },
1088 ],
1089 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001090 &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`.
1091 &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.
1092 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1093 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1094 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1095 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1096 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1097 &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.
1098 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1099 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1100 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1101 &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.
1102 &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`.
1103 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1104 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1105 &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.
1106 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1107 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1108 {
1109 &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.
1110 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1111 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1112 {
1113 &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).
1114 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1115 },
1116 ],
1117 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1118 },
1119 ],
1120 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Dan O'Mearadd494642020-05-01 07:42:23 -07001121 }</pre>
1122</div>
1123
1124<div class="method">
1125 <code class="details" id="bulkInsert">bulkInsert(project, zone, body=None, requestId=None)</code>
1126 <pre>Creates multiple instances. Count specifies the number of instances to create.
1127
1128Args:
1129 project: string, Project ID for this request. (required)
1130 zone: string, The name of the zone for this request. (required)
1131 body: object, The request body.
1132 The object takes the form of:
1133
1134{
Bu Sun Kim65020912020-05-20 12:08:20 -07001135 &quot;count&quot;: &quot;A String&quot;, # The maximum number of instances to create.
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 &quot;instance&quot;: { # Represents an Instance resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001137 #
1138 # 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 ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001139 &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.
1140 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
1141 &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.
1142 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001143 &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.
1144 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1145 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001146 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001147 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1148 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1149 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1150 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1151 &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 -07001152 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001153 &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).
1154 &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.
1155 &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.
1156 #
1157 # 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 -07001158 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07001159 #
1160 # 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.
1161 #
1162 # 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.
1163 #
1164 # 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.
1165 #
1166 # 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 -07001167 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1168 &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.
1169 &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.
1170 &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 -07001171 #
1172 # The key must meet the following requirements before you can provide it to Compute Engine:
1173 # - The key is wrapped using a RSA public key certificate provided by Google.
1174 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1175 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07001176 &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 -07001177 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001178 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1179 &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.
1180 { # Guest OS features.
1181 &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.
1182 },
1183 ],
1184 &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.
1185 &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 -07001186 #
1187 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1188 #
1189 # 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 -07001190 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1191 &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.
1192 &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.
1193 &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 -07001194 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1195 #
1196 #
1197 # 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:
1198 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1199 # - projects/project/zones/zone/diskTypes/diskType
1200 # - 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 -07001201 &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 -07001202 #
1203 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1204 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001205 &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 -07001206 },
1207 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &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.
1209 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001210 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001211 &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 -07001212 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001213 &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 -07001214 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1215 &quot;A String&quot;,
1216 ],
1217 &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.
1218 &quot;A String&quot;,
1219 ],
1220 &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 -07001221 #
1222 # 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:
1223 # projects/debian-cloud/global/images/family/debian-9
1224 #
1225 #
1226 # Alternatively, use a specific version of a public operating system image:
1227 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1228 #
1229 #
1230 # To create a disk with a custom image that you created, specify the image name in the following format:
1231 # global/images/my-custom-image
1232 #
1233 #
1234 # 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:
1235 # global/images/family/my-image-family
1236 #
1237 #
1238 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001239 &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 -07001240 #
1241 # 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.
1242 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1243 &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.
1244 &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.
1245 &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.
1246 #
1247 # The key must meet the following requirements before you can provide it to Compute Engine:
1248 # - The key is wrapped using a RSA public key certificate provided by Google.
1249 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1250 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1251 &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.
1252 },
1253 &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.
1254 #
1255 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1256 # global/snapshots/my-backup
1257 #
1258 #
1259 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001260 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07001261 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1262 &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.
1263 &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.
1264 &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.
1265 #
1266 # The key must meet the following requirements before you can provide it to Compute Engine:
1267 # - The key is wrapped using a RSA public key certificate provided by Google.
1268 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1269 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1270 &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 -07001271 },
1272 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001273 &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.
1274 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1275 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1276 &quot;A String&quot;,
1277 ],
1278 &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.
1279 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
1280 &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
1281 &quot;dbs&quot;: [ # The Key Database (db).
1282 {
1283 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1284 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1285 },
1286 ],
1287 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1288 {
1289 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1290 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1291 },
1292 ],
1293 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1294 {
1295 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1296 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1297 },
1298 ],
1299 &quot;pk&quot;: { # The Platform Key (PK).
1300 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1301 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001302 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001303 },
1304 &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 -07001305 #
1306 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1307 #
1308 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001309 &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 -07001310 },
1311 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001312 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1313 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001314 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001315 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
1316 &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.
1317 #
1318 # To see the latest fingerprint, make get() request to the instance.
1319 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1320 { # A specification of the type and number of accelerator cards attached to the instance.
1321 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1322 &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.
1323 },
1324 ],
1325 &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.
1326 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001327 &quot;instanceEncryptionKey&quot;: { # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001328 #
1329 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
1330 #
1331 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
1332 #
1333 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
1334 #
1335 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
1336 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1337 &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.
1338 &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.
1339 &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.
1340 #
1341 # The key must meet the following requirements before you can provide it to Compute Engine:
1342 # - The key is wrapped using a RSA public key certificate provided by Google.
1343 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1344 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1345 &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.
1346 },
1347 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1348 &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.
1349 #
1350 # To see the latest fingerprint, make get() request to the instance.
1351 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1352 &quot;a_key&quot;: &quot;A String&quot;,
1353 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001354 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
1355 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
1356 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07001357 &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:
1358 # zones/us-central1-f/machineTypes/n1-standard-1
1359 #
1360 #
1361 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
1362 # zones/zone/machineTypes/custom-CPUS-MEMORY
1363 #
1364 #
1365 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1366 #
1367 # For a full list of restrictions, read the Specifications for custom machine types.
1368 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1369 &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.
1370 #
1371 # To see the latest fingerprint, make a get() request to retrieve the resource.
1372 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1373 {
1374 &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.
1375 &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).
1376 },
1377 ],
1378 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1379 },
1380 &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;.
1381 &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.
1382 &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.
1383 { # A network interface resource attached to an instance.
1384 &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.
1385 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1386 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1387 &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.
1388 &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.
1389 &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.
1390 #
1391 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1392 #
1393 # 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.
1394 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
1395 &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.
1396 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
1397 &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.
1398 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1399 },
1400 ],
1401 &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.
1402 { # An alias IP range attached to an instance&#x27;s network interface.
1403 &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).
1404 &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.
1405 },
1406 ],
1407 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
1408 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1409 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1410 &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.
1411 &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.
1412 #
1413 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1414 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1415 # - projects/project/global/networks/network
1416 # - global/networks/default
1417 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001418 &quot;queueCount&quot;: 42, # The networking queue count for the network interface. Both Rx and Tx queues will be set to this number. If it&#x27;s not specified by the user, a default number of queues will be assigned. For Virtio-net, each interface will get (min(#vCPU, 32) / #vNIC) queues. For gVNIC, each interface will get (min(#vCPU / 2, 16) / #vNIC) qeueus.
Bu Sun Kim65020912020-05-20 12:08:20 -07001419 &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:
1420 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1421 # - regions/region/subnetworks/subnetwork
1422 },
1423 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001424 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001425 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
1426 &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.
1427 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1428 &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.
1429 &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.
1430 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1431 &quot;A String&quot;,
1432 ],
1433 },
1434 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1435 &quot;A String&quot;,
1436 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001437 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
1438 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001439 &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.
1440 #
1441 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1442 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
1443 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001444 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001445 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1446 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1447 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1448 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1449 &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.
1450 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1451 &quot;A String&quot;,
1452 ],
1453 },
1454 ],
1455 &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 -07001456 &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 -07001457 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001458 &quot;secureLabels&quot;: [ # Secure labels to apply to this instance. These can be later modified by the update method. Maximum number of secure labels allowed is 300.
1459 &quot;A String&quot;,
1460 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001461 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1462 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1463 &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.
1464 #
1465 # 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.
1466 { # A service account.
1467 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1468 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1469 &quot;A String&quot;,
1470 ],
1471 },
1472 ],
1473 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1474 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1475 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1476 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1477 },
1478 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
1479 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1480 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001481 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
1483 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
1484 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
1485 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001486 &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 -07001487 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1488 },
1489 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001490 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001491 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1492 &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.
1493 &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.
1494 &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.
1495 #
1496 # The key must meet the following requirements before you can provide it to Compute Engine:
1497 # - The key is wrapped using a RSA public key certificate provided by Google.
1498 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1499 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1500 &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.
1501 },
1502 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001503 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07001504 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
1505 &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.
1506 &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.
1507 #
1508 # To see the latest fingerprint, make get() request to the instance.
1509 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1510 &quot;A String&quot;,
1511 ],
1512 },
1513 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001514 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
1515 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07001516 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
1517 },
1518 &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 -07001519 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001520 &quot;instanceProperties&quot;: { # The instance properties for the request. Required if sourceInstanceTemplate is not provided.
1521 &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.
1522 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
1523 &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.
1524 },
1525 &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.
1526 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options. # Specifies the Confidential Instance options.
1527 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
1528 },
1529 &quot;description&quot;: &quot;A String&quot;, # An optional text description for the instances that are created from these properties.
1530 &quot;disks&quot;: [ # An array of disks that are associated with the instances that are created from these properties.
1531 { # An instance-attached disk resource.
1532 &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).
1533 &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.
1534 &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.
1535 #
1536 # 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.
1537 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
1538 #
1539 # 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.
1540 #
1541 # 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.
1542 #
1543 # 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.
1544 #
1545 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1546 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1547 &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.
1548 &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.
1549 &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.
1550 #
1551 # The key must meet the following requirements before you can provide it to Compute Engine:
1552 # - The key is wrapped using a RSA public key certificate provided by Google.
1553 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1554 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1555 &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.
1556 },
1557 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1558 &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.
1559 { # Guest OS features.
1560 &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.
1561 },
1562 ],
1563 &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.
1564 &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.
1565 #
1566 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1567 #
1568 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1569 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1570 &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.
1571 &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.
1572 &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:
1573 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1574 #
1575 #
1576 # 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:
1577 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1578 # - projects/project/zones/zone/diskTypes/diskType
1579 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
1580 &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.
1581 #
1582 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1583 { # Guest OS features.
1584 &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.
1585 },
1586 ],
1587 &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.
1588 &quot;a_key&quot;: &quot;A String&quot;,
1589 },
1590 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
1591 &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.
1592 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
1593 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1594 &quot;A String&quot;,
1595 ],
1596 &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.
1597 &quot;A String&quot;,
1598 ],
1599 &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.
1600 #
1601 # 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:
1602 # projects/debian-cloud/global/images/family/debian-9
1603 #
1604 #
1605 # Alternatively, use a specific version of a public operating system image:
1606 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1607 #
1608 #
1609 # To create a disk with a custom image that you created, specify the image name in the following format:
1610 # global/images/my-custom-image
1611 #
1612 #
1613 # 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:
1614 # global/images/family/my-image-family
1615 #
1616 #
1617 # If the source image is deleted later, this field will not be set.
1618 &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.
1619 #
1620 # 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.
1621 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1622 &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.
1623 &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.
1624 &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.
1625 #
1626 # The key must meet the following requirements before you can provide it to Compute Engine:
1627 # - The key is wrapped using a RSA public key certificate provided by Google.
1628 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1629 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1630 &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.
1631 },
1632 &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.
1633 #
1634 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1635 # global/snapshots/my-backup
1636 #
1637 #
1638 # If the source snapshot is deleted later, this field will not be set.
1639 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
1640 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1641 &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.
1642 &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.
1643 &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.
1644 #
1645 # The key must meet the following requirements before you can provide it to Compute Engine:
1646 # - The key is wrapped using a RSA public key certificate provided by Google.
1647 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1648 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1649 &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.
1650 },
1651 },
1652 &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.
1653 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1654 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1655 &quot;A String&quot;,
1656 ],
1657 &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.
1658 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
1659 &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
1660 &quot;dbs&quot;: [ # The Key Database (db).
1661 {
1662 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1663 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1664 },
1665 ],
1666 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1667 {
1668 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1669 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1670 },
1671 ],
1672 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1673 {
1674 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1675 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1676 },
1677 ],
1678 &quot;pk&quot;: { # The Platform Key (PK).
1679 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1680 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1681 },
1682 },
1683 &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.
1684 #
1685 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1686 #
1687 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
1688 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
1689 },
1690 ],
1691 &quot;displayDevice&quot;: { # A set of Display Device options # Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer
1692 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1693 },
1694 &quot;guestAccelerators&quot;: [ # A list of guest accelerator cards&#x27; type and count to use for instances created from these properties.
1695 { # A specification of the type and number of accelerator cards attached to the instance.
1696 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1697 &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.
1698 },
1699 ],
1700 &quot;labels&quot;: { # Labels to apply to instances that are created from these properties.
1701 &quot;a_key&quot;: &quot;A String&quot;,
1702 },
1703 &quot;machineType&quot;: &quot;A String&quot;, # The machine type to use for instances that are created from these properties.
1704 &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.
1705 &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.
1706 #
1707 # To see the latest fingerprint, make a get() request to retrieve the resource.
1708 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1709 {
1710 &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.
1711 &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).
1712 },
1713 ],
1714 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1715 },
1716 &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.
1717 &quot;networkInterfaces&quot;: [ # An array of network access configurations for this interface.
1718 { # A network interface resource attached to an instance.
1719 &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.
1720 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1721 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1722 &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.
1723 &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.
1724 &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.
1725 #
1726 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1727 #
1728 # 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.
1729 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
1730 &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.
1731 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
1732 &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.
1733 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1734 },
1735 ],
1736 &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.
1737 { # An alias IP range attached to an instance&#x27;s network interface.
1738 &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).
1739 &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.
1740 },
1741 ],
1742 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
1743 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1744 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1745 &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.
1746 &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.
1747 #
1748 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1749 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1750 # - projects/project/global/networks/network
1751 # - global/networks/default
1752 &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.
1753 &quot;queueCount&quot;: 42, # The networking queue count for the network interface. Both Rx and Tx queues will be set to this number. If it&#x27;s not specified by the user, a default number of queues will be assigned. For Virtio-net, each interface will get (min(#vCPU, 32) / #vNIC) queues. For gVNIC, each interface will get (min(#vCPU / 2, 16) / #vNIC) qeueus.
1754 &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:
1755 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1756 # - regions/region/subnetworks/subnetwork
1757 },
1758 ],
1759 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
1760 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default.
1761 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that instances can consume from.
1762 &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.
1763 &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.
1764 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1765 &quot;A String&quot;,
1766 ],
1767 },
1768 &quot;resourcePolicies&quot;: [ # Resource policies (names, not ULRs) applied to instances created from these properties.
1769 &quot;A String&quot;,
1770 ],
1771 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Specifies the scheduling options for the instances that are created from these properties.
1772 &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.
1773 #
1774 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1775 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
1776 &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.
1777 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
1778 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1779 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1780 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1781 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1782 &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.
1783 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1784 &quot;A String&quot;,
1785 ],
1786 },
1787 ],
1788 &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.
1789 &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.
1790 },
1791 &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.
1792 { # A service account.
1793 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1794 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1795 &quot;A String&quot;,
1796 ],
1797 },
1798 ],
1799 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1800 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1801 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1802 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1803 },
1804 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Specifies the Shielded VM options for the instances that are created from these properties.
1805 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
1806 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
1807 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
1808 },
1809 &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.
1810 &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.
1811 #
1812 # To see the latest fingerprint, make get() request to the instance.
1813 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1814 &quot;A String&quot;,
1815 ],
1816 },
1817 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001818 &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.
1819 &quot;predefinedNames&quot;: [ # List of predefined names. The number of names provided must be equal to count.
1820 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001821 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001822 &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.
1823 #
1824 # It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
Bu Sun Kim65020912020-05-20 12:08:20 -07001825 # - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
1826 # - projects/project/global/instanceTemplates/instanceTemplate
1827 # - global/instanceTemplates/instanceTemplate
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001828 #
1829 # This field is optional.
Dan O'Mearadd494642020-05-01 07:42:23 -07001830 }
1831
1832 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.
1833
1834For 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.
1835
1836The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1837
1838Returns:
1839 An object of the form:
1840
1841 { # Represents an Operation resource.
1842 #
1843 # Google Compute Engine has three Operation resources:
1844 #
1845 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1846 #
1847 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1848 #
1849 # Operations can be global, regional or zonal.
1850 # - For global operations, use the `globalOperations` resource.
1851 # - For regional operations, use the `regionOperations` resource.
1852 # - For zonal operations, use the `zonalOperations` resource.
1853 #
1854 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001855 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1856 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1857 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1858 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1859 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1860 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001861 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001862 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1863 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1864 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001865 },
1866 ],
1867 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001868 &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`.
1869 &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.
1870 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1871 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1872 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1873 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1874 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1875 &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.
1876 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1877 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1878 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1879 &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.
1880 &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`.
1881 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1882 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1883 &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.
1884 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1885 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1886 {
1887 &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.
1888 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1889 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1890 {
1891 &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).
1892 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1893 },
1894 ],
1895 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1896 },
1897 ],
1898 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001899 }</pre>
1900</div>
1901
1902<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001903 <code class="details" id="close">close()</code>
1904 <pre>Close httplib2 connections.</pre>
1905</div>
1906
1907<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001908 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001909 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
1910
1911Args:
1912 project: string, Project ID for this request. (required)
1913 zone: string, The name of the zone for this request. (required)
1914 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001915 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.
1916
1917For 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.
1918
1919The 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 -07001920
1921Returns:
1922 An object of the form:
1923
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001924 { # Represents an Operation resource.
1925 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001926 # Google Compute Engine has three Operation resources:
1927 #
1928 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1929 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001930 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1931 #
1932 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001933 # - For global operations, use the `globalOperations` resource.
1934 # - For regional operations, use the `regionOperations` resource.
1935 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001936 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001937 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001938 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1939 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1940 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1941 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1942 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1943 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001944 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001945 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1946 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1947 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001948 },
1949 ],
1950 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001951 &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`.
1952 &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.
1953 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1954 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1955 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1956 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1957 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1958 &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.
1959 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1960 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1961 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1962 &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.
1963 &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`.
1964 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1965 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1966 &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.
1967 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1968 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1969 {
1970 &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.
1971 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1972 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1973 {
1974 &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).
1975 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1976 },
1977 ],
1978 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1979 },
1980 ],
1981 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001982 }</pre>
1983</div>
1984
1985<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001986 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001987 <pre>Deletes an access config from an instance&#x27;s network interface.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001988
1989Args:
1990 project: string, Project ID for this request. (required)
1991 zone: string, The name of the zone for this request. (required)
1992 instance: string, The instance name for this request. (required)
1993 accessConfig: string, The name of the access config to delete. (required)
1994 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001995 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.
1996
1997For 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.
1998
1999The 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 -07002000
2001Returns:
2002 An object of the form:
2003
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002004 { # Represents an Operation resource.
2005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002006 # Google Compute Engine has three Operation resources:
2007 #
2008 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2009 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002010 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2011 #
2012 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002013 # - For global operations, use the `globalOperations` resource.
2014 # - For regional operations, use the `regionOperations` resource.
2015 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002016 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002017 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002018 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2019 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2020 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2021 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2022 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2023 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002024 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002025 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2026 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2027 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002028 },
2029 ],
2030 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002031 &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`.
2032 &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.
2033 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2034 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2035 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2036 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2037 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2038 &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.
2039 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2040 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2041 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2042 &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.
2043 &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`.
2044 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2045 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2046 &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.
2047 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2048 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2049 {
2050 &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.
2051 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2052 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2053 {
2054 &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).
2055 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2056 },
2057 ],
2058 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2059 },
2060 ],
2061 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002062 }</pre>
2063</div>
2064
2065<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002066 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002067 <pre>Detaches a disk from an instance.
2068
2069Args:
2070 project: string, Project ID for this request. (required)
2071 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002072 instance: string, Instance name for this request. (required)
2073 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)
2074 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.
2075
2076For 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.
2077
2078The 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 -07002079
2080Returns:
2081 An object of the form:
2082
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002083 { # Represents an Operation resource.
2084 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002085 # Google Compute Engine has three Operation resources:
2086 #
2087 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2088 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002089 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2090 #
2091 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002092 # - For global operations, use the `globalOperations` resource.
2093 # - For regional operations, use the `regionOperations` resource.
2094 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002095 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002096 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002097 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2098 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2099 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2100 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2101 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2102 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002103 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002104 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2105 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2106 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002107 },
2108 ],
2109 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002110 &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`.
2111 &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.
2112 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2113 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2114 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2115 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2116 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2117 &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.
2118 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2119 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2120 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2121 &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.
2122 &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`.
2123 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2124 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2125 &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.
2126 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2127 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2128 {
2129 &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.
2130 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2131 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2132 {
2133 &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).
2134 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2135 },
2136 ],
2137 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2138 },
2139 ],
2140 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002141 }</pre>
2142</div>
2143
2144<div class="method">
2145 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002146 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002147
2148Args:
2149 project: string, Project ID for this request. (required)
2150 zone: string, The name of the zone for this request. (required)
2151 instance: string, Name of the instance resource to return. (required)
2152
2153Returns:
2154 An object of the form:
2155
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002156 { # Represents an Instance resource.
2157 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002158 # 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 ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002159 &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.
2160 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
2161 &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.
2162 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002163 &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.
2164 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
2165 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002166 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002167 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2168 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2169 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2170 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2171 &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 -07002172 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002173 &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).
2174 &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.
2175 &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.
2176 #
2177 # 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 -07002178 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002179 #
2180 # 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.
2181 #
2182 # 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.
2183 #
2184 # 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.
2185 #
2186 # 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 -07002187 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2188 &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.
2189 &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.
2190 &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 -07002191 #
2192 # The key must meet the following requirements before you can provide it to Compute Engine:
2193 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002194 # - 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 -07002195 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002196 &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 -07002197 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002198 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2199 &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.
2200 { # Guest OS features.
2201 &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.
2202 },
2203 ],
2204 &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.
2205 &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 -07002206 #
2207 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2208 #
2209 # 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 -07002210 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2211 &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.
2212 &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.
2213 &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 -07002214 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2215 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002216 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002217 # 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:
2218 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2219 # - projects/project/zones/zone/diskTypes/diskType
2220 # - 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 -07002221 &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 -07002222 #
2223 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2224 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07002225 &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 -07002226 },
2227 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002228 &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.
2229 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002230 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002231 &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 -07002232 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002233 &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 -07002234 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
2235 &quot;A String&quot;,
2236 ],
2237 &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.
2238 &quot;A String&quot;,
2239 ],
2240 &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 -07002241 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002242 # 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:
2243 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002244 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002245 #
2246 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002247 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002248 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002249 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002250 # To create a disk with a custom image that you created, specify the image name in the following format:
2251 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002252 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002253 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002254 # 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:
2255 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002256 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002257 #
2258 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002259 &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 -07002260 #
2261 # 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.
2262 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2263 &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.
2264 &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.
2265 &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.
2266 #
2267 # The key must meet the following requirements before you can provide it to Compute Engine:
2268 # - The key is wrapped using a RSA public key certificate provided by Google.
2269 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2270 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2271 &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.
2272 },
2273 &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.
2274 #
2275 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2276 # global/snapshots/my-backup
2277 #
2278 #
2279 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002280 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07002281 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2282 &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.
2283 &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.
2284 &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.
2285 #
2286 # The key must meet the following requirements before you can provide it to Compute Engine:
2287 # - The key is wrapped using a RSA public key certificate provided by Google.
2288 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2289 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2290 &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 -07002291 },
2292 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002293 &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.
2294 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2295 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2296 &quot;A String&quot;,
2297 ],
2298 &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.
2299 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
2300 &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
2301 &quot;dbs&quot;: [ # The Key Database (db).
2302 {
2303 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2304 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2305 },
2306 ],
2307 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
2308 {
2309 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2310 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2311 },
2312 ],
2313 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
2314 {
2315 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2316 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2317 },
2318 ],
2319 &quot;pk&quot;: { # The Platform Key (PK).
2320 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2321 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002322 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002323 },
2324 &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 -08002325 #
2326 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2327 #
2328 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002329 &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 -07002330 },
2331 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002332 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2333 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07002334 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002335 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2336 &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.
2337 #
2338 # To see the latest fingerprint, make get() request to the instance.
2339 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2340 { # A specification of the type and number of accelerator cards attached to the instance.
2341 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2342 &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.
2343 },
2344 ],
2345 &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.
2346 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002347 &quot;instanceEncryptionKey&quot;: { # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07002348 #
2349 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
2350 #
2351 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
2352 #
2353 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
2354 #
2355 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
2356 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2357 &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.
2358 &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.
2359 &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.
2360 #
2361 # The key must meet the following requirements before you can provide it to Compute Engine:
2362 # - The key is wrapped using a RSA public key certificate provided by Google.
2363 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2364 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2365 &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.
2366 },
2367 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2368 &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.
2369 #
2370 # To see the latest fingerprint, make get() request to the instance.
2371 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2372 &quot;a_key&quot;: &quot;A String&quot;,
2373 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002374 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
2375 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
2376 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07002377 &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:
2378 # zones/us-central1-f/machineTypes/n1-standard-1
2379 #
2380 #
2381 # 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):
2382 # zones/zone/machineTypes/custom-CPUS-MEMORY
2383 #
2384 #
2385 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2386 #
2387 # For a full list of restrictions, read the Specifications for custom machine types.
2388 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2389 &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.
2390 #
2391 # To see the latest fingerprint, make a get() request to retrieve the resource.
2392 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2393 {
2394 &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.
2395 &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).
2396 },
2397 ],
2398 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2399 },
2400 &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;.
2401 &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.
2402 &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.
2403 { # A network interface resource attached to an instance.
2404 &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.
2405 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2406 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2407 &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.
2408 &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.
2409 &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.
2410 #
2411 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2412 #
2413 # 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.
2414 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
2415 &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.
2416 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
2417 &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.
2418 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2419 },
2420 ],
2421 &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.
2422 { # An alias IP range attached to an instance&#x27;s network interface.
2423 &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).
2424 &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.
2425 },
2426 ],
2427 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
2428 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
2429 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2430 &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.
2431 &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.
2432 #
2433 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2434 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2435 # - projects/project/global/networks/network
2436 # - global/networks/default
2437 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002438 &quot;queueCount&quot;: 42, # The networking queue count for the network interface. Both Rx and Tx queues will be set to this number. If it&#x27;s not specified by the user, a default number of queues will be assigned. For Virtio-net, each interface will get (min(#vCPU, 32) / #vNIC) queues. For gVNIC, each interface will get (min(#vCPU / 2, 16) / #vNIC) qeueus.
Bu Sun Kim65020912020-05-20 12:08:20 -07002439 &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:
2440 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2441 # - regions/region/subnetworks/subnetwork
2442 },
2443 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002444 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002445 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
2446 &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.
2447 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2448 &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.
2449 &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.
2450 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2451 &quot;A String&quot;,
2452 ],
2453 },
2454 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2455 &quot;A String&quot;,
2456 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002457 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
2458 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002459 &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.
2460 #
2461 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2462 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
2463 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002464 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002465 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
2466 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2467 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2468 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2469 &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.
2470 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2471 &quot;A String&quot;,
2472 ],
2473 },
2474 ],
2475 &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 -07002476 &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 -07002477 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002478 &quot;secureLabels&quot;: [ # Secure labels to apply to this instance. These can be later modified by the update method. Maximum number of secure labels allowed is 300.
2479 &quot;A String&quot;,
2480 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002481 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2482 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2483 &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.
2484 #
2485 # 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.
2486 { # A service account.
2487 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2488 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2489 &quot;A String&quot;,
2490 ],
2491 },
2492 ],
2493 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2494 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2495 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2496 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2497 },
2498 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2499 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2500 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002501 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07002502 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
2503 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
2504 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
2505 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002506 &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 -07002507 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2508 },
2509 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002510 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07002511 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2512 &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.
2513 &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.
2514 &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.
2515 #
2516 # The key must meet the following requirements before you can provide it to Compute Engine:
2517 # - The key is wrapped using a RSA public key certificate provided by Google.
2518 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2519 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2520 &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.
2521 },
2522 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002523 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07002524 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2525 &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.
2526 &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.
2527 #
2528 # To see the latest fingerprint, make get() request to the instance.
2529 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2530 &quot;A String&quot;,
2531 ],
2532 },
2533 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002534 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
2535 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07002536 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
2537 },
2538 &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 -07002539 }</pre>
2540</div>
2541
2542<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002543 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</code>
2544 <pre>Returns effective firewalls applied to an interface of the instance.
2545
2546Args:
2547 project: string, Project ID for this request. (required)
2548 zone: string, The name of the zone for this request. (required)
2549 instance: string, Name of the instance scoping this request. (required)
2550 networkInterface: string, The name of the network interface to get the effective firewalls. (required)
2551
2552Returns:
2553 An object of the form:
2554
2555 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002556 &quot;firewalls&quot;: [ # Effective firewalls on the instance.
2557 { # Represents a Firewall Rule resource.
2558 #
2559 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
2560 &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.
2561 {
2562 &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.
2563 &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.
2564 #
2565 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2566 &quot;A String&quot;,
2567 ],
2568 },
2569 ],
2570 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2571 &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.
2572 {
2573 &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.
2574 &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.
2575 #
2576 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2577 &quot;A String&quot;,
2578 ],
2579 },
2580 ],
2581 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
2582 &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.
2583 &quot;A String&quot;,
2584 ],
2585 &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.
2586 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002587 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07002588 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2589 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002590 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07002591 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
2592 &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.
2593 },
2594 &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.
2595 &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:
2596 # global/networks/default
2597 # 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:
2598 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
2599 # - projects/myproject/global/networks/my-network
2600 # - global/networks/default
2601 &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`.
2602 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2603 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2604 &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.
2605 &quot;A String&quot;,
2606 ],
2607 &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.
2608 &quot;A String&quot;,
2609 ],
2610 &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.
2611 &quot;A String&quot;,
2612 ],
2613 &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.
2614 &quot;A String&quot;,
2615 ],
2616 &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.
2617 &quot;A String&quot;,
2618 ],
2619 },
2620 ],
2621 &quot;organizationFirewalls&quot;: [ # Effective firewalls from organization policies.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002622 { # A pruned SecurityPolicy containing ID and any applicable firewall rules.
Bu Sun Kim65020912020-05-20 12:08:20 -07002623 &quot;id&quot;: &quot;A String&quot;, # The unique identifier for the security policy. This identifier is defined by the server.
2624 &quot;rules&quot;: [ # The rules that apply to the network.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002625 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
Bu Sun Kim65020912020-05-20 12:08:20 -07002626 &quot;action&quot;: &quot;A String&quot;, # The Action to preform when the client connection triggers the rule. Can currently be either &quot;allow&quot; or &quot;deny()&quot; where valid values for status are 403, 404, and 502.
2627 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2628 &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.
2629 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002630 #
2631 # This field may only be specified when the versioned_expr is set to FIREWALL.
Bu Sun Kim65020912020-05-20 12:08:20 -07002632 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
2633 &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.
2634 &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.
2635 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2636 #
2637 # This field may only be specified when versioned_expr is set to FIREWALL.
2638 &quot;A String&quot;,
2639 ],
2640 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2641 #
2642 # This field may only be specified when versioned_expr is set to FIREWALL.
2643 {
2644 &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.
2645 &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.
2646 #
2647 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2648 #
2649 # This field may only be specified when versioned_expr is set to FIREWALL.
2650 &quot;A String&quot;,
2651 ],
2652 },
2653 ],
2654 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2655 #
2656 # This field may only be specified when versioned_expr is set to FIREWALL.
2657 {
2658 &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.
2659 &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.
2660 #
2661 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2662 #
2663 # This field may only be specified when versioned_expr is set to FIREWALL.
2664 &quot;A String&quot;,
2665 ],
2666 },
2667 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002668 &quot;srcIpRanges&quot;: [ # CIDR IP address range. Maximum number of src_ip_ranges allowed is 10.
Bu Sun Kim65020912020-05-20 12:08:20 -07002669 &quot;A String&quot;,
2670 ],
2671 },
2672 &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 Kim715bd7f2019-06-14 16:50:42 -07002673 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002674 # Example (Comparison):
2675 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002676 # 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;
Dan O'Mearadd494642020-05-01 07:42:23 -07002677 #
2678 # Example (Equality):
2679 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002680 # 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;
Dan O'Mearadd494642020-05-01 07:42:23 -07002681 #
2682 # Example (Logic):
2683 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002684 # 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;
Dan O'Mearadd494642020-05-01 07:42:23 -07002685 #
2686 # Example (Data Manipulation):
2687 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002688 # 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;
Dan O'Mearadd494642020-05-01 07:42:23 -07002689 #
2690 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002691 &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.
2692 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2693 &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.
2694 &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 -07002695 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002696 &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 Kim715bd7f2019-06-14 16:50:42 -07002697 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002698 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2699 &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.
2700 &quot;rateLimitOptions&quot;: { # Must be specified if the action is &quot;rate_based_blacklist&quot; or &quot;throttle&quot;. Cannot be specified for any other actions.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002701 &quot;banDurationSec&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2702 &quot;banThreshold&quot;: { # Can only be specified if the action for the rule is &quot;rate_based_ban&quot;. If specified, the key will be banned for the configured &#x27;ban_duration&#x27; when the number of requests that exceed the &#x27;rate_limit_threshold&#x27; also exceed this &#x27;ban_threshold&#x27;.
2703 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2704 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2705 },
2706 &quot;blockDuration&quot;: 42, # Can only be specified if the action for the rule is &quot;rate_based_ban&quot; If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. [Deprecated] This field is deprecated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002707 &quot;conformAction&quot;: &quot;A String&quot;, # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are &quot;allow&quot;, &quot;fairshare&quot;, and &quot;drop_overload&quot;.
2708 &quot;enforceOnKey&quot;: &quot;A String&quot;, # Determines the key to enforce the threshold_rps limit on. If key is &quot;IP&quot;, each IP has this limit enforced separately, whereas &quot;ALL_IPs&quot; means a single limit is applied to all requests matching this rule.
2709 &quot;exceedAction&quot;: &quot;A String&quot;, # When a request is denied, returns the HTTP response code specified. Valid options are &quot;deny()&quot; where valid values for status are 403, 404, 429, and 502.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002710 &quot;rateLimitThreshold&quot;: { # Threshold at which to begin ratelimiting.
2711 &quot;count&quot;: 42, # Number of HTTP(S) requests for calculating the threshold.
2712 &quot;intervalSec&quot;: 42, # Interval over which the threshold is computed.
2713 },
2714 &quot;thresholdRps&quot;: 42, # Rate in requests per second at which to begin ratelimiting. [Deprecated] This field is deprecated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002715 },
2716 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
2717 &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.
2718 #
2719 # This field may only be specified when versioned_expr is set to FIREWALL.
2720 &quot;A String&quot;,
2721 ],
2722 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
2723 &quot;A String&quot;,
2724 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002725 },
2726 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002727 },
2728 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002729 }</pre>
2730</div>
2731
2732<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002733 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002734 <pre>Returns the specified guest attributes entry.
2735
2736Args:
2737 project: string, Project ID for this request. (required)
2738 zone: string, The name of the zone for this request. (required)
2739 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002740 queryPath: string, Specifies the guest attributes path to be queried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002741 variableKey: string, Specifies the key for the guest attributes entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002742
2743Returns:
2744 An object of the form:
2745
2746 { # A guest attributes entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002747 &quot;kind&quot;: &quot;compute#guestAttributes&quot;, # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
2748 &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;)
2749 &quot;queryValue&quot;: { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
2750 &quot;items&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002751 { # A guest attributes namespace/key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002752 &quot;key&quot;: &quot;A String&quot;, # Key for the guest attribute entry.
2753 &quot;namespace&quot;: &quot;A String&quot;, # Namespace for the guest attribute entry.
2754 &quot;value&quot;: &quot;A String&quot;, # Value for the guest attribute entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002755 },
2756 ],
2757 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002758 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2759 &quot;variableKey&quot;: &quot;A String&quot;, # The key to search for.
2760 &quot;variableValue&quot;: &quot;A String&quot;, # [Output Only] The value found for the requested key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002761 }</pre>
2762</div>
2763
2764<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002765 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002766 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
2767
2768Args:
2769 project: string, Project ID for this request. (required)
2770 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002771 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002772 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002773
2774Returns:
2775 An object of the form:
2776
Dan O'Mearadd494642020-05-01 07:42:23 -07002777 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002778 #
2779 #
2780 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002781 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002782 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002783 # 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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002784 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002785 # **JSON example:**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002786 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002787 # { &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 -07002788 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002789 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002790 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002791 # 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 -07002792 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002793 # 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 -07002794 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002795 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002796 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002797 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002798 #
2799 # Example Policy with multiple AuditConfigs:
2800 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002801 # { &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; ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002802 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002803 # 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 -07002804 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002805 { # Provides the configuration for logging a type of permissions. Example:
2806 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002807 # { &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; } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002808 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002809 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2810 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2811 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002812 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002813 &quot;ignoreChildExemptions&quot;: True or False,
2814 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002815 },
2816 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002817 &quot;exemptedMembers&quot;: [
2818 &quot;A String&quot;,
2819 ],
2820 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002821 },
2822 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002823 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002824 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002825 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07002826 &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.
2827 #
2828 # If the condition evaluates to `true`, then this binding applies to the current request.
2829 #
2830 # 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.
2831 #
2832 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2833 #
2834 # Example (Comparison):
2835 #
2836 # 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;
2837 #
2838 # Example (Equality):
2839 #
2840 # 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;
2841 #
2842 # Example (Logic):
2843 #
2844 # 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;
2845 #
2846 # Example (Data Manipulation):
2847 #
2848 # 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;
2849 #
2850 # 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.
2851 &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.
2852 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2853 &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.
2854 &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.
2855 },
2856 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002857 #
2858 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2859 #
2860 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2861 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002862 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002863 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002864 #
2865 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002866 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2867 #
2868 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2869 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002870 # * `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.
2871 #
2872 # * `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.
2873 #
2874 # * `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.
2875 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002876 #
2877 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002878 # * `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 -07002879 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002880 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002881 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002882 },
2883 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002884 &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.
2885 #
2886 # **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.
2887 &quot;iamOwned&quot;: True or False,
2888 &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.
2889 { # A rule to be applied in a Policy.
2890 &quot;action&quot;: &quot;A String&quot;, # Required
2891 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2892 { # A condition to be met.
2893 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
2894 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
2895 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
2896 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2897 &quot;values&quot;: [ # The objects of the condition.
2898 &quot;A String&quot;,
2899 ],
2900 },
2901 ],
2902 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
2903 &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.
2904 &quot;A String&quot;,
2905 ],
2906 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2907 { # Specifies what kind of log the caller must write
2908 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
2909 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2910 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
2911 },
2912 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
2913 },
2914 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
2915 #
2916 # 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.
2917 #
2918 # Field names correspond to IAM request parameters and field values are their respective values.
2919 #
2920 # 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.
2921 #
2922 # 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]}
2923 &quot;customFields&quot;: [ # Custom fields.
2924 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2925 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2926 &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.
2927 },
2928 ],
2929 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2930 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
2931 },
2932 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2933 &quot;logMode&quot;: &quot;A String&quot;,
2934 },
2935 },
2936 ],
2937 &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.
2938 &quot;A String&quot;,
2939 ],
2940 &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.
2941 &quot;A String&quot;,
2942 ],
2943 },
2944 ],
2945 &quot;version&quot;: 42, # Specifies the format of the policy.
2946 #
2947 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2948 #
2949 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2950 #
2951 # * 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
2952 #
2953 # **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.
2954 #
2955 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2956 #
2957 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002958 }</pre>
2959</div>
2960
2961<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002962 <code class="details" id="getScreenshot">getScreenshot(project, zone, instance)</code>
2963 <pre>Returns the screenshot from the specified instance.
2964
2965Args:
2966 project: string, Project ID for this request. (required)
2967 zone: string, The name of the zone for this request. (required)
2968 instance: string, Name of the instance scoping this request. (required)
2969
2970Returns:
2971 An object of the form:
2972
Bu Sun Kim65020912020-05-20 12:08:20 -07002973 { # An instance&#x27;s screenshot.
2974 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The Base64-encoded screenshot data.
2975 &quot;kind&quot;: &quot;compute#screenshot&quot;, # [Output Only] Type of the resource. Always compute#screenshot for the screenshots.
Dan O'Mearadd494642020-05-01 07:42:23 -07002976 }</pre>
2977</div>
2978
2979<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002980 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002981 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002982
2983Args:
2984 project: string, Project ID for this request. (required)
2985 zone: string, The name of the zone for this request. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002986 instance: string, Name of the instance for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002987 port: integer, Specifies which COM or serial port to retrieve data from.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002988 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`.
2989
2990If 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.
2991
2992You 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 -07002993
2994Returns:
2995 An object of the form:
2996
Bu Sun Kim65020912020-05-20 12:08:20 -07002997 { # An instance&#x27;s serial console output.
2998 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The contents of the console output.
2999 &quot;kind&quot;: &quot;compute#serialPortOutput&quot;, # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003000 &quot;next&quot;: &quot;A String&quot;, # [Output Only] The position of the next byte of content, regardless of whether the content exists, following the output returned in the `contents` property. Use this value in the next request as the start parameter.
Bu Sun Kim65020912020-05-20 12:08:20 -07003001 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003002 &quot;start&quot;: &quot;A String&quot;, # The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer (1 MB), older output is overwritten by newer content. The output start value will indicate the byte position of the output that was returned, which might be different than the `start` value that was specified in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003003 }</pre>
3004</div>
3005
3006<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003007 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
3008 <pre>Returns the Shielded Instance Identity of an instance
3009
3010Args:
3011 project: string, Project ID for this request. (required)
3012 zone: string, The name of the zone for this request. (required)
3013 instance: string, Name or id of the instance scoping this request. (required)
3014
3015Returns:
3016 An object of the form:
3017
3018 { # A shielded Instance identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07003019 &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.
3020 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
3021 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003022 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003023 &quot;kind&quot;: &quot;compute#shieldedInstanceIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
3024 &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.
3025 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
3026 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003027 },
3028 }</pre>
3029</div>
3030
3031<div class="method">
3032 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
3033 <pre>Returns the Shielded VM Identity of an instance
3034
3035Args:
3036 project: string, Project ID for this request. (required)
3037 zone: string, The name of the zone for this request. (required)
3038 instance: string, Name of the instance scoping this request. (required)
3039
3040Returns:
3041 An object of the form:
3042
3043 { # A shielded VM identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07003044 &quot;encryptionKey&quot;: { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM&#x27;s vTPM.
3045 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
3046 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003047 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003048 &quot;kind&quot;: &quot;compute#shieldedVmIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
3049 &quot;signingKey&quot;: { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM&#x27;s vTPM.
3050 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
3051 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003052 },
3053 }</pre>
3054</div>
3055
3056<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003057 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None, sourceMachineImage=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003058 <pre>Creates an instance resource in the specified project using the data included in the request.
3059
3060Args:
3061 project: string, Project ID for this request. (required)
3062 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003063 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003064 The object takes the form of:
3065
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003066{ # Represents an Instance resource.
3067 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003068 # 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 ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003069 &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.
3070 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
3071 &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.
3072 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003073 &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.
3074 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
3075 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003076 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003077 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
3078 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3079 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
3080 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3081 &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 -07003082 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003083 &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).
3084 &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.
3085 &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.
3086 #
3087 # 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 -07003088 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003089 #
3090 # 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.
3091 #
3092 # 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.
3093 #
3094 # 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.
3095 #
3096 # 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 -07003097 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3098 &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.
3099 &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.
3100 &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 -07003101 #
3102 # The key must meet the following requirements before you can provide it to Compute Engine:
3103 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003104 # - 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 -07003105 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07003106 &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 -07003107 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003108 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
3109 &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.
3110 { # Guest OS features.
3111 &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.
3112 },
3113 ],
3114 &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.
3115 &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 -07003116 #
3117 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
3118 #
3119 # 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 -07003120 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
3121 &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.
3122 &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.
3123 &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 -07003124 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
3125 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003126 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003127 # 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:
3128 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
3129 # - projects/project/zones/zone/diskTypes/diskType
3130 # - 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 -07003131 &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 -07003132 #
3133 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
3134 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07003135 &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 -07003136 },
3137 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003138 &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.
3139 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003140 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003141 &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 -07003142 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003143 &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 -07003144 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
3145 &quot;A String&quot;,
3146 ],
3147 &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.
3148 &quot;A String&quot;,
3149 ],
3150 &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 -07003151 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003152 # 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:
3153 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003154 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003155 #
3156 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003157 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003158 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003159 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003160 # To create a disk with a custom image that you created, specify the image name in the following format:
3161 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003162 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003163 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003164 # 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:
3165 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003166 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003167 #
3168 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003169 &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 -07003170 #
3171 # 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.
3172 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3173 &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.
3174 &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.
3175 &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.
3176 #
3177 # The key must meet the following requirements before you can provide it to Compute Engine:
3178 # - The key is wrapped using a RSA public key certificate provided by Google.
3179 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3180 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3181 &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.
3182 },
3183 &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.
3184 #
3185 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
3186 # global/snapshots/my-backup
3187 #
3188 #
3189 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003190 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07003191 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3192 &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.
3193 &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.
3194 &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.
3195 #
3196 # The key must meet the following requirements before you can provide it to Compute Engine:
3197 # - The key is wrapped using a RSA public key certificate provided by Google.
3198 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3199 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3200 &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 -07003201 },
3202 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003203 &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.
3204 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
3205 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
3206 &quot;A String&quot;,
3207 ],
3208 &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.
3209 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
3210 &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
3211 &quot;dbs&quot;: [ # The Key Database (db).
3212 {
3213 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3214 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3215 },
3216 ],
3217 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
3218 {
3219 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3220 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3221 },
3222 ],
3223 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
3224 {
3225 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3226 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3227 },
3228 ],
3229 &quot;pk&quot;: { # The Platform Key (PK).
3230 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3231 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003232 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003233 },
3234 &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 -08003235 #
3236 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
3237 #
3238 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07003239 &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 -07003240 },
3241 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003242 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
3243 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07003244 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003245 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
3246 &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.
3247 #
3248 # To see the latest fingerprint, make get() request to the instance.
3249 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
3250 { # A specification of the type and number of accelerator cards attached to the instance.
3251 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
3252 &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.
3253 },
3254 ],
3255 &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.
3256 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003257 &quot;instanceEncryptionKey&quot;: { # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07003258 #
3259 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
3260 #
3261 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
3262 #
3263 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
3264 #
3265 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
3266 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3267 &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.
3268 &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.
3269 &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.
3270 #
3271 # The key must meet the following requirements before you can provide it to Compute Engine:
3272 # - The key is wrapped using a RSA public key certificate provided by Google.
3273 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3274 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3275 &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.
3276 },
3277 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
3278 &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.
3279 #
3280 # To see the latest fingerprint, make get() request to the instance.
3281 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
3282 &quot;a_key&quot;: &quot;A String&quot;,
3283 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003284 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
3285 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
3286 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07003287 &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:
3288 # zones/us-central1-f/machineTypes/n1-standard-1
3289 #
3290 #
3291 # 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):
3292 # zones/zone/machineTypes/custom-CPUS-MEMORY
3293 #
3294 #
3295 # For example: zones/us-central1-f/machineTypes/custom-4-5120
3296 #
3297 # For a full list of restrictions, read the Specifications for custom machine types.
3298 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
3299 &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.
3300 #
3301 # To see the latest fingerprint, make a get() request to retrieve the resource.
3302 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3303 {
3304 &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.
3305 &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).
3306 },
3307 ],
3308 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
3309 },
3310 &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;.
3311 &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.
3312 &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.
3313 { # A network interface resource attached to an instance.
3314 &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.
3315 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
3316 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
3317 &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.
3318 &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.
3319 &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.
3320 #
3321 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
3322 #
3323 # 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.
3324 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
3325 &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.
3326 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
3327 &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.
3328 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
3329 },
3330 ],
3331 &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.
3332 { # An alias IP range attached to an instance&#x27;s network interface.
3333 &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).
3334 &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.
3335 },
3336 ],
3337 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
3338 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
3339 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
3340 &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.
3341 &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.
3342 #
3343 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
3344 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
3345 # - projects/project/global/networks/network
3346 # - global/networks/default
3347 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003348 &quot;queueCount&quot;: 42, # The networking queue count for the network interface. Both Rx and Tx queues will be set to this number. If it&#x27;s not specified by the user, a default number of queues will be assigned. For Virtio-net, each interface will get (min(#vCPU, 32) / #vNIC) queues. For gVNIC, each interface will get (min(#vCPU / 2, 16) / #vNIC) qeueus.
Bu Sun Kim65020912020-05-20 12:08:20 -07003349 &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:
3350 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
3351 # - regions/region/subnetworks/subnetwork
3352 },
3353 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003354 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003355 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
3356 &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.
3357 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
3358 &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.
3359 &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.
3360 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
3361 &quot;A String&quot;,
3362 ],
3363 },
3364 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
3365 &quot;A String&quot;,
3366 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003367 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
3368 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003369 &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.
3370 #
3371 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
3372 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
3373 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003374 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003375 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
3376 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
3377 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
3378 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3379 &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.
3380 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3381 &quot;A String&quot;,
3382 ],
3383 },
3384 ],
3385 &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 -07003386 &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 -07003387 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003388 &quot;secureLabels&quot;: [ # Secure labels to apply to this instance. These can be later modified by the update method. Maximum number of secure labels allowed is 300.
3389 &quot;A String&quot;,
3390 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003391 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3392 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
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.
3399 &quot;A String&quot;,
3400 ],
3401 },
3402 ],
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 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003411 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07003412 &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 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003416 &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 -07003417 &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
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003420 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07003421 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003433 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07003434 &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;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003444 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
3445 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07003446 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
3447 },
3448 &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 -07003449}
3450
Bu Sun Kim65020912020-05-20 12:08:20 -07003451 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.
3452
3453For 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.
3454
3455The 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 -07003456 sourceInstanceTemplate: string, Specifies instance template to create the instance.
3457
3458This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
3459- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
3460- projects/project/global/instanceTemplates/instanceTemplate
3461- global/instanceTemplates/instanceTemplate
3462 sourceMachineImage: string, Specifies instance machine to create the instance.
3463
3464This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
3465- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
3466- projects/project/global/global/machineImages/machineImage
3467- global/machineImages/machineImage
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003468
3469Returns:
3470 An object of the form:
3471
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003472 { # Represents an Operation resource.
3473 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003474 # Google Compute Engine has three Operation resources:
3475 #
3476 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3477 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003478 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3479 #
3480 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003481 # - For global operations, use the `globalOperations` resource.
3482 # - For regional operations, use the `regionOperations` resource.
3483 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003484 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003485 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003486 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3487 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3488 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3489 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3490 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3491 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003492 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003493 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3494 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3495 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003496 },
3497 ],
3498 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003499 &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`.
3500 &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.
3501 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3502 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3503 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3504 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3505 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3506 &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.
3507 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3508 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3509 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3510 &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.
3511 &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`.
3512 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3513 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3514 &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.
3515 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3516 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3517 {
3518 &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.
3519 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3520 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3521 {
3522 &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).
3523 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3524 },
3525 ],
3526 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3527 },
3528 ],
3529 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003530 }</pre>
3531</div>
3532
3533<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003534 <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 -07003535 <pre>Retrieves the list of instances contained within the specified zone.
3536
3537Args:
3538 project: string, Project ID for this request. (required)
3539 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003540 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 -07003541
Dan O'Mearadd494642020-05-01 07:42:23 -07003542For 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 -07003543
Dan O'Mearadd494642020-05-01 07:42:23 -07003544You 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 -07003545
Bu Sun Kim65020912020-05-20 12:08:20 -07003546To 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) ```
3547 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`)
3548 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3549
3550You 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.
3551
3552Currently, only sorting by `name` or `creationTimestamp desc` is supported.
3553 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.
3554 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003555
3556Returns:
3557 An object of the form:
3558
3559 { # Contains a list of instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07003560 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3561 &quot;items&quot;: [ # A list of Instance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003562 { # Represents an Instance resource.
3563 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003564 # 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 ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003565 &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.
3566 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
3567 &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.
3568 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003569 &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.
3570 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
3571 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003572 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003573 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
3574 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3575 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
3576 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3577 &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 -07003578 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003579 &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).
3580 &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.
3581 &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.
3582 #
3583 # 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 -07003584 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003585 #
3586 # 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.
3587 #
3588 # 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.
3589 #
3590 # 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.
3591 #
3592 # 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 -07003593 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3594 &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.
3595 &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.
3596 &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 -07003597 #
3598 # The key must meet the following requirements before you can provide it to Compute Engine:
3599 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003600 # - 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 -07003601 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07003602 &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 -07003603 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003604 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
3605 &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.
3606 { # Guest OS features.
3607 &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.
3608 },
3609 ],
3610 &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.
3611 &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 -07003612 #
3613 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
3614 #
3615 # 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 -07003616 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
3617 &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.
3618 &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.
3619 &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 -07003620 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
3621 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003622 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003623 # 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:
3624 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
3625 # - projects/project/zones/zone/diskTypes/diskType
3626 # - 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 -07003627 &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 -07003628 #
3629 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
3630 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07003631 &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 -07003632 },
3633 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003634 &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.
3635 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003636 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003637 &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 -07003638 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003639 &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 -07003640 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
3641 &quot;A String&quot;,
3642 ],
3643 &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.
3644 &quot;A String&quot;,
3645 ],
3646 &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 -07003647 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003648 # 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:
3649 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003650 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003651 #
3652 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003653 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003654 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003655 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003656 # To create a disk with a custom image that you created, specify the image name in the following format:
3657 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003658 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003659 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003660 # 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:
3661 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003662 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003663 #
3664 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003665 &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 -07003666 #
3667 # 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.
3668 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3669 &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.
3670 &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.
3671 &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.
3672 #
3673 # The key must meet the following requirements before you can provide it to Compute Engine:
3674 # - The key is wrapped using a RSA public key certificate provided by Google.
3675 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3676 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3677 &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.
3678 },
3679 &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.
3680 #
3681 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
3682 # global/snapshots/my-backup
3683 #
3684 #
3685 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003686 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07003687 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3688 &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.
3689 &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.
3690 &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.
3691 #
3692 # The key must meet the following requirements before you can provide it to Compute Engine:
3693 # - The key is wrapped using a RSA public key certificate provided by Google.
3694 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3695 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3696 &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 -07003697 },
3698 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003699 &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.
3700 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
3701 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
3702 &quot;A String&quot;,
3703 ],
3704 &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.
3705 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
3706 &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
3707 &quot;dbs&quot;: [ # The Key Database (db).
3708 {
3709 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3710 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3711 },
3712 ],
3713 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
3714 {
3715 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3716 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3717 },
3718 ],
3719 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
3720 {
3721 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3722 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3723 },
3724 ],
3725 &quot;pk&quot;: { # The Platform Key (PK).
3726 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3727 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003728 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003729 },
3730 &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 -08003731 #
3732 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
3733 #
3734 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07003735 &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 -07003736 },
3737 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003738 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
3739 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07003740 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003741 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
3742 &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.
3743 #
3744 # To see the latest fingerprint, make get() request to the instance.
3745 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
3746 { # A specification of the type and number of accelerator cards attached to the instance.
3747 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
3748 &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.
3749 },
3750 ],
3751 &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.
3752 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003753 &quot;instanceEncryptionKey&quot;: { # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07003754 #
3755 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
3756 #
3757 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
3758 #
3759 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
3760 #
3761 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
3762 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3763 &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.
3764 &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.
3765 &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.
3766 #
3767 # The key must meet the following requirements before you can provide it to Compute Engine:
3768 # - The key is wrapped using a RSA public key certificate provided by Google.
3769 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3770 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3771 &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.
3772 },
3773 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
3774 &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.
3775 #
3776 # To see the latest fingerprint, make get() request to the instance.
3777 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
3778 &quot;a_key&quot;: &quot;A String&quot;,
3779 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003780 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
3781 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
3782 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07003783 &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:
3784 # zones/us-central1-f/machineTypes/n1-standard-1
3785 #
3786 #
3787 # 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):
3788 # zones/zone/machineTypes/custom-CPUS-MEMORY
3789 #
3790 #
3791 # For example: zones/us-central1-f/machineTypes/custom-4-5120
3792 #
3793 # For a full list of restrictions, read the Specifications for custom machine types.
3794 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
3795 &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.
3796 #
3797 # To see the latest fingerprint, make a get() request to retrieve the resource.
3798 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3799 {
3800 &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.
3801 &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).
3802 },
3803 ],
3804 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
3805 },
3806 &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;.
3807 &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.
3808 &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.
3809 { # A network interface resource attached to an instance.
3810 &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.
3811 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
3812 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
3813 &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.
3814 &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.
3815 &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.
3816 #
3817 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
3818 #
3819 # 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.
3820 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
3821 &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.
3822 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
3823 &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.
3824 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
3825 },
3826 ],
3827 &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.
3828 { # An alias IP range attached to an instance&#x27;s network interface.
3829 &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).
3830 &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.
3831 },
3832 ],
3833 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
3834 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
3835 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
3836 &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.
3837 &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.
3838 #
3839 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
3840 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
3841 # - projects/project/global/networks/network
3842 # - global/networks/default
3843 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003844 &quot;queueCount&quot;: 42, # The networking queue count for the network interface. Both Rx and Tx queues will be set to this number. If it&#x27;s not specified by the user, a default number of queues will be assigned. For Virtio-net, each interface will get (min(#vCPU, 32) / #vNIC) queues. For gVNIC, each interface will get (min(#vCPU / 2, 16) / #vNIC) qeueus.
Bu Sun Kim65020912020-05-20 12:08:20 -07003845 &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:
3846 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
3847 # - regions/region/subnetworks/subnetwork
3848 },
3849 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003850 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003851 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
3852 &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.
3853 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
3854 &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.
3855 &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.
3856 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
3857 &quot;A String&quot;,
3858 ],
3859 },
3860 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
3861 &quot;A String&quot;,
3862 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003863 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
3864 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003865 &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.
3866 #
3867 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
3868 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
3869 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003870 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003871 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
3872 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
3873 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
3874 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3875 &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.
3876 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3877 &quot;A String&quot;,
3878 ],
3879 },
3880 ],
3881 &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 -07003882 &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 -07003883 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003884 &quot;secureLabels&quot;: [ # Secure labels to apply to this instance. These can be later modified by the update method. Maximum number of secure labels allowed is 300.
3885 &quot;A String&quot;,
3886 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003887 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3888 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3889 &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.
3890 #
3891 # 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.
3892 { # A service account.
3893 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3894 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
3895 &quot;A String&quot;,
3896 ],
3897 },
3898 ],
3899 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
3900 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
3901 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
3902 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
3903 },
3904 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
3905 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3906 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003907 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07003908 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
3909 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
3910 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
3911 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003912 &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 -07003913 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3914 },
3915 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003916 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07003917 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3918 &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.
3919 &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.
3920 &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.
3921 #
3922 # The key must meet the following requirements before you can provide it to Compute Engine:
3923 # - The key is wrapped using a RSA public key certificate provided by Google.
3924 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3925 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3926 &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.
3927 },
3928 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003929 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07003930 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
3931 &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.
3932 &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.
3933 #
3934 # To see the latest fingerprint, make get() request to the instance.
3935 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3936 &quot;A String&quot;,
3937 ],
3938 },
3939 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003940 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
3941 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07003942 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
3943 },
3944 &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 -07003945 },
3946 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003947 &quot;kind&quot;: &quot;compute#instanceList&quot;, # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
3948 &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.
3949 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3950 &quot;warning&quot;: { # [Output Only] Informational warning message.
3951 &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.
3952 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3953 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003954 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003955 &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).
3956 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003957 },
3958 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003959 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003960 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003961 }</pre>
3962</div>
3963
3964<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003965 <code class="details" id="listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003966 <pre>Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003967
3968Args:
3969 project: string, Project ID for this request. (required)
3970 zone: string, The name of the zone for this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07003971 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 -07003972 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 -04003973
Dan O'Mearadd494642020-05-01 07:42:23 -07003974For 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 -04003975
Dan O'Mearadd494642020-05-01 07:42:23 -07003976You 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 -04003977
Bu Sun Kim65020912020-05-20 12:08:20 -07003978To 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 -07003979 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 -07003980 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3981
3982You 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.
3983
3984Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003985 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Bu Sun Kim65020912020-05-20 12:08:20 -07003986 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003987
3988Returns:
3989 An object of the form:
3990
3991 { # Contains a list of instance referrers.
Bu Sun Kim65020912020-05-20 12:08:20 -07003992 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3993 &quot;items&quot;: [ # A list of Reference resources.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003994 { # Represents a reference to a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003995 &quot;kind&quot;: &quot;compute#reference&quot;, # [Output Only] Type of the resource. Always compute#reference for references.
3996 &quot;referenceType&quot;: &quot;A String&quot;, # A description of the reference type with no implied semantics. Possible values include:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003997 # - MEMBER_OF
Bu Sun Kim65020912020-05-20 12:08:20 -07003998 &quot;referrer&quot;: &quot;A String&quot;, # URL of the resource which refers to the target.
3999 &quot;target&quot;: &quot;A String&quot;, # URL of the resource to which this reference points.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004000 },
4001 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004002 &quot;kind&quot;: &quot;compute#instanceListReferrers&quot;, # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
4003 &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.
4004 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
4005 &quot;warning&quot;: { # [Output Only] Informational warning message.
4006 &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.
4007 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4008 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004009 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004010 &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).
4011 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004012 },
4013 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004014 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004015 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004016 }</pre>
4017</div>
4018
4019<div class="method">
4020 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
4021 <pre>Retrieves the next page of results.
4022
4023Args:
4024 previous_request: The request for the previous page. (required)
4025 previous_response: The response from the request for the previous page. (required)
4026
4027Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07004028 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004029 page. Returns None if there are no more items in the collection.
4030 </pre>
4031</div>
4032
4033<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004034 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
4035 <pre>Retrieves the next page of results.
4036
4037Args:
4038 previous_request: The request for the previous page. (required)
4039 previous_response: The response from the request for the previous page. (required)
4040
4041Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07004042 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004043 page. Returns None if there are no more items in the collection.
4044 </pre>
4045</div>
4046
4047<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004048 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004049 <pre>Removes resource policies from an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004050
4051Args:
4052 project: string, Project ID for this request. (required)
4053 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004054 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004055 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004056 The object takes the form of:
4057
4058{
Bu Sun Kim65020912020-05-20 12:08:20 -07004059 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this instance.
4060 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004061 ],
4062 }
4063
4064 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.
4065
4066For 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.
4067
4068The 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 -07004069
4070Returns:
4071 An object of the form:
4072
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004073 { # Represents an Operation resource.
4074 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004075 # Google Compute Engine has three Operation resources:
4076 #
4077 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4078 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004079 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4080 #
4081 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004082 # - For global operations, use the `globalOperations` resource.
4083 # - For regional operations, use the `regionOperations` resource.
4084 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004085 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004086 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004087 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4088 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4089 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4090 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4091 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4092 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004093 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004094 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4095 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4096 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004097 },
4098 ],
4099 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004100 &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`.
4101 &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.
4102 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4103 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4104 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4105 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4106 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4107 &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.
4108 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4109 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4110 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4111 &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.
4112 &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`.
4113 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4114 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4115 &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.
4116 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4117 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4118 {
4119 &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.
4120 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4121 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4122 {
4123 &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).
4124 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4125 },
4126 ],
4127 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4128 },
4129 ],
4130 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004131 }</pre>
4132</div>
4133
4134<div class="method">
4135 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
4136 <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.
4137
4138Args:
4139 project: string, Project ID for this request. (required)
4140 zone: string, The name of the zone for this request. (required)
4141 instance: string, Name of the instance scoping this request. (required)
4142 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.
4143
4144For 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.
4145
4146The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4147
4148Returns:
4149 An object of the form:
4150
4151 { # Represents an Operation resource.
4152 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004153 # Google Compute Engine has three Operation resources:
4154 #
4155 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4156 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004157 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4158 #
4159 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004160 # - For global operations, use the `globalOperations` resource.
4161 # - For regional operations, use the `regionOperations` resource.
4162 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004163 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004164 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004165 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4166 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4167 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4168 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4169 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4170 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004171 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004172 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4173 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4174 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004175 },
4176 ],
4177 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004178 &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`.
4179 &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.
4180 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4181 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4182 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4183 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4184 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4185 &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.
4186 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4187 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4188 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4189 &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.
4190 &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`.
4191 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4192 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4193 &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.
4194 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4195 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4196 {
4197 &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.
4198 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4199 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4200 {
4201 &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).
4202 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4203 },
4204 ],
4205 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4206 },
4207 ],
4208 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004209 }</pre>
4210</div>
4211
4212<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004213 <code class="details" id="resume">resume(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004214 <pre>Resumes an instance that was suspended using the instances().suspend method.
4215
4216Args:
4217 project: string, Project ID for this request. (required)
4218 zone: string, The name of the zone for this request. (required)
4219 instance: string, Name of the instance resource to resume. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004220 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004221 The object takes the form of:
4222
4223{
Bu Sun Kim65020912020-05-20 12:08:20 -07004224 &quot;disks&quot;: [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004225 #
4226 # In order to resume the instance, the disk url and its corresponding key must be provided.
4227 #
4228 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
4229 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004230 &quot;diskEncryptionKey&quot;: { # Decrypts data associated with the disk with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07004231 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4232 &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.
4233 &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.
4234 &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 -07004235 #
4236 # The key must meet the following requirements before you can provide it to Compute Engine:
4237 # - The key is wrapped using a RSA public key certificate provided by Google.
4238 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
4239 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07004240 &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 -07004241 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004242 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004243 },
4244 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004245 &quot;instanceEncryptionKey&quot;: { # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07004246 #
4247 # 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.
4248 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4249 &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.
4250 &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.
4251 &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.
4252 #
4253 # The key must meet the following requirements before you can provide it to Compute Engine:
4254 # - The key is wrapped using a RSA public key certificate provided by Google.
4255 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
4256 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
4257 &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.
4258 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004259 }
4260
4261 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.
4262
4263For 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.
4264
4265The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4266
4267Returns:
4268 An object of the form:
4269
4270 { # Represents an Operation resource.
4271 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004272 # Google Compute Engine has three Operation resources:
4273 #
4274 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4275 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004276 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4277 #
4278 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004279 # - For global operations, use the `globalOperations` resource.
4280 # - For regional operations, use the `regionOperations` resource.
4281 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004282 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004283 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004284 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4285 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4286 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4287 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4288 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4289 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004290 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004291 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4292 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4293 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004294 },
4295 ],
4296 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004297 &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`.
4298 &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.
4299 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4300 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4301 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4302 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4303 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4304 &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.
4305 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4306 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4307 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4308 &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.
4309 &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`.
4310 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4311 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4312 &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.
4313 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4314 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4315 {
4316 &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.
4317 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4318 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4319 {
4320 &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).
4321 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4322 },
4323 ],
4324 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4325 },
4326 ],
4327 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004328 }</pre>
4329</div>
4330
4331<div class="method">
4332 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
4333 <pre>Sets deletion protection on the instance.
4334
4335Args:
4336 project: string, Project ID for this request. (required)
4337 zone: string, The name of the zone for this request. (required)
4338 resource: string, Name or id of the resource for this request. (required)
4339 deletionProtection: boolean, Whether the resource should be protected against deletion.
4340 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.
4341
4342For 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.
4343
4344The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4345
4346Returns:
4347 An object of the form:
4348
4349 { # Represents an Operation resource.
4350 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004351 # Google Compute Engine has three Operation resources:
4352 #
4353 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4354 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004355 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4356 #
4357 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004358 # - For global operations, use the `globalOperations` resource.
4359 # - For regional operations, use the `regionOperations` resource.
4360 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004361 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004362 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004363 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4364 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4365 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4366 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4367 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4368 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004369 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004370 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4371 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4372 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004373 },
4374 ],
4375 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004376 &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`.
4377 &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.
4378 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4379 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4380 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4381 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4382 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4383 &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.
4384 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4385 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4386 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4387 &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.
4388 &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`.
4389 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4390 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4391 &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.
4392 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4393 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4394 {
4395 &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.
4396 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4397 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4398 {
4399 &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).
4400 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4401 },
4402 ],
4403 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4404 },
4405 ],
4406 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004407 }</pre>
4408</div>
4409
4410<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004411 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004412 <pre>Sets the auto-delete flag for a disk attached to an instance.
4413
4414Args:
4415 project: string, Project ID for this request. (required)
4416 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004417 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004418 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004419 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)
4420 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.
4421
4422For 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.
4423
4424The 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 -07004425
4426Returns:
4427 An object of the form:
4428
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004429 { # Represents an Operation resource.
4430 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004431 # Google Compute Engine has three Operation resources:
4432 #
4433 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4434 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004435 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4436 #
4437 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004438 # - For global operations, use the `globalOperations` resource.
4439 # - For regional operations, use the `regionOperations` resource.
4440 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004441 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004442 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004443 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4444 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4445 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4446 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4447 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4448 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004449 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004450 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4451 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4452 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004453 },
4454 ],
4455 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004456 &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`.
4457 &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.
4458 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4459 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4460 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4461 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4462 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4463 &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.
4464 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4465 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4466 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4467 &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.
4468 &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`.
4469 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4470 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4471 &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.
4472 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4473 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4474 {
4475 &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.
4476 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4477 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4478 {
4479 &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).
4480 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4481 },
4482 ],
4483 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4484 },
4485 ],
4486 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004487 }</pre>
4488</div>
4489
4490<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004491 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004492 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
4493
4494Args:
4495 project: string, Project ID for this request. (required)
4496 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004497 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004498 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004499 The object takes the form of:
4500
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004501{
Bu Sun Kim65020912020-05-20 12:08:20 -07004502 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
4503 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004504 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07004505 &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.
4506 #
4507 # If the condition evaluates to `true`, then this binding applies to the current request.
4508 #
4509 # 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.
4510 #
4511 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4512 #
4513 # Example (Comparison):
4514 #
4515 # 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;
4516 #
4517 # Example (Equality):
4518 #
4519 # 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;
4520 #
4521 # Example (Logic):
4522 #
4523 # 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;
4524 #
4525 # Example (Data Manipulation):
4526 #
4527 # 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;
4528 #
4529 # 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.
4530 &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.
4531 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4532 &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.
4533 &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.
4534 },
4535 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
4536 #
4537 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4538 #
4539 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4540 #
4541 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
4542 #
4543 #
4544 #
4545 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4546 #
4547 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4548 #
4549 # * `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.
4550 #
4551 # * `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.
4552 #
4553 # * `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.
4554 #
4555 #
4556 #
4557 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
4558 &quot;A String&quot;,
4559 ],
4560 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
4561 },
4562 ],
4563 &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.
4564 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004565 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004566 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004567 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004568 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004569 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004570 # 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 -07004571 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004572 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004573 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004574 # { &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 -07004575 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004576 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004577 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004578 # 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 -07004579 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004580 # 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 -07004581 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004582 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004583 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004584 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004585 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004586 # Example Policy with multiple AuditConfigs:
4587 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004588 # { &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 -07004589 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004590 # 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 -07004591 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004592 { # Provides the configuration for logging a type of permissions. Example:
4593 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004594 # { &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 -07004595 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004596 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
4597 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4598 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004599 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004600 &quot;ignoreChildExemptions&quot;: True or False,
4601 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004602 },
4603 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004604 &quot;exemptedMembers&quot;: [
4605 &quot;A String&quot;,
4606 ],
4607 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004608 },
4609 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004610 &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 -07004611 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004612 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07004613 &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.
4614 #
4615 # If the condition evaluates to `true`, then this binding applies to the current request.
4616 #
4617 # 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.
4618 #
4619 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4620 #
4621 # Example (Comparison):
4622 #
4623 # 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;
4624 #
4625 # Example (Equality):
4626 #
4627 # 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;
4628 #
4629 # Example (Logic):
4630 #
4631 # 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;
4632 #
4633 # Example (Data Manipulation):
4634 #
4635 # 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;
4636 #
4637 # 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.
4638 &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.
4639 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4640 &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.
4641 &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.
4642 },
4643 &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 -07004644 #
4645 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4646 #
4647 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4648 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004649 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004650 #
4651 #
4652 #
4653 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4654 #
4655 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4656 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004657 # * `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.
4658 #
4659 # * `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.
4660 #
4661 # * `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.
4662 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004663 #
4664 #
4665 # * `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 -07004666 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004667 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004668 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004669 },
4670 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004671 &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.
4672 #
4673 # **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.
4674 &quot;iamOwned&quot;: True or False,
4675 &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.
4676 { # A rule to be applied in a Policy.
4677 &quot;action&quot;: &quot;A String&quot;, # Required
4678 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4679 { # A condition to be met.
4680 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
4681 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
4682 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
4683 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4684 &quot;values&quot;: [ # The objects of the condition.
4685 &quot;A String&quot;,
4686 ],
4687 },
4688 ],
4689 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
4690 &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.
4691 &quot;A String&quot;,
4692 ],
4693 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4694 { # Specifies what kind of log the caller must write
4695 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
4696 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4697 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
4698 },
4699 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
4700 },
4701 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
4702 #
4703 # 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.
4704 #
4705 # Field names correspond to IAM request parameters and field values are their respective values.
4706 #
4707 # 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.
4708 #
4709 # 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]}
4710 &quot;customFields&quot;: [ # Custom fields.
4711 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4712 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
4713 &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.
4714 },
4715 ],
4716 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
4717 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
4718 },
4719 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
4720 &quot;logMode&quot;: &quot;A String&quot;,
4721 },
4722 },
4723 ],
4724 &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.
4725 &quot;A String&quot;,
4726 ],
4727 &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.
4728 &quot;A String&quot;,
4729 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004730 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004731 ],
4732 &quot;version&quot;: 42, # Specifies the format of the policy.
4733 #
4734 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4735 #
4736 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4737 #
4738 # * 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
4739 #
4740 # **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.
4741 #
4742 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
4743 #
4744 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4745 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004746 }
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004747
4748
4749Returns:
4750 An object of the form:
4751
Dan O'Mearadd494642020-05-01 07:42:23 -07004752 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004753 #
4754 #
4755 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004756 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004757 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004758 # 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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004759 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004760 # **JSON example:**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004761 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004762 # { &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 -07004763 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004764 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004765 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004766 # 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 -07004767 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004768 # 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 -07004769 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004770 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004771 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004772 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004773 #
4774 # Example Policy with multiple AuditConfigs:
4775 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004776 # { &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; ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004777 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004778 # 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 -07004779 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004780 { # Provides the configuration for logging a type of permissions. Example:
4781 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004782 # { &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; } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004783 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004784 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
4785 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4786 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004787 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004788 &quot;ignoreChildExemptions&quot;: True or False,
4789 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004790 },
4791 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004792 &quot;exemptedMembers&quot;: [
4793 &quot;A String&quot;,
4794 ],
4795 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004796 },
4797 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004798 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004799 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004800 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07004801 &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.
4802 #
4803 # If the condition evaluates to `true`, then this binding applies to the current request.
4804 #
4805 # 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.
4806 #
4807 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4808 #
4809 # Example (Comparison):
4810 #
4811 # 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;
4812 #
4813 # Example (Equality):
4814 #
4815 # 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;
4816 #
4817 # Example (Logic):
4818 #
4819 # 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;
4820 #
4821 # Example (Data Manipulation):
4822 #
4823 # 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;
4824 #
4825 # 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.
4826 &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.
4827 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4828 &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.
4829 &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.
4830 },
4831 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004832 #
4833 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4834 #
4835 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4836 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004837 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004838 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004839 #
4840 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004841 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4842 #
4843 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4844 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004845 # * `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.
4846 #
4847 # * `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.
4848 #
4849 # * `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.
4850 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004851 #
4852 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004853 # * `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 -07004854 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004855 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004856 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004857 },
4858 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004859 &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.
4860 #
4861 # **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.
4862 &quot;iamOwned&quot;: True or False,
4863 &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.
4864 { # A rule to be applied in a Policy.
4865 &quot;action&quot;: &quot;A String&quot;, # Required
4866 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4867 { # A condition to be met.
4868 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
4869 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
4870 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
4871 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4872 &quot;values&quot;: [ # The objects of the condition.
4873 &quot;A String&quot;,
4874 ],
4875 },
4876 ],
4877 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
4878 &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.
4879 &quot;A String&quot;,
4880 ],
4881 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4882 { # Specifies what kind of log the caller must write
4883 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
4884 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4885 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
4886 },
4887 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
4888 },
4889 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
4890 #
4891 # 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.
4892 #
4893 # Field names correspond to IAM request parameters and field values are their respective values.
4894 #
4895 # 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.
4896 #
4897 # 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]}
4898 &quot;customFields&quot;: [ # Custom fields.
4899 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4900 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
4901 &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.
4902 },
4903 ],
4904 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
4905 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
4906 },
4907 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
4908 &quot;logMode&quot;: &quot;A String&quot;,
4909 },
4910 },
4911 ],
4912 &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.
4913 &quot;A String&quot;,
4914 ],
4915 &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.
4916 &quot;A String&quot;,
4917 ],
4918 },
4919 ],
4920 &quot;version&quot;: 42, # Specifies the format of the policy.
4921 #
4922 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4923 #
4924 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4925 #
4926 # * 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
4927 #
4928 # **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.
4929 #
4930 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
4931 #
4932 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004933 }</pre>
4934</div>
4935
4936<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004937 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004938 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004939
4940Args:
4941 project: string, Project ID for this request. (required)
4942 zone: string, The name of the zone for this request. (required)
4943 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004944 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004945 The object takes the form of:
4946
4947{
Bu Sun Kim65020912020-05-20 12:08:20 -07004948 &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.
4949 &quot;labels&quot;: {
4950 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004951 },
4952 }
4953
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004954 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.
4955
4956For 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.
4957
4958The 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 -07004959
4960Returns:
4961 An object of the form:
4962
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004963 { # Represents an Operation resource.
4964 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004965 # Google Compute Engine has three Operation resources:
4966 #
4967 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4968 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004969 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4970 #
4971 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004972 # - For global operations, use the `globalOperations` resource.
4973 # - For regional operations, use the `regionOperations` resource.
4974 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004975 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004976 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004977 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4978 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4979 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4980 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4981 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4982 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004983 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004984 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4985 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4986 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004987 },
4988 ],
4989 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004990 &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`.
4991 &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.
4992 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4993 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4994 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4995 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4996 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4997 &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.
4998 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4999 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5000 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5001 &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.
5002 &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`.
5003 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5004 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5005 &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.
5006 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5007 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5008 {
5009 &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.
5010 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5011 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5012 {
5013 &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).
5014 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5015 },
5016 ],
5017 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5018 },
5019 ],
5020 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005021 }</pre>
5022</div>
5023
5024<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005025 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005026 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
5027
5028Args:
5029 project: string, Project ID for this request. (required)
5030 zone: string, The name of the zone for this request. (required)
5031 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005032 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005033 The object takes the form of:
5034
5035{
Bu Sun Kim65020912020-05-20 12:08:20 -07005036 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005037 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005038 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
5039 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005040 },
5041 ],
5042 }
5043
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005044 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.
5045
5046For 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.
5047
5048The 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 -04005049
5050Returns:
5051 An object of the form:
5052
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005053 { # Represents an Operation resource.
5054 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005055 # Google Compute Engine has three Operation resources:
5056 #
5057 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5058 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005059 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5060 #
5061 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005062 # - For global operations, use the `globalOperations` resource.
5063 # - For regional operations, use the `regionOperations` resource.
5064 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005065 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005066 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005067 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5068 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5069 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5070 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5071 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5072 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005073 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005074 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5075 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5076 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005077 },
5078 ],
5079 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005080 &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`.
5081 &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.
5082 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5083 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5084 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5085 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5086 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5087 &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.
5088 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5089 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5090 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5091 &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.
5092 &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`.
5093 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5094 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5095 &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.
5096 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5097 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5098 {
5099 &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.
5100 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5101 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5102 {
5103 &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).
5104 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5105 },
5106 ],
5107 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5108 },
5109 ],
5110 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005111 }</pre>
5112</div>
5113
5114<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005115 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005116 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
5117
5118Args:
5119 project: string, Project ID for this request. (required)
5120 zone: string, The name of the zone for this request. (required)
5121 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005122 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005123 The object takes the form of:
5124
5125{
Bu Sun Kim65020912020-05-20 12:08:20 -07005126 &quot;machineType&quot;: &quot;A String&quot;, # Full or partial URL of the machine type resource. See Machine Types for a full list of machine types. For example: zones/us-central1-f/machineTypes/n1-standard-1
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005127 }
5128
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005129 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.
5130
5131For 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.
5132
5133The 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 -07005134
5135Returns:
5136 An object of the form:
5137
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005138 { # Represents an Operation resource.
5139 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005140 # Google Compute Engine has three Operation resources:
5141 #
5142 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5143 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005144 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5145 #
5146 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005147 # - For global operations, use the `globalOperations` resource.
5148 # - For regional operations, use the `regionOperations` resource.
5149 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005150 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005151 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005152 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5153 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5154 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5155 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5156 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5157 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005158 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005159 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5160 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5161 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005162 },
5163 ],
5164 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005165 &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`.
5166 &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.
5167 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5168 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5169 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5170 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5171 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5172 &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.
5173 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5174 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5175 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5176 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5177 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5178 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5179 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5180 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
5181 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5182 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5183 {
5184 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5185 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5186 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5187 {
5188 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
5189 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5190 },
5191 ],
5192 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5193 },
5194 ],
5195 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005196 }</pre>
5197</div>
5198
5199<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005200 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005201 <pre>Sets metadata for the specified instance to the data included in the request.
5202
5203Args:
5204 project: string, Project ID for this request. (required)
5205 zone: string, The name of the zone for this request. (required)
5206 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005207 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005208 The object takes the form of:
5209
5210{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07005211 &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 -07005212 #
5213 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07005214 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
5215 {
5216 &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.
5217 &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).
5218 },
5219 ],
5220 &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 -07005221}
5222
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005223 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.
5224
5225For 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.
5226
5227The 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 -07005228
5229Returns:
5230 An object of the form:
5231
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005232 { # Represents an Operation resource.
5233 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005234 # Google Compute Engine has three Operation resources:
5235 #
5236 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5237 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005238 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5239 #
5240 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005241 # - For global operations, use the `globalOperations` resource.
5242 # - For regional operations, use the `regionOperations` resource.
5243 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005244 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005245 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005246 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5247 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5248 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5249 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5250 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5251 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005252 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005253 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5254 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5255 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005256 },
5257 ],
5258 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005259 &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`.
5260 &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.
5261 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5262 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5263 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5264 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5265 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5266 &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.
5267 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5268 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5269 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5270 &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.
5271 &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`.
5272 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5273 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5274 &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.
5275 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5276 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5277 {
5278 &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.
5279 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5280 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5281 {
5282 &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).
5283 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5284 },
5285 ],
5286 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5287 },
5288 ],
5289 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005290 }</pre>
5291</div>
5292
5293<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005294 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005295 <pre>Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005296
5297Args:
5298 project: string, Project ID for this request. (required)
5299 zone: string, The name of the zone for this request. (required)
5300 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005301 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005302 The object takes the form of:
5303
5304{
Bu Sun Kim65020912020-05-20 12:08:20 -07005305 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform this instance should be started at.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005306 }
5307
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005308 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.
5309
5310For 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.
5311
5312The 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 -04005313
5314Returns:
5315 An object of the form:
5316
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005317 { # Represents an Operation resource.
5318 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005319 # Google Compute Engine has three Operation resources:
5320 #
5321 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5322 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005323 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5324 #
5325 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005326 # - For global operations, use the `globalOperations` resource.
5327 # - For regional operations, use the `regionOperations` resource.
5328 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005329 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005330 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005331 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5332 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5333 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5334 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5335 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5336 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005337 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005338 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5339 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5340 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005341 },
5342 ],
5343 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005344 &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`.
5345 &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.
5346 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5347 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5348 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5349 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5350 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5351 &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.
5352 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5353 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5354 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5355 &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.
5356 &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`.
5357 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5358 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5359 &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.
5360 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5361 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5362 {
5363 &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.
5364 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5365 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5366 {
5367 &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).
5368 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5369 },
5370 ],
5371 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5372 },
5373 ],
5374 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005375 }</pre>
5376</div>
5377
5378<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005379 <code class="details" id="setName">setName(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005380 <pre>Sets name of an instance.
5381
5382Args:
5383 project: string, Project ID for this request. (required)
5384 zone: string, The name of the zone for this request. (required)
5385 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005386 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005387 The object takes the form of:
5388
5389{
Bu Sun Kim65020912020-05-20 12:08:20 -07005390 &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.
5391 &quot;name&quot;: &quot;A String&quot;, # The name to be applied to the instance. Needs to be RFC 1035 compliant.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005392 }
5393
5394 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.
5395
5396For 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.
5397
5398The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5399
5400Returns:
5401 An object of the form:
5402
5403 { # Represents an Operation resource.
5404 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005405 # Google Compute Engine has three Operation resources:
5406 #
5407 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5408 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005409 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5410 #
5411 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005412 # - For global operations, use the `globalOperations` resource.
5413 # - For regional operations, use the `regionOperations` resource.
5414 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005415 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005416 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005417 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5418 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5419 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5420 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5421 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5422 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005423 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005424 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5425 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5426 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005427 },
5428 ],
5429 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005430 &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`.
5431 &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.
5432 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5433 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5434 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5435 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5436 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5437 &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.
5438 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5439 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5440 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5441 &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.
5442 &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`.
5443 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5444 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5445 &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.
5446 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5447 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5448 {
5449 &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.
5450 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5451 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5452 {
5453 &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).
5454 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5455 },
5456 ],
5457 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5458 },
5459 ],
5460 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005461 }</pre>
5462</div>
5463
5464<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005465 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005466 <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 -07005467
5468Args:
5469 project: string, Project ID for this request. (required)
5470 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005471 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005472 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005473 The object takes the form of:
5474
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07005475{ # Sets the scheduling options for an Instance. NextID: 13
Bu Sun Kim65020912020-05-20 12:08:20 -07005476 &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.
5477 #
5478 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
5479 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
5480 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005481 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005482 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
5483 &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 -07005484 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Bu Sun Kim65020912020-05-20 12:08:20 -07005485 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
5486 &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.
5487 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
5488 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005489 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005490 },
5491 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005492 &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 -07005493 &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 -07005494}
5495
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005496 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.
5497
5498For 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.
5499
5500The 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 -07005501
5502Returns:
5503 An object of the form:
5504
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005505 { # Represents an Operation resource.
5506 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005507 # Google Compute Engine has three Operation resources:
5508 #
5509 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5510 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005511 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5512 #
5513 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005514 # - For global operations, use the `globalOperations` resource.
5515 # - For regional operations, use the `regionOperations` resource.
5516 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005517 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005518 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005519 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5520 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5521 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5522 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5523 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5524 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005525 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005526 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5527 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5528 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005529 },
5530 ],
5531 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005532 &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`.
5533 &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.
5534 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5535 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5536 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5537 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5538 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5539 &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.
5540 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5541 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5542 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5543 &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.
5544 &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`.
5545 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5546 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5547 &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.
5548 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5549 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5550 {
5551 &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.
5552 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5553 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5554 {
5555 &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).
5556 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5557 },
5558 ],
5559 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5560 },
5561 ],
5562 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005563 }</pre>
5564</div>
5565
5566<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005567 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005568 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005569
5570Args:
5571 project: string, Project ID for this request. (required)
5572 zone: string, The name of the zone for this request. (required)
5573 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005574 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005575 The object takes the form of:
5576
5577{
Bu Sun Kim65020912020-05-20 12:08:20 -07005578 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
5579 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
5580 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005581 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005582 }
5583
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005584 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.
5585
5586For 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.
5587
5588The 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 -07005589
5590Returns:
5591 An object of the form:
5592
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005593 { # Represents an Operation resource.
5594 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005595 # Google Compute Engine has three Operation resources:
5596 #
5597 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5598 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005599 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5600 #
5601 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005602 # - For global operations, use the `globalOperations` resource.
5603 # - For regional operations, use the `regionOperations` resource.
5604 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005605 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005606 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005607 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5608 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5609 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5610 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5611 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5612 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005613 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005614 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5615 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5616 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005617 },
5618 ],
5619 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005620 &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`.
5621 &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.
5622 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5623 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5624 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5625 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5626 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5627 &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.
5628 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5629 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5630 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5631 &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.
5632 &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`.
5633 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5634 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5635 &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.
5636 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5637 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5638 {
5639 &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.
5640 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5641 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5642 {
5643 &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).
5644 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5645 },
5646 ],
5647 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5648 },
5649 ],
5650 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005651 }</pre>
5652</div>
5653
5654<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005655 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005656 <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.
5657
5658Args:
5659 project: string, Project ID for this request. (required)
5660 zone: string, The name of the zone for this request. (required)
5661 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005662 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005663 The object takes the form of:
5664
5665{ # The policy describes the baseline against which Instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07005666 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
Dan O'Mearadd494642020-05-01 07:42:23 -07005667}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005668
5669 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.
5670
5671For 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.
5672
5673The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5674
5675Returns:
5676 An object of the form:
5677
5678 { # Represents an Operation resource.
5679 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005680 # Google Compute Engine has three Operation resources:
5681 #
5682 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5683 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005684 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5685 #
5686 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005687 # - For global operations, use the `globalOperations` resource.
5688 # - For regional operations, use the `regionOperations` resource.
5689 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005690 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005691 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005692 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5693 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5694 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5695 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5696 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5697 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005698 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005699 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5700 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5701 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005702 },
5703 ],
5704 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005705 &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`.
5706 &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.
5707 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5708 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5709 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5710 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5711 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5712 &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.
5713 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5714 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5715 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5716 &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.
5717 &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`.
5718 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5719 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5720 &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.
5721 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5722 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5723 {
5724 &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.
5725 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5726 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5727 {
5728 &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).
5729 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5730 },
5731 ],
5732 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5733 },
5734 ],
5735 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005736 }</pre>
5737</div>
5738
5739<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005740 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005741 <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.
5742
5743Args:
5744 project: string, Project ID for this request. (required)
5745 zone: string, The name of the zone for this request. (required)
5746 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005747 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005748 The object takes the form of:
5749
5750{ # The policy describes the baseline against which VM instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07005751 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005752}
5753
5754 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.
5755
5756For 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.
5757
5758The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5759
5760Returns:
5761 An object of the form:
5762
5763 { # Represents an Operation resource.
5764 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005765 # Google Compute Engine has three Operation resources:
5766 #
5767 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5768 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005769 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5770 #
5771 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005772 # - For global operations, use the `globalOperations` resource.
5773 # - For regional operations, use the `regionOperations` resource.
5774 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005775 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005776 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005777 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5778 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5779 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5780 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5781 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5782 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005783 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005784 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5785 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5786 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005787 },
5788 ],
5789 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005790 &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`.
5791 &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.
5792 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5793 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5794 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5795 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5796 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5797 &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.
5798 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5799 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5800 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5801 &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.
5802 &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`.
5803 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5804 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5805 &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.
5806 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5807 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5808 {
5809 &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.
5810 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5811 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5812 {
5813 &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).
5814 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5815 },
5816 ],
5817 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5818 },
5819 ],
5820 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005821 }</pre>
5822</div>
5823
5824<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005825 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005826 <pre>Sets network tags for the specified instance to the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005827
5828Args:
5829 project: string, Project ID for this request. (required)
5830 zone: string, The name of the zone for this request. (required)
5831 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005832 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005833 The object takes the form of:
5834
5835{ # A set of instance tags.
Bu Sun Kim65020912020-05-20 12:08:20 -07005836 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005837 #
5838 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005839 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
5840 &quot;A String&quot;,
5841 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005842}
5843
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005844 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.
5845
5846For 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.
5847
5848The 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 -07005849
5850Returns:
5851 An object of the form:
5852
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005853 { # Represents an Operation resource.
5854 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005855 # Google Compute Engine has three Operation resources:
5856 #
5857 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5858 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005859 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5860 #
5861 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005862 # - For global operations, use the `globalOperations` resource.
5863 # - For regional operations, use the `regionOperations` resource.
5864 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005865 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005866 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005867 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5868 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5869 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5870 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5871 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5872 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005873 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005874 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5875 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5876 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005877 },
5878 ],
5879 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005880 &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`.
5881 &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.
5882 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5883 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5884 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5885 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5886 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5887 &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.
5888 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5889 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5890 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5891 &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.
5892 &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`.
5893 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5894 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5895 &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.
5896 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5897 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5898 {
5899 &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.
5900 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5901 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5902 {
5903 &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).
5904 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5905 },
5906 ],
5907 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5908 },
5909 ],
5910 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005911 }</pre>
5912</div>
5913
5914<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005915 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
5916 <pre>Simulates a maintenance event on the instance.
5917
5918Args:
5919 project: string, Project ID for this request. (required)
5920 zone: string, The name of the zone for this request. (required)
5921 instance: string, Name of the instance scoping this request. (required)
5922
5923Returns:
5924 An object of the form:
5925
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005926 { # Represents an Operation resource.
5927 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005928 # Google Compute Engine has three Operation resources:
5929 #
5930 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5931 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005932 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5933 #
5934 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005935 # - For global operations, use the `globalOperations` resource.
5936 # - For regional operations, use the `regionOperations` resource.
5937 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005938 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005939 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005940 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5941 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5942 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5943 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5944 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5945 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005946 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005947 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5948 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5949 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005950 },
5951 ],
5952 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005953 &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`.
5954 &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.
5955 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5956 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5957 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5958 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5959 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5960 &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.
5961 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5962 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5963 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5964 &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.
5965 &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`.
5966 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5967 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5968 &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.
5969 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5970 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5971 {
5972 &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.
5973 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5974 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5975 {
5976 &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).
5977 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5978 },
5979 ],
5980 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5981 },
5982 ],
5983 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005984 }</pre>
5985</div>
5986
5987<div class="method">
5988 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005989 <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 -07005990
5991Args:
5992 project: string, Project ID for this request. (required)
5993 zone: string, The name of the zone for this request. (required)
5994 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005995 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.
5996
5997For 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.
5998
5999The 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 -07006000
6001Returns:
6002 An object of the form:
6003
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006004 { # Represents an Operation resource.
6005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006006 # Google Compute Engine has three Operation resources:
6007 #
6008 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6009 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006010 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6011 #
6012 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006013 # - For global operations, use the `globalOperations` resource.
6014 # - For regional operations, use the `regionOperations` resource.
6015 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006016 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006017 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006018 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6019 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6020 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6021 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6022 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6023 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006024 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006025 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6026 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6027 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006028 },
6029 ],
6030 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006031 &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`.
6032 &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.
6033 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6034 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6035 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6036 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6037 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6038 &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.
6039 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6040 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6041 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6042 &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.
6043 &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`.
6044 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6045 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6046 &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.
6047 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6048 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6049 {
6050 &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.
6051 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6052 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6053 {
6054 &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).
6055 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6056 },
6057 ],
6058 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6059 },
6060 ],
6061 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006062 }</pre>
6063</div>
6064
6065<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006066 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006067 <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 -07006068
6069Args:
6070 project: string, Project ID for this request. (required)
6071 zone: string, The name of the zone for this request. (required)
6072 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006073 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006074 The object takes the form of:
6075
6076{
Bu Sun Kim65020912020-05-20 12:08:20 -07006077 &quot;disks&quot;: [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006078 #
6079 # In order to start the instance, the disk url and its corresponding key must be provided.
6080 #
6081 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
6082 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006083 &quot;diskEncryptionKey&quot;: { # Decrypts data associated with the disk with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07006084 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6085 &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.
6086 &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.
6087 &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 -07006088 #
6089 # The key must meet the following requirements before you can provide it to Compute Engine:
6090 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006091 # - 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 -07006092 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07006093 &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 -07006094 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006095 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006096 },
6097 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006098 &quot;instanceEncryptionKey&quot;: { # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07006099 #
6100 # If the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance start will not succeed.
6101 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6102 &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.
6103 &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.
6104 &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.
6105 #
6106 # The key must meet the following requirements before you can provide it to Compute Engine:
6107 # - The key is wrapped using a RSA public key certificate provided by Google.
6108 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6109 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6110 &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.
6111 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006112 }
6113
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006114 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.
6115
6116For 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.
6117
6118The 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 -07006119
6120Returns:
6121 An object of the form:
6122
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006123 { # Represents an Operation resource.
6124 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006125 # Google Compute Engine has three Operation resources:
6126 #
6127 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6128 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006129 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6130 #
6131 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006132 # - For global operations, use the `globalOperations` resource.
6133 # - For regional operations, use the `regionOperations` resource.
6134 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006135 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006136 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006137 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6138 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6139 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6140 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6141 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6142 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006143 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006144 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6145 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6146 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006147 },
6148 ],
6149 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006150 &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`.
6151 &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.
6152 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6153 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6154 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6155 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6156 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6157 &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.
6158 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6159 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6160 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6161 &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.
6162 &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`.
6163 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6164 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6165 &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.
6166 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6167 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6168 {
6169 &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.
6170 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6171 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6172 {
6173 &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).
6174 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6175 },
6176 ],
6177 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6178 },
6179 ],
6180 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006181 }</pre>
6182</div>
6183
6184<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006185 <code class="details" id="stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006186 <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 -07006187
6188Args:
6189 project: string, Project ID for this request. (required)
6190 zone: string, The name of the zone for this request. (required)
6191 instance: string, Name of the instance resource to stop. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006192 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006193 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.
6194
6195For 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.
6196
6197The 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 -07006198
6199Returns:
6200 An object of the form:
6201
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006202 { # Represents an Operation resource.
6203 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006204 # Google Compute Engine has three Operation resources:
6205 #
6206 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6207 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006208 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6209 #
6210 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006211 # - For global operations, use the `globalOperations` resource.
6212 # - For regional operations, use the `regionOperations` resource.
6213 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006214 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006215 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006216 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6217 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6218 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6219 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6220 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6221 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006222 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006223 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6224 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6225 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006226 },
6227 ],
6228 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006229 &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`.
6230 &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.
6231 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6232 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6233 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6234 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6235 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6236 &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.
6237 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6238 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6239 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6240 &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.
6241 &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`.
6242 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6243 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6244 &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.
6245 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6246 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6247 {
6248 &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.
6249 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6250 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6251 {
6252 &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).
6253 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6254 },
6255 ],
6256 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6257 },
6258 ],
6259 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006260 }</pre>
6261</div>
6262
6263<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006264 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006265 <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.
6266
6267Args:
6268 project: string, Project ID for this request. (required)
6269 zone: string, The name of the zone for this request. (required)
6270 instance: string, Name of the instance resource to suspend. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006271 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006272 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.
6273
6274For 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.
6275
6276The 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 -07006277
6278Returns:
6279 An object of the form:
6280
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006281 { # Represents an Operation resource.
6282 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006283 # Google Compute Engine has three Operation resources:
6284 #
6285 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6286 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006287 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6288 #
6289 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006290 # - For global operations, use the `globalOperations` resource.
6291 # - For regional operations, use the `regionOperations` resource.
6292 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006293 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006294 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006295 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6296 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6297 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6298 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6299 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6300 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006301 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006302 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6303 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6304 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006305 },
6306 ],
6307 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006308 &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`.
6309 &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.
6310 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6311 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6312 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6313 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6314 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6315 &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.
6316 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6317 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6318 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6319 &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.
6320 &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`.
6321 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6322 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6323 &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.
6324 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6325 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6326 {
6327 &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.
6328 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6329 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6330 {
6331 &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).
6332 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6333 },
6334 ],
6335 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6336 },
6337 ],
6338 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006339 }</pre>
6340</div>
6341
6342<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006343 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006344 <pre>Returns permissions that a caller has on the specified resource.
6345
6346Args:
6347 project: string, Project ID for this request. (required)
6348 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006349 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006350 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006351 The object takes the form of:
6352
6353{
Bu Sun Kim65020912020-05-20 12:08:20 -07006354 &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.
6355 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006356 ],
6357 }
6358
6359
6360Returns:
6361 An object of the form:
6362
6363 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006364 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
6365 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006366 ],
6367 }</pre>
6368</div>
6369
6370<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07006371 <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 -07006372 <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.
6373
6374Args:
6375 project: string, Project ID for this request. (required)
6376 zone: string, The name of the zone for this request. (required)
6377 instance: string, Name of the instance resource to update. (required)
6378 body: object, The request body.
6379 The object takes the form of:
6380
6381{ # Represents an Instance resource.
6382 #
6383 # 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 ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006384 &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.
6385 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
6386 &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.
6387 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006388 &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.
6389 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
6390 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07006391 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006392 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
6393 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
6394 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
6395 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6396 &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 -07006397 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07006398 &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).
6399 &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.
6400 &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.
6401 #
6402 # 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 -07006403 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07006404 #
6405 # 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.
6406 #
6407 # 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.
6408 #
6409 # 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.
6410 #
6411 # 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 -07006412 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6413 &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.
6414 &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.
6415 &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 -07006416 #
6417 # The key must meet the following requirements before you can provide it to Compute Engine:
6418 # - The key is wrapped using a RSA public key certificate provided by Google.
6419 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6420 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07006421 &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 -07006422 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006423 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
6424 &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.
6425 { # Guest OS features.
6426 &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.
6427 },
6428 ],
6429 &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.
6430 &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 -07006431 #
6432 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
6433 #
6434 # 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 -07006435 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
6436 &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.
6437 &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.
6438 &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 -07006439 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
6440 #
6441 #
6442 # 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:
6443 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
6444 # - projects/project/zones/zone/diskTypes/diskType
6445 # - 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 -07006446 &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 -07006447 #
6448 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
6449 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07006450 &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 -07006451 },
6452 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006453 &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.
6454 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07006455 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006456 &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 -07006457 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006458 &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 -07006459 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
6460 &quot;A String&quot;,
6461 ],
6462 &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.
6463 &quot;A String&quot;,
6464 ],
6465 &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 -07006466 #
6467 # 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:
6468 # projects/debian-cloud/global/images/family/debian-9
6469 #
6470 #
6471 # Alternatively, use a specific version of a public operating system image:
6472 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
6473 #
6474 #
6475 # To create a disk with a custom image that you created, specify the image name in the following format:
6476 # global/images/my-custom-image
6477 #
6478 #
6479 # 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:
6480 # global/images/family/my-image-family
6481 #
6482 #
6483 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006484 &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 -07006485 #
6486 # 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.
6487 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6488 &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.
6489 &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.
6490 &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.
6491 #
6492 # The key must meet the following requirements before you can provide it to Compute Engine:
6493 # - The key is wrapped using a RSA public key certificate provided by Google.
6494 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6495 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6496 &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.
6497 },
6498 &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.
6499 #
6500 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
6501 # global/snapshots/my-backup
6502 #
6503 #
6504 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006505 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07006506 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6507 &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.
6508 &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.
6509 &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.
6510 #
6511 # The key must meet the following requirements before you can provide it to Compute Engine:
6512 # - The key is wrapped using a RSA public key certificate provided by Google.
6513 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6514 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6515 &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 -07006516 },
6517 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006518 &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.
6519 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
6520 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
6521 &quot;A String&quot;,
6522 ],
6523 &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.
6524 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
6525 &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
6526 &quot;dbs&quot;: [ # The Key Database (db).
6527 {
6528 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6529 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6530 },
6531 ],
6532 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
6533 {
6534 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6535 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6536 },
6537 ],
6538 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
6539 {
6540 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6541 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6542 },
6543 ],
6544 &quot;pk&quot;: { # The Platform Key (PK).
6545 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6546 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07006547 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006548 },
6549 &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 -07006550 #
6551 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
6552 #
6553 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07006554 &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 -07006555 },
6556 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006557 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
6558 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07006559 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006560 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
6561 &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.
6562 #
6563 # To see the latest fingerprint, make get() request to the instance.
6564 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
6565 { # A specification of the type and number of accelerator cards attached to the instance.
6566 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
6567 &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.
6568 },
6569 ],
6570 &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.
6571 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006572 &quot;instanceEncryptionKey&quot;: { # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07006573 #
6574 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
6575 #
6576 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
6577 #
6578 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
6579 #
6580 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
6581 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6582 &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.
6583 &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.
6584 &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.
6585 #
6586 # The key must meet the following requirements before you can provide it to Compute Engine:
6587 # - The key is wrapped using a RSA public key certificate provided by Google.
6588 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6589 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6590 &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.
6591 },
6592 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
6593 &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.
6594 #
6595 # To see the latest fingerprint, make get() request to the instance.
6596 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
6597 &quot;a_key&quot;: &quot;A String&quot;,
6598 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006599 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
6600 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
6601 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07006602 &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:
6603 # zones/us-central1-f/machineTypes/n1-standard-1
6604 #
6605 #
6606 # 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):
6607 # zones/zone/machineTypes/custom-CPUS-MEMORY
6608 #
6609 #
6610 # For example: zones/us-central1-f/machineTypes/custom-4-5120
6611 #
6612 # For a full list of restrictions, read the Specifications for custom machine types.
6613 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
6614 &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.
6615 #
6616 # To see the latest fingerprint, make a get() request to retrieve the resource.
6617 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
6618 {
6619 &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.
6620 &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).
6621 },
6622 ],
6623 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
6624 },
6625 &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;.
6626 &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.
6627 &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.
6628 { # A network interface resource attached to an instance.
6629 &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.
6630 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6631 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6632 &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.
6633 &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.
6634 &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.
6635 #
6636 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6637 #
6638 # 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.
6639 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
6640 &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.
6641 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
6642 &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.
6643 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
6644 },
6645 ],
6646 &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.
6647 { # An alias IP range attached to an instance&#x27;s network interface.
6648 &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).
6649 &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.
6650 },
6651 ],
6652 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
6653 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
6654 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
6655 &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.
6656 &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.
6657 #
6658 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6659 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6660 # - projects/project/global/networks/network
6661 # - global/networks/default
6662 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006663 &quot;queueCount&quot;: 42, # The networking queue count for the network interface. Both Rx and Tx queues will be set to this number. If it&#x27;s not specified by the user, a default number of queues will be assigned. For Virtio-net, each interface will get (min(#vCPU, 32) / #vNIC) queues. For gVNIC, each interface will get (min(#vCPU / 2, 16) / #vNIC) qeueus.
Bu Sun Kim65020912020-05-20 12:08:20 -07006664 &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:
6665 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6666 # - regions/region/subnetworks/subnetwork
6667 },
6668 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006669 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006670 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
6671 &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.
6672 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
6673 &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.
6674 &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.
6675 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
6676 &quot;A String&quot;,
6677 ],
6678 },
6679 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
6680 &quot;A String&quot;,
6681 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006682 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
6683 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006684 &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.
6685 #
6686 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
6687 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
6688 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006689 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006690 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
6691 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
6692 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
6693 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
6694 &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.
6695 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
6696 &quot;A String&quot;,
6697 ],
6698 },
6699 ],
6700 &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 -07006701 &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 -07006702 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006703 &quot;secureLabels&quot;: [ # Secure labels to apply to this instance. These can be later modified by the update method. Maximum number of secure labels allowed is 300.
6704 &quot;A String&quot;,
6705 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006706 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
6707 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6708 &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.
6709 #
6710 # 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.
6711 { # A service account.
6712 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
6713 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
6714 &quot;A String&quot;,
6715 ],
6716 },
6717 ],
6718 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
6719 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
6720 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
6721 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
6722 },
6723 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
6724 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
6725 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006726 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Deprecating, please use shielded_instance_config.
Bu Sun Kim65020912020-05-20 12:08:20 -07006727 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
6728 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
6729 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
6730 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006731 &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 -07006732 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
6733 },
6734 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006735 &quot;sourceMachineImageEncryptionKey&quot;: { # Source GMI encryption key when creating an instance from GMI.
Bu Sun Kim65020912020-05-20 12:08:20 -07006736 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6737 &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.
6738 &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.
6739 &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.
6740 #
6741 # The key must meet the following requirements before you can provide it to Compute Engine:
6742 # - The key is wrapped using a RSA public key certificate provided by Google.
6743 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6744 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6745 &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.
6746 },
6747 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006748 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07006749 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
6750 &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.
6751 &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.
6752 #
6753 # To see the latest fingerprint, make get() request to the instance.
6754 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
6755 &quot;A String&quot;,
6756 ],
6757 },
6758 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07006759 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
6760 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format. DEPRECATED: Use start_time_window instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07006761 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
6762 },
6763 &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 -07006764}
6765
6766 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.
6767 Allowed values
6768 INVALID -
6769 NO_EFFECT -
6770 REFRESH -
6771 RESTART -
Bu Sun Kim65020912020-05-20 12:08:20 -07006772 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.
6773 Allowed values
6774 INVALID -
6775 NO_EFFECT -
6776 REFRESH -
6777 RESTART -
Dan O'Mearadd494642020-05-01 07:42:23 -07006778 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.
6779
6780For 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.
6781
6782The 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 -07006783
6784Returns:
6785 An object of the form:
6786
6787 { # Represents an Operation resource.
6788 #
6789 # Google Compute Engine has three Operation resources:
6790 #
6791 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6792 #
6793 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6794 #
6795 # Operations can be global, regional or zonal.
6796 # - For global operations, use the `globalOperations` resource.
6797 # - For regional operations, use the `regionOperations` resource.
6798 # - For zonal operations, use the `zonalOperations` resource.
6799 #
6800 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006801 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6802 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6803 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6804 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6805 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6806 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006807 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006808 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6809 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6810 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07006811 },
6812 ],
6813 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006814 &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`.
6815 &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.
6816 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6817 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6818 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6819 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6820 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6821 &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.
6822 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6823 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6824 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6825 &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.
6826 &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`.
6827 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6828 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6829 &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.
6830 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6831 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6832 {
6833 &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.
6834 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6835 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6836 {
6837 &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).
6838 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6839 },
6840 ],
6841 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6842 },
6843 ],
6844 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Dan O'Mearadd494642020-05-01 07:42:23 -07006845 }</pre>
6846</div>
6847
6848<div class="method">
6849 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07006850 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006851
6852Args:
6853 project: string, Project ID for this request. (required)
6854 zone: string, The name of the zone for this request. (required)
6855 instance: string, The instance name for this request. (required)
6856 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006857 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006858 The object takes the form of:
6859
Bu Sun Kim65020912020-05-20 12:08:20 -07006860{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6861 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6862 &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.
6863 &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.
6864 &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 -07006865 #
6866 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6867 #
6868 # 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 -07006869 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
6870 &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.
6871 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
6872 &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.
6873 &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 -07006874}
6875
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006876 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.
6877
6878For 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.
6879
6880The 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 -07006881
6882Returns:
6883 An object of the form:
6884
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006885 { # Represents an Operation resource.
6886 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006887 # Google Compute Engine has three Operation resources:
6888 #
6889 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6890 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006891 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6892 #
6893 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006894 # - For global operations, use the `globalOperations` resource.
6895 # - For regional operations, use the `regionOperations` resource.
6896 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006897 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006898 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006899 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6900 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6901 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6902 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6903 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6904 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006905 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006906 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6907 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6908 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006909 },
6910 ],
6911 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006912 &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`.
6913 &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.
6914 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6915 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6916 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6917 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6918 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6919 &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.
6920 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6921 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6922 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6923 &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.
6924 &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`.
6925 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6926 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6927 &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.
6928 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6929 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6930 {
6931 &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.
6932 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6933 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6934 {
6935 &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).
6936 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6937 },
6938 ],
6939 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6940 },
6941 ],
6942 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006943 }</pre>
6944</div>
6945
6946<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006947 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006948 <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.
6949
6950Args:
6951 project: string, Project ID for this request. (required)
6952 zone: string, The name of the zone for this request. (required)
6953 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006954 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006955 The object takes the form of:
6956
6957{ # A set of Display Device options
Bu Sun Kim65020912020-05-20 12:08:20 -07006958 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006959}
6960
6961 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.
6962
6963For 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.
6964
6965The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6966
6967Returns:
6968 An object of the form:
6969
6970 { # Represents an Operation resource.
6971 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006972 # Google Compute Engine has three Operation resources:
6973 #
6974 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6975 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006976 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6977 #
6978 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006979 # - For global operations, use the `globalOperations` resource.
6980 # - For regional operations, use the `regionOperations` resource.
6981 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006982 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006983 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006984 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6985 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6986 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6987 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6988 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6989 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006990 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006991 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6992 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6993 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006994 },
6995 ],
6996 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006997 &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`.
6998 &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.
6999 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
7000 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
7001 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
7002 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7003 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
7004 &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.
7005 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
7006 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7007 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
7008 &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.
7009 &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`.
7010 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
7011 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
7012 &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.
7013 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
7014 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
7015 {
7016 &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.
7017 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
7018 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
7019 {
7020 &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).
7021 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7022 },
7023 ],
7024 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7025 },
7026 ],
7027 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007028 }</pre>
7029</div>
7030
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007031<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07007032 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07007033 <pre>Updates an instance&#x27;s network interface. This method follows PATCH semantics.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007034
7035Args:
7036 project: string, Project ID for this request. (required)
7037 zone: string, The name of the zone for this request. (required)
7038 instance: string, The instance name for this request. (required)
7039 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07007040 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007041 The object takes the form of:
7042
7043{ # A network interface resource attached to an instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07007044 &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.
7045 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
7046 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
7047 &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.
7048 &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.
7049 &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 -07007050 #
7051 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
7052 #
7053 # 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 -07007054 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
7055 &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.
7056 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
7057 &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.
7058 &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 -07007059 },
7060 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07007061 &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.
7062 { # An alias IP range attached to an instance&#x27;s network interface.
7063 &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).
7064 &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.
7065 },
7066 ],
7067 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
7068 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
7069 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
7070 &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.
7071 &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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007072 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007073 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
7074 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
7075 # - projects/project/global/networks/network
7076 # - global/networks/default
Bu Sun Kim65020912020-05-20 12:08:20 -07007077 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07007078 &quot;queueCount&quot;: 42, # The networking queue count for the network interface. Both Rx and Tx queues will be set to this number. If it&#x27;s not specified by the user, a default number of queues will be assigned. For Virtio-net, each interface will get (min(#vCPU, 32) / #vNIC) queues. For gVNIC, each interface will get (min(#vCPU / 2, 16) / #vNIC) qeueus.
Bu Sun Kim65020912020-05-20 12:08:20 -07007079 &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:
7080 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
7081 # - regions/region/subnetworks/subnetwork
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007082}
7083
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007084 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.
7085
7086For 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.
7087
7088The 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 -04007089
7090Returns:
7091 An object of the form:
7092
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007093 { # Represents an Operation resource.
7094 #
Dan O'Mearadd494642020-05-01 07:42:23 -07007095 # Google Compute Engine has three Operation resources:
7096 #
7097 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
7098 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007099 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
7100 #
7101 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07007102 # - For global operations, use the `globalOperations` resource.
7103 # - For regional operations, use the `regionOperations` resource.
7104 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007105 #
Dan O'Mearadd494642020-05-01 07:42:23 -07007106 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07007107 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
7108 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7109 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
7110 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
7111 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
7112 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007113 {
Bu Sun Kim65020912020-05-20 12:08:20 -07007114 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7115 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
7116 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007117 },
7118 ],
7119 },
Bu Sun Kim65020912020-05-20 12:08:20 -07007120 &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`.
7121 &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.
7122 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
7123 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
7124 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
7125 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7126 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
7127 &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.
7128 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
7129 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7130 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
7131 &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.
7132 &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`.
7133 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
7134 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
7135 &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.
7136 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
7137 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
7138 {
7139 &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.
7140 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
7141 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
7142 {
7143 &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).
7144 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7145 },
7146 ],
7147 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7148 },
7149 ],
7150 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007151 }</pre>
7152</div>
7153
7154<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07007155 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007156 <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.
7157
7158Args:
7159 project: string, Project ID for this request. (required)
7160 zone: string, The name of the zone for this request. (required)
7161 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07007162 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007163 The object takes the form of:
7164
7165{ # A set of Shielded Instance options.
Bu Sun Kim65020912020-05-20 12:08:20 -07007166 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
7167 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
7168 &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 -07007169}
7170
7171 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.
7172
7173For 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.
7174
7175The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
7176
7177Returns:
7178 An object of the form:
7179
7180 { # Represents an Operation resource.
7181 #
Dan O'Mearadd494642020-05-01 07:42:23 -07007182 # Google Compute Engine has three Operation resources:
7183 #
7184 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
7185 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007186 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
7187 #
7188 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07007189 # - For global operations, use the `globalOperations` resource.
7190 # - For regional operations, use the `regionOperations` resource.
7191 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007192 #
Dan O'Mearadd494642020-05-01 07:42:23 -07007193 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07007194 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
7195 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7196 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
7197 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
7198 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
7199 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007200 {
Bu Sun Kim65020912020-05-20 12:08:20 -07007201 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7202 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
7203 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007204 },
7205 ],
7206 },
Bu Sun Kim65020912020-05-20 12:08:20 -07007207 &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`.
7208 &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.
7209 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
7210 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
7211 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
7212 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7213 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
7214 &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.
7215 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
7216 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7217 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
7218 &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.
7219 &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`.
7220 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
7221 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
7222 &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.
7223 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
7224 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
7225 {
7226 &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.
7227 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
7228 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
7229 {
7230 &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).
7231 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7232 },
7233 ],
7234 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7235 },
7236 ],
7237 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007238 }</pre>
7239</div>
7240
7241<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07007242 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007243 <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.
7244
7245Args:
7246 project: string, Project ID for this request. (required)
7247 zone: string, The name of the zone for this request. (required)
7248 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07007249 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007250 The object takes the form of:
7251
7252{ # A set of Shielded VM options.
Bu Sun Kim65020912020-05-20 12:08:20 -07007253 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
7254 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
7255 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007256}
7257
7258 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.
7259
7260For 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.
7261
7262The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
7263
7264Returns:
7265 An object of the form:
7266
7267 { # Represents an Operation resource.
7268 #
Dan O'Mearadd494642020-05-01 07:42:23 -07007269 # Google Compute Engine has three Operation resources:
7270 #
7271 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
7272 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007273 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
7274 #
7275 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07007276 # - For global operations, use the `globalOperations` resource.
7277 # - For regional operations, use the `regionOperations` resource.
7278 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07007279 #
Dan O'Mearadd494642020-05-01 07:42:23 -07007280 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07007281 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
7282 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
7283 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
7284 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
7285 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
7286 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007287 {
Bu Sun Kim65020912020-05-20 12:08:20 -07007288 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
7289 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
7290 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007291 },
7292 ],
7293 },
Bu Sun Kim65020912020-05-20 12:08:20 -07007294 &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`.
7295 &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.
7296 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
7297 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
7298 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
7299 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
7300 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
7301 &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.
7302 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
7303 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
7304 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
7305 &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.
7306 &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`.
7307 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
7308 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
7309 &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.
7310 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
7311 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
7312 {
7313 &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.
7314 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
7315 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
7316 {
7317 &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).
7318 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
7319 },
7320 ],
7321 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
7322 },
7323 ],
7324 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04007325 }</pre>
7326</div>
7327
Sai Cheemalapatidf613972016-10-21 13:59:49 -07007328</body></html>